1 /* +------------------------------------+
2 * | Inspire Internet Relay Chat Daemon |
3 * +------------------------------------+
5 * InspIRCd: (C) 2002-2009 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
22 ModuleServerBan(InspIRCd* Me) : Module(Me)
24 Implementation eventlist[] = { I_OnCheckBan, I_On005Numeric };
25 ServerInstance->Modules->Attach(eventlist, this, 2);
34 return Version("Extban 's' - server ban",VF_COMMON|VF_VENDOR);
37 ModResult OnCheckBan(User *user, Channel *c, const std::string& mask)
39 if (mask[0] == 's' && mask[1] == ':')
41 if (InspIRCd::Match(user->server, mask.substr(2)))
44 return MOD_RES_PASSTHRU;
47 void On005Numeric(std::string &output)
49 ServerInstance->AddExtBanChar('s');
54 MODULE_INIT(ModuleServerBan)