]> jfr.im git - irc/rqf/shadowircd.git/blobdiff - src/channel.c
WHOIS 330 (services login name) does not need a remote whois.
[irc/rqf/shadowircd.git] / src / channel.c
index 8d59a83a9432fa925a16ea49e46e50008ff416fc..80bf5c5c2f5573d87e9055ace7f1f46a9396688d 100644 (file)
@@ -26,6 +26,7 @@
 
 #include "stdinc.h"
 #include "channel.h"
+#include "chmode.h"
 #include "client.h"
 #include "common.h"
 #include "hash.h"
@@ -240,8 +241,6 @@ remove_user_from_channel(struct membership *msptr)
        if(client_p->servptr == &me)
                rb_dlinkDelete(&msptr->locchannode, &chptr->locmembers);
 
-       chptr->users_last = rb_current_time();
-
        if(!(chptr->mode.mode & MODE_PERMANENT) && rb_dlink_list_length(&chptr->members) <= 0)
                destroy_channel(chptr);
 
@@ -277,8 +276,6 @@ remove_user_from_channels(struct Client *client_p)
                if(client_p->servptr == &me)
                        rb_dlinkDelete(&msptr->locchannode, &chptr->locmembers);
 
-               chptr->users_last = rb_current_time();
-
                if(!(chptr->mode.mode & MODE_PERMANENT) && rb_dlink_list_length(&chptr->members) <= 0)
                        destroy_channel(chptr);
 
@@ -921,19 +918,14 @@ check_spambot_warning(struct Client *source_p, const char *name)
                        source_p->localClient->oper_warn_count_down--;
                else
                        source_p->localClient->oper_warn_count_down = 0;
-               if(source_p->localClient->oper_warn_count_down == 0)
+               if(source_p->localClient->oper_warn_count_down == 0 &&
+                               name != NULL)
                {
                        /* Its already known as a possible spambot */
-                       if(name != NULL)
-                               sendto_realops_snomask(SNO_BOTS, L_NETWIDE,
-                                                    "User %s (%s@%s) trying to join %s is a possible spambot",
-                                                    source_p->name,
-                                                    source_p->username, source_p->orighost, name);
-                       else
-                               sendto_realops_snomask(SNO_BOTS, L_NETWIDE,
-                                                    "User %s (%s@%s) is a possible spambot",
-                                                    source_p->name,
-                                                    source_p->username, source_p->orighost);
+                       sendto_realops_snomask(SNO_BOTS, L_NETWIDE,
+                                            "User %s (%s@%s) trying to join %s is a possible spambot",
+                                            source_p->name,
+                                            source_p->username, source_p->orighost, name);
                        source_p->localClient->oper_warn_count_down = OPER_SPAM_COUNTDOWN;
                }
        }
@@ -999,6 +991,7 @@ check_splitmode(void *unused)
                                             "Network rejoined, deactivating splitmode");
 
                        rb_event_delete(check_splitmode_ev);
+                       check_splitmode_ev = NULL;
                }
        }
 }