]> git.netwichtig.de Git - user/henk/code/inspircd.git/blobdiff - src/modules/m_watch.cpp
Make rehash work more than once per run, and fix some uninitialized values in connect...
[user/henk/code/inspircd.git] / src / modules / m_watch.cpp
index fd48f7f04571f4e740c02791558eb2def100074e..eda1b74a397d7080a9c8af5d235f54d92fa06b87 100644 (file)
@@ -2,8 +2,8 @@
  *       | Inspire Internet Relay Chat Daemon |
  *       +------------------------------------+
  *
- *  InspIRCd: (C) 2002-2008 InspIRCd Development Team
- * See: http://www.inspircd.org/wiki/index.php/Credits
+ *  InspIRCd: (C) 2002-2009 InspIRCd Development Team
+ * See: http://wiki.inspircd.org/Credits
  *
  * This program is free but copyrighted software; see
  *            the file COPYING for details.
@@ -183,11 +183,7 @@ class CommandWatch : public Command
                        }
                }
 
-               /* This might seem confusing, but we return CMD_FAILURE
-                * to indicate that this message shouldnt be routed across
-                * the network to other linked servers.
-                */
-               return CMD_FAILURE;
+               return CMD_LOCALONLY;
        }
 
        CmdResult add_watch(User* user, const char* nick)
@@ -252,7 +248,7 @@ class CommandWatch : public Command
                        }
                }
 
-               return CMD_FAILURE;
+               return CMD_LOCALONLY;
        }
 
        CommandWatch (InspIRCd* Instance, unsigned int &maxwatch) : Command(Instance,"WATCH",0,0), MAX_WATCH(maxwatch)
@@ -365,8 +361,7 @@ class CommandWatch : public Command
                                }
                        }
                }
-               /* So that spanningtree doesnt pass the WATCH commands to the network! */
-               return CMD_FAILURE;
+               return CMD_LOCALONLY;
        }
 };
 
@@ -380,7 +375,7 @@ class Modulewatch : public Module
        Modulewatch(InspIRCd* Me)
                : Module(Me), maxwatch(32)
        {
-               OnRehash(NULL, "");
+               OnRehash(NULL);
                whos_watching_me = new watchentries();
                mycommand = new CommandWatch(ServerInstance, maxwatch);
                ServerInstance->AddCommand(mycommand);
@@ -390,7 +385,7 @@ class Modulewatch : public Module
                ServerInstance->Modules->Attach(eventlist, this, 8);
        }
 
-       virtual void OnRehash(User* user, const std::string &parameter)
+       virtual void OnRehash(User* user)
        {
                ConfigReader Conf(ServerInstance);
                maxwatch = Conf.ReadInteger("watch", "maxentries", 0, true);