Another year is about to end... So we have to update these damn copyright information :P
[NeonServV5.git] / src / event_neonspam_chanmsg.c
index f5035966ea9680e42a25729acdfd86535d5382db..117d5ad85c96130175b1774731f71bcc20439501 100644 (file)
@@ -1,5 +1,5 @@
-/* event_neonspam_chanmsg.c - NeonServ v5.2
- * Copyright (C) 2011  Philipp Kreil (pk910)
+/* event_neonspam_chanmsg.c - NeonServ v5.3
+ * Copyright (C) 2011-2012  Philipp Kreil (pk910)
  * 
  * 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
@@ -36,7 +36,7 @@ struct neonspam_event_chanmsg_cache {
 
 static void neonspam_event_chanmsg(struct UserNode *user, struct ChanNode *chan, char *message) {
     struct ClientSocket *client = getChannelBot(chan, BOTID);
-    if(!client) return; //we can't "see" this event
+    if(!client || (user->flags & USERFLAG_ISBOT)) return; //we can't "see" this event
     loadNeonSpamSettings(chan);
     struct NeonSpamSettings *settings = chan->spam_settings;
     struct ChanUser *chanuser = getChanUser(user, chan);
@@ -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) {