]> git.netwichtig.de Git - user/henk/code/inspircd.git/blobdiff - src/modules/m_watch.cpp
Added a parameter to OnRehash for the rehash parameter
[user/henk/code/inspircd.git] / src / modules / m_watch.cpp
index f613acda3665a13eb0026d2daa1871d14d5c4c17..b15a0b65c747c438a7a699ccf15a4b467864d809 100644 (file)
@@ -79,7 +79,7 @@ void handle_watch(char **parameters, int pcnt, userrec *user)
                                        }
                                }
                        }
-                       if (!strcasecmp(nick,"L"))
+                       else if (!strcasecmp(nick,"L"))
                        {
                                for (watchlist::iterator q = watches.begin(); q != watches.end(); q++)
                                {
@@ -94,7 +94,7 @@ void handle_watch(char **parameters, int pcnt, userrec *user)
                                }
                                WriteServ(user->fd,"607 %s :End of WATCH list",user->nick);
                        }
-                       if (!strcasecmp(nick,"S"))
+                       else if (!strcasecmp(nick,"S"))
                        {
                                std::string list = "";
                                for (watchlist::iterator q = watches.begin(); q != watches.end(); q++)
@@ -110,7 +110,7 @@ void handle_watch(char **parameters, int pcnt, userrec *user)
                                WriteServ(user->fd,"606 %s :%s",user->nick,l);
                                WriteServ(user->fd,"607 %s :End of WATCH S",user->nick);
                        }
-                       if (nick[0] == '-')
+                       else if (nick[0] == '-')
                        {
                                // removing an item from the list
                                nick++;
@@ -189,7 +189,7 @@ class Modulewatch : public Module
                Srv->AddCommand("WATCH",handle_watch,0,0,"m_watch.so");
        }
 
-       virtual void OnUserQuit(userrec* user)
+       virtual void OnUserQuit(userrec* user, std::string reason)
        {
                log(DEBUG,"*** WATCH: On global quit: user %s",user->nick);
                irc::string n2 = user->nick;