From c058ff976bbbbf43ef11c262f21440e61244f73e Mon Sep 17 00:00:00 2001 From: Wilmer van der Gaast Date: Sun, 9 Dec 2007 23:19:35 +0000 Subject: Added /invite support for Jabber chatrooms (and fixed the argument order to chat_invite). --- protocols/yahoo/yahoo.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to 'protocols/yahoo') diff --git a/protocols/yahoo/yahoo.c b/protocols/yahoo/yahoo.c index 28a72877..625f3d1c 100644 --- a/protocols/yahoo/yahoo.c +++ b/protocols/yahoo/yahoo.c @@ -305,7 +305,7 @@ static void byahoo_chat_msg( struct groupchat *c, char *message, int flags ) yahoo_conference_message( yd->y2_id, NULL, c->data, c->title, message, 1 ); } -static void byahoo_chat_invite( struct groupchat *c, char *msg, char *who ) +static void byahoo_chat_invite( struct groupchat *c, char *who, char *msg ) { struct byahoo_data *yd = (struct byahoo_data *) c->ic->proto_data; -- cgit v1.2.3 From 1febf5c93b231942cd9cac8ac6a5a0d830c581cc Mon Sep 17 00:00:00 2001 From: Wilmer van der Gaast Date: Sat, 5 Jan 2008 21:15:32 +0000 Subject: Added "mail_notifications" setting. Who needs those notifications anyway? Closes: #338. --- protocols/yahoo/yahoo.c | 10 +++++++++- 1 file changed, 9 insertions(+), 1 deletion(-) (limited to 'protocols/yahoo') diff --git a/protocols/yahoo/yahoo.c b/protocols/yahoo/yahoo.c index 625f3d1c..d413597a 100644 --- a/protocols/yahoo/yahoo.c +++ b/protocols/yahoo/yahoo.c @@ -126,6 +126,11 @@ static char *byahoo_strip( const char *in ) return( g_strndup( in, len ) ); } +static void byahoo_init( account_t *acc ) +{ + set_add( &acc->set, "mail_notifications", "false", set_eval_bool, acc ); +} + static void byahoo_login( account_t *acc ) { struct im_connection *ic = imcb_new( acc ); @@ -348,6 +353,7 @@ void byahoo_initmodule( ) { struct prpl *ret = g_new0(struct prpl, 1); ret->name = "yahoo"; + ret->init = byahoo_init; ret->login = byahoo_login; ret->keepalive = byahoo_keepalive; @@ -922,7 +928,9 @@ void ext_yahoo_mail_notify( int id, const char *from, const char *subj, int cnt { struct im_connection *ic = byahoo_get_ic_by_id( id ); - if( from && subj ) + if( !set_getbool( &ic->acc->set, "mail_notifications" ) ) + ; /* The user doesn't care. */ + else if( from && subj ) imcb_log( ic, "Received e-mail message from %s with subject `%s'", from, subj ); else if( cnt > 0 ) imcb_log( ic, "Received %d new e-mails", cnt ); -- cgit v1.2.3 From ac4adf9a546c2e9b247b9de4b753177e6bd479e4 Mon Sep 17 00:00:00 2001 From: Wilmer van der Gaast Date: Thu, 17 Jan 2008 22:48:32 +0000 Subject: Apparently ext_yahoo_got_im can be called with msg=NULL, so it should be handled. Let's just ignore those packets. --- protocols/yahoo/yahoo.c | 10 +++++++--- 1 file changed, 7 insertions(+), 3 deletions(-) (limited to 'protocols/yahoo') diff --git a/protocols/yahoo/yahoo.c b/protocols/yahoo/yahoo.c index d413597a..9f9ffcf7 100644 --- a/protocols/yahoo/yahoo.c +++ b/protocols/yahoo/yahoo.c @@ -623,10 +623,14 @@ void ext_yahoo_status_changed( int id, const char *who, int stat, const char *ms void ext_yahoo_got_im( int id, const char *me, const char *who, const char *msg, long tm, int stat, int utf8 ) { struct im_connection *ic = byahoo_get_ic_by_id( id ); - char *m = byahoo_strip( msg ); + char *m; - imcb_buddy_msg( ic, (char*) who, (char*) m, 0, 0 ); - g_free( m ); + if( msg ) + { + m = byahoo_strip( msg ); + imcb_buddy_msg( ic, (char*) who, (char*) m, 0, 0 ); + g_free( m ); + } } void ext_yahoo_got_file( int id, -- cgit v1.2.3