]> jfr.im git - irc/evilnet/x3.git/blobdiff - src/spamserv.c
Added 3 new hooks available for python scripts: new_user, nick_change, and server_link
[irc/evilnet/x3.git] / src / spamserv.c
index 9fa3254169c124eb855659e4e1b5bdf17c65ad65..e1c90c173dd749233884b0ea2ae482f1baa05578 100644 (file)
@@ -3,7 +3,7 @@
  *
  * This program is free software; you can redistribute it and/or modify
  * it under the terms of the GNU General Public License as published by
- * the Free Software Foundation; either version 2 of the License, or
+ * the Free Software Foundation; either version 3 of the License, or
  * (at your option) any later version.  Important limitations are
  * listed in the COPYING file that accompanies this software.
  *
@@ -571,9 +571,7 @@ static void
 spamserv_create_user(struct userNode *user)
 {
        struct userInfo *uInfo = malloc(sizeof(struct userInfo));
-       struct killNode *kNode = NULL;
-
-        kNode = dict_find(killed_users_dict, irc_ntoa(&user->ip), 0);
+       struct killNode *kNode = dict_find(killed_users_dict, irc_ntoa(&user->ip), 0);
 
        if(!uInfo)
        {
@@ -598,7 +596,7 @@ spamserv_create_user(struct userNode *user)
 
        if(kNode)
        {
-               free(kNode);
+               /* free(kNode); dict_remove does this */
                dict_remove(killed_users_dict, irc_ntoa(&user->ip));
        }
 }
@@ -2085,7 +2083,7 @@ static SPAMSERV_FUNC(cmd_addtrust)
     struct handle_info *hi;
 
     if (!(channel = GetChannel(argv[2]))) {
-        ss_reply("SSMSG_NOT_REGISTERED", channel->name);
+        ss_reply("SSMSG_NOT_REGISTERED", argv[2]);
         return 0;
     }
 
@@ -2212,7 +2210,7 @@ static SPAMSERV_FUNC(cmd_deltrust)
     struct handle_info *hi;
 
     if (!(channel = GetChannel(argv[2]))) {
-        ss_reply("SSMSG_NOT_REGISTERED", channel->name);
+        ss_reply("SSMSG_NOT_REGISTERED", argv[2]);
         return 0;
     }