From: Aksel Meola Date: Wed, 20 Jul 2016 03:19:28 +0000 (+0300) Subject: Reliable way to not respond to own messages X-Git-Url: http://git.harvie.cz/?p=mirrors%2Flibpurple-core-answerscripts.git;a=commitdiff_plain;h=25fb4d265d46d9d2b7c6d33a73dc5a0f0a3f93f8;ds=sidebyside Reliable way to not respond to own messages --- diff --git a/answerscripts.c b/answerscripts.c index 4e3e881..6056851 100755 --- a/answerscripts.c +++ b/answerscripts.c @@ -110,7 +110,7 @@ static char received_msg_cb(PurpleAccount *account, char *who, char *buffer, Pur if(local_alias == NULL) local_alias = local_name; //Do not respond to messages sent by myself - if(strcmp(local_name, who) == 0) return 0; + if (flags & PURPLE_MESSAGE_SEND) return 0; //Was my nick said? char *highlighted;