1 /* +------------------------------------+
2 * | Inspire Internet Relay Chat Daemon |
3 * +------------------------------------+
5 * InspIRCd: (C) 2002-2010 InspIRCd Development Team
6 * See: http://wiki.inspircd.org/Credits
8 * This program is free but copyrighted software; see
9 * the file COPYING for details.
11 * ---------------------------------------------------
16 /* $ModDesc: Hide /MAP and /LINKS in the same form as ircu (mostly useless) */
18 class ModuleMapHide : public Module
24 Implementation eventlist[] = { I_OnPreCommand, I_OnRehash };
25 ServerInstance->Modules->Attach(eventlist, this, 2);
29 void OnRehash(User* user)
32 url = MyConf.ReadValue("security", "maphide", 0);
35 ModResult OnPreCommand(std::string &command, std::vector<std::string> ¶meters, LocalUser *user, bool validated, const std::string &original_line)
37 if (!IS_OPER(user) && !url.empty() && (command == "MAP" || command == "LINKS"))
39 user->WriteServ("NOTICE %s :/%s has been disabled; visit %s", user->nick.c_str(), command.c_str(), url.c_str());
43 return MOD_RES_PASSTHRU;
46 virtual ~ModuleMapHide()
50 virtual Version GetVersion()
52 return Version("Hide /MAP and /LINKS in the same form as ircu (mostly useless)", VF_VENDOR);
56 MODULE_INIT(ModuleMapHide)