diff options
Diffstat (limited to 'protocols')
-rw-r--r-- | protocols/bee.h | 1 | ||||
-rw-r--r-- | protocols/bee_user.c | 11 | ||||
-rw-r--r-- | protocols/nogaim.c | 18 |
3 files changed, 12 insertions, 18 deletions
diff --git a/protocols/bee.h b/protocols/bee.h index e87bb762..62f60477 100644 --- a/protocols/bee.h +++ b/protocols/bee.h @@ -70,6 +70,7 @@ typedef struct bee_ui_funcs gboolean (*user_fullname)( bee_t *bee, bee_user_t *bu ); gboolean (*user_status)( bee_t *bee, struct bee_user *bu, struct bee_user *old ); gboolean (*user_msg)( bee_t *bee, bee_user_t *bu, const char *msg, time_t sent_at ); + gboolean (*user_typing)( bee_t *bee, bee_user_t *bu, guint32 flags ); struct file_transfer* (*ft_in_start)( bee_t *bee, bee_user_t *bu, const char *file_name, size_t file_size ); gboolean (*ft_out_start)( struct im_connection *ic, struct file_transfer *ft ); diff --git a/protocols/bee_user.c b/protocols/bee_user.c index f856e7a2..7a38882b 100644 --- a/protocols/bee_user.c +++ b/protocols/bee_user.c @@ -193,3 +193,14 @@ void imcb_buddy_msg( struct im_connection *ic, const char *handle, char *msg, ui else imcb_log( ic, "Message from unknown handle %s:\n%s", handle, msg ); } + +void imcb_buddy_typing( struct im_connection *ic, char *handle, uint32_t flags ) +{ + bee_user_t *bu; + + if( ic->bee->ui->user_typing && + ( bu = bee_user_by_handle( ic->bee, ic, handle ) ) ) + { + ic->bee->ui->user_typing( ic->bee, bu, flags ); + } +} diff --git a/protocols/nogaim.c b/protocols/nogaim.c index 4dd60ea6..f7db5c37 100644 --- a/protocols/nogaim.c +++ b/protocols/nogaim.c @@ -526,24 +526,6 @@ void imcb_ask_add( struct im_connection *ic, const char *handle, const char *rea imcb_ask_add_cb_yes, imcb_ask_add_cb_no, data ); } -void imcb_buddy_typing( struct im_connection *ic, char *handle, uint32_t flags ) -{ -#if 0 - user_t *u; - - if( !set_getbool( &ic->bee->set, "typing_notice" ) ) - return; - - 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 ); - } -#endif -} - struct bee_user *imcb_buddy_by_handle( struct im_connection *ic, const char *handle ) { return bee_user_by_handle( ic->bee, ic, handle ); |