aboutsummaryrefslogtreecommitdiffstats
path: root/protocols/nogaim.c
diff options
context:
space:
mode:
authorWilmer van der Gaast <wilmer@gaast.net>2007-04-16 21:49:17 -0700
committerWilmer van der Gaast <wilmer@gaast.net>2007-04-16 21:49:17 -0700
commit9624fdf0d6f170d8caa7948fb1b3a138b05e1d8c (patch)
treeaa75862ae3adae1dcdfb689361528289edaeea12 /protocols/nogaim.c
parent717e3bf045e5ebfb9b71e9260c8e573daefa7900 (diff)
API cleanup pretty much complete. Fixed pretty much everything except the
buddy/groupchat related functions.
Diffstat (limited to 'protocols/nogaim.c')
-rw-r--r--protocols/nogaim.c25
1 files changed, 10 insertions, 15 deletions
diff --git a/protocols/nogaim.c b/protocols/nogaim.c
index ef30f749..2a452e57 100644
--- a/protocols/nogaim.c
+++ b/protocols/nogaim.c
@@ -423,7 +423,7 @@ struct buddy *find_buddy( struct im_connection *ic, char *handle )
if( !u )
return( NULL );
-
+
memset( b, 0, sizeof( b ) );
strncpy( b->name, handle, 80 );
strncpy( b->show, u->realname, BUDDY_ALIAS_MAXLEN );
@@ -574,11 +574,11 @@ void imcb_buddy_status( struct im_connection *ic, const char *handle, int flags,
( ( u->online == oo ) && ( oa == !u->away ) ) ) ) /* (De)voice people changing state */
{
irc_write( ic->irc, ":%s MODE %s %cv %s", ic->irc->myhost,
- ic->irc->channel, u->away?'-':'+', u->nick );
+ ic->irc->channel, u->away?'-':'+', u->nick );
}
}
-void serv_got_im( struct im_connection *ic, char *handle, char *msg, guint32 flags, time_t mtime, gint len )
+void imcb_buddy_msg( struct im_connection *ic, char *handle, char *msg, u_int32_t flags, time_t sent_at )
{
irc_t *irc = ic->irc;
user_t *u;
@@ -656,24 +656,19 @@ void serv_got_im( struct im_connection *ic, char *handle, char *msg, guint32 fla
irc_msgfrom( irc, u->nick, msg );
}
-void serv_got_typing( struct im_connection *ic, char *handle, int timeout, int type )
+void imcb_buddy_typing( struct im_connection *ic, char *handle, u_int32_t flags )
{
user_t *u;
if( !set_getbool( &ic->irc->set, "typing_notice" ) )
return;
- if( ( u = user_findhandle( ic, handle ) ) ) {
- /* If type is:
- * 0: user has stopped typing
- * 1: user is actively typing
- * 2: user has entered text, but is not actively typing
- */
- if (type == 0 || type == 1 || type == 2) {
- char buf[256];
- g_snprintf(buf, 256, "\1TYPING %d\1", type);
- irc_privmsg( ic->irc, u, "PRIVMSG", ic->irc->nick, NULL, buf );
- }
+ if( ( u = user_findhandle( ic, handle ) ) )
+ {
+ char buf[256];
+
+ g_snprintf( buf, 256, "\1TYPING %d\1", ( flags >> 8 ) & 3 );
+ irc_privmsg( ic->irc, u, "PRIVMSG", ic->irc->nick, NULL, buf );
}
}