From: <sa...@us...> - 2006-08-16 14:19:07
|
Revision: 16789 Author: sadrul Date: 2006-08-16 07:18:58 -0700 (Wed, 16 Aug 2006) ViewCVS: http://svn.sourceforge.net/gaim/?rev=16789&view=rev Log Message: ----------- Update gntgf to work for nick-said messages in chats. Modified Paths: -------------- trunk/console/plugins/gntgf.c Modified: trunk/console/plugins/gntgf.c =================================================================== --- trunk/console/plugins/gntgf.c 2006-08-16 11:13:19 UTC (rev 16788) +++ trunk/console/plugins/gntgf.c 2006-08-16 14:18:58 UTC (rev 16789) @@ -34,6 +34,7 @@ #include <version.h> #include <blist.h> #include <conversation.h> +#include <util.h> #include <gnt.h> #include <gntbox.h> @@ -144,7 +145,18 @@ received_chat_msg(GaimAccount *account, const char *sender, const char *msg, GaimConversation *conv, GaimMessageFlags flags, gpointer null) { - if (gaim_prefs_get_bool(PREFS_EVENT_CHAT_NICK) && (flags & GAIM_MESSAGE_NICK)) + const char *nick; + + if (flags & GAIM_MESSAGE_WHISPER) + return; + + nick = GAIM_CONV_CHAT(conv)->nick; + + if (g_utf8_collate(sender, nick) == 0) + return; + + if (gaim_prefs_get_bool(PREFS_EVENT_CHAT_NICK) && + (gaim_utf8_has_word(msg, nick))) notify(_("%s said your nick in %s"), sender, gaim_conversation_get_name(conv)); else if (gaim_prefs_get_bool(PREFS_EVENT_CHAT_MSG)) notify(_("%s sent a message in %s"), sender, gaim_conversation_get_name(conv)); This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site. |