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: Implements extban +b s: - server name bans */
18 class ModuleServerBan : public Module
23 Implementation eventlist[] = { I_OnCheckBan, I_On005Numeric };
24 ServerInstance->Modules->Attach(eventlist, this, 2);
33 return Version("Extban 's' - server ban",VF_OPTCOMMON|VF_VENDOR);
36 ModResult OnCheckBan(User *user, Channel *c, const std::string& mask)
38 if (mask[0] == 's' && mask[1] == ':')
40 if (InspIRCd::Match(user->server, mask.substr(2)))
43 return MOD_RES_PASSTHRU;
46 void On005Numeric(std::string &output)
48 ServerInstance->AddExtBanChar('s');
53 MODULE_INIT(ModuleServerBan)