public:
ModuleStripColor(InspIRCd* Me) : Module::Module(Me)
{
- OnRehash(NULL, "");
-
usc = new UserStripColor(ServerInstance);
csc = new ChannelStripColor(ServerInstance);
void Implements(char* List)
{
- List[I_OnRehash] = List[I_OnUserPreMessage] = List[I_OnUserPreNotice] = 1;
+ List[I_OnUserPreMessage] = List[I_OnUserPreNotice] = 1;
}
virtual ~ModuleStripColor()
}
}
- virtual void OnRehash(userrec* user, const std::string ¶meter)
- {
- ConfigReader Conf(ServerInstance);
-
- AllowChanOps = Conf.ReadFlag("stripcolor", "allowchanops", 0);
- }
-
virtual int OnUserPreMessage(userrec* user,void* dest,int target_type, std::string &text, char status, CUList &exempt_list)
{
if (!IS_LOCAL(user))
// check if we allow ops to bypass filtering, if we do, check if they're opped accordingly.
// note: short circut logic here, don't wreck it. -- w00t
- if (!AllowChanOps || AllowChanOps && t->GetStatus(user) != STATUS_OP)
+ if (!CHANOPS_EXEMPT(ServerInstance, 'S') || CHANOPS_EXEMPT(ServerInstance, 'S') && t->GetStatus(user) != STATUS_OP)
active = t->IsModeSet('S');
}