Changeset 9624fdf for protocols/nogaim.c


Ignore:
Timestamp:
2007-04-17T04:49:17Z (14 years ago)
Author:
Wilmer van der Gaast <wilmer@…>
Branches:
master
Children:
33dc261
Parents:
717e3bf
Message:

API cleanup pretty much complete. Fixed pretty much everything except the
buddy/groupchat related functions.

File:
1 edited

Legend:

Unmodified
Added
Removed
  • protocols/nogaim.c

    r717e3bf r9624fdf  
    424424        if( !u )
    425425                return( NULL );
    426 
     426       
    427427        memset( b, 0, sizeof( b ) );
    428428        strncpy( b->name, handle, 80 );
     
    575575        {
    576576                irc_write( ic->irc, ":%s MODE %s %cv %s", ic->irc->myhost,
    577                                                                 ic->irc->channel, u->away?'-':'+', u->nick );
    578         }
    579 }
    580 
    581 void serv_got_im( struct im_connection *ic, char *handle, char *msg, guint32 flags, time_t mtime, gint len )
     577                                                          ic->irc->channel, u->away?'-':'+', u->nick );
     578        }
     579}
     580
     581void imcb_buddy_msg( struct im_connection *ic, char *handle, char *msg, u_int32_t flags, time_t sent_at )
    582582{
    583583        irc_t *irc = ic->irc;
     
    657657}
    658658
    659 void serv_got_typing( struct im_connection *ic, char *handle, int timeout, int type )
     659void imcb_buddy_typing( struct im_connection *ic, char *handle, u_int32_t flags )
    660660{
    661661        user_t *u;
     
    664664                return;
    665665       
    666         if( ( u = user_findhandle( ic, handle ) ) ) {
    667                 /* If type is:
    668                  * 0: user has stopped typing
    669                  * 1: user is actively typing
    670                  * 2: user has entered text, but is not actively typing
    671                  */
    672                 if (type == 0 || type == 1 || type == 2) {
    673                         char buf[256];
    674                         g_snprintf(buf, 256, "\1TYPING %d\1", type);
    675                         irc_privmsg( ic->irc, u, "PRIVMSG", ic->irc->nick, NULL, buf );
    676                 }
     666        if( ( u = user_findhandle( ic, handle ) ) )
     667        {
     668                char buf[256];
     669               
     670                g_snprintf( buf, 256, "\1TYPING %d\1", ( flags >> 8 ) & 3 );
     671                irc_privmsg( ic->irc, u, "PRIVMSG", ic->irc->nick, NULL, buf );
    677672        }
    678673}
Note: See TracChangeset for help on using the changeset viewer.