fixed NeonSpam timeban reaction
authorpk910 <philipp@zoelle1.de>
Fri, 11 Nov 2011 14:26:13 +0000 (15:26 +0100)
committerpk910 <philipp@zoelle1.de>
Fri, 11 Nov 2011 14:26:13 +0000 (15:26 +0100)
src/event_neonspam_chanmsg.c
src/event_neonspam_join.c

index c20065f617361f13bcd5a2176998282b6a6a21ea..e15eb7985aa74bc5a547252a312abd85018e3666 100644 (file)
@@ -239,7 +239,7 @@ static void neonspam_event_chanmsg_punish(struct ClientSocket *client, struct Ch
         char banmaskBuf[NICKLEN+USERLEN+HOSTLEN+3];
         char *banmask = NULL;
         switch (punishment) {
-            case 3: //TIMEBAN: 1h
+            case 3: //TIMEBAN
                 banmask = generate_banmask(chanuser->user, banmaskBuf);
                 printf_mysql_query("INSERT INTO `bans` (`ban_channel`, `ban_mask`, `ban_triggered`, `ban_timeout`, `ban_owner`, `ban_reason`) VALUES ('%d', '%s', UNIX_TIMESTAMP(), '%lu', '%d', '%s')", chanuser->chan->channel_id, escape_string(banmask), (unsigned long) (punish_time ? (time(0) + punish_time) : 0), 0, escape_string(reason));
                 if(punish_time) {
index ed7fa5d876c68049f45eabe3a2346e7ca43eb0ba..a192d792c284154c3a74be5d51c971c2f8fd1a70 100644 (file)
@@ -88,7 +88,7 @@ static void neonspam_event_join_punish(struct ClientSocket *client, struct ChanU
         char banmaskBuf[NICKLEN+USERLEN+HOSTLEN+3];
         char *banmask = NULL;
         switch (atoi((row[0] ? row[0] : defaults[0]))) {
-            case 3: //TIMEBAN: 1h
+            case 2: //TIMEBAN
                 banmask = generate_banmask(chanuser->user, banmaskBuf);
                 printf_mysql_query("INSERT INTO `bans` (`ban_channel`, `ban_mask`, `ban_triggered`, `ban_timeout`, `ban_owner`, `ban_reason`) VALUES ('%d', '%s', UNIX_TIMESTAMP(), '%lu', '%d', '%s')", chanuser->chan->channel_id, escape_string(banmask), (unsigned long) (duration ? (time(0) + duration) : 0), 0, escape_string(reason));
                 if(duration) {