* | Inspire Internet Relay Chat Daemon |
* +------------------------------------+
*
- * InspIRCd: (C) 2002-2009 InspIRCd Development Team
+ * InspIRCd: (C) 2002-2010 InspIRCd Development Team
* See: http://wiki.inspircd.org/Credits
*
* This program is free but copyrighted software; see
{
std::string url;
public:
- ModuleMapHide(InspIRCd* Me)
- : Module(Me)
+ ModuleMapHide()
{
- ServerInstance->Modules->Attach(I_OnPreCommand, this);
- ServerInstance->Modules->Attach(I_OnRehash, this);
+ Implementation eventlist[] = { I_OnPreCommand, I_OnRehash };
+ ServerInstance->Modules->Attach(eventlist, this, 2);
OnRehash(NULL);
}
void OnRehash(User* user)
{
- ConfigReader MyConf(ServerInstance);
+ ConfigReader MyConf;
url = MyConf.ReadValue("security", "maphide", 0);
}
- ModResult OnPreCommand(std::string &command, std::vector<std::string> ¶meters, User *user, bool validated, const std::string &original_line)
+ ModResult OnPreCommand(std::string &command, std::vector<std::string> ¶meters, LocalUser *user, bool validated, const std::string &original_line)
{
if (!IS_OPER(user) && !url.empty() && (command == "MAP" || command == "LINKS"))
{
virtual Version GetVersion()
{
- return Version("Hide /MAP and /LINKS in the same form as ircu (mostly useless)", VF_VENDOR, API_VERSION);
+ return Version("Hide /MAP and /LINKS in the same form as ircu (mostly useless)", VF_VENDOR);
}
};