Reliable way to not respond to own messages 13/head
authorAksel Meola <aksel@meola.eu>
Wed, 20 Jul 2016 03:19:28 +0000 (06:19 +0300)
committerAksel Meola <aksel@meola.eu>
Wed, 20 Jul 2016 03:19:28 +0000 (06:19 +0300)
answerscripts.c

index 4e3e881..6056851 100755 (executable)
@@ -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;
This page took 0.133396 seconds and 4 git commands to generate.