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 * ---------------------------------------------------
15 #include "u_listmode.h"
17 /* $ModDep: ../../include/u_listmode.h */
19 /* $ModDesc: Implements extban/invex +I O: - opertype bans */
21 class ModuleOperInvex : public Module
25 ModuleOperInvex(InspIRCd* Me) : Module(Me)
27 Implementation eventlist[] = { I_OnCheckBan, I_On005Numeric };
28 ServerInstance->Modules->Attach(eventlist, this, 2);
37 return Version("ExtBan 'O' - oper type ban", VF_COMMON|VF_VENDOR);
40 ModResult OnCheckBan(User *user, Channel *c, const std::string& mask)
42 if (mask[0] == 'O' && mask[1] == ':')
44 if (IS_OPER(user) && InspIRCd::Match(user->oper, mask.substr(2)))
47 return MOD_RES_PASSTHRU;
50 virtual void On005Numeric(std::string &output)
52 ServerInstance->AddExtBanChar('O');
57 MODULE_INIT(ModuleOperInvex)