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