* | 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.
* Before you start screaming, this definition is only used here, so moving it to a header is pointless.
* Yes, it's horrid. Blame cl for being different. -- w00t
*/
-#ifdef WINDOWS
-typedef nspace::hash_map<irc::string, std::deque<User*>, nspace::hash_compare<irc::string, std::less<irc::string> > > watchentries;
+#if defined(WINDOWS) && !defined(HASHMAP_DEPRECATED)
+ typedef nspace::hash_map<irc::string, std::deque<User*>, nspace::hash_compare<irc::string, std::less<irc::string> > > watchentries;
#else
-typedef nspace::hash_map<irc::string, std::deque<User*>, nspace::hash<irc::string> > watchentries;
+ typedef nspace::hash_map<irc::string, std::deque<User*>, nspace::hash<irc::string> > watchentries;
#endif
typedef std::map<irc::string, std::string> watchlist;
}
}
- /* 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)
}
}
- return CMD_FAILURE;
+ return CMD_LOCALONLY;
}
CommandWatch (InspIRCd* Instance, unsigned int &maxwatch) : Command(Instance,"WATCH",0,0), MAX_WATCH(maxwatch)
}
}
}
- /* So that spanningtree doesnt pass the WATCH commands to the network! */
- return CMD_FAILURE;
+ return CMD_LOCALONLY;
}
};
Modulewatch(InspIRCd* Me)
: Module(Me), maxwatch(32)
{
- OnRehash(NULL, "");
+ OnRehash(NULL);
whos_watching_me = new watchentries();
mycommand = new CommandWatch(ServerInstance, maxwatch);
ServerInstance->AddCommand(mycommand);
ServerInstance->Modules->Attach(eventlist, this, 8);
}
- virtual void OnRehash(User* user, const std::string ¶meter)
+ virtual void OnRehash(User* user)
{
ConfigReader Conf(ServerInstance);
maxwatch = Conf.ReadInteger("watch", "maxentries", 0, true);