+
+
+ virtual void OnPostCommand(const std::string &command, const std::vector<std::string> ¶meters, User *user, CmdResult result, const std::string &original_line)
+ {
+ if ((NoisyOverride) && (OverriddenMode) && (irc::string(command.c_str()) == "MODE") && (result == CMD_SUCCESS))
+ {
+ int Total = OverOps + OverDeops + OverVoices + OverDevoices + OverHalfops + OverDehalfops;
+
+ ServerInstance->SNO->WriteToSnoMask('O',std::string(user->nick)+" Overriding modes: "+ServerInstance->Modes->GetLastParse()+" "+(Total ? "[Detail: " : "")+
+ (OverOps ? ConvToStr(OverOps)+" op"+(OverOps != 1 ? "s" : "")+" " : "")+
+ (OverDeops ? ConvToStr(OverDeops)+" deop"+(OverDeops != 1 ? "s" : "")+" " : "")+
+ (OverVoices ? ConvToStr(OverVoices)+" voice"+(OverVoices != 1 ? "s" : "")+" " : "")+
+ (OverDevoices ? ConvToStr(OverDevoices)+" devoice"+(OverDevoices != 1 ? "s" : "")+" " : "")+
+ (OverHalfops ? ConvToStr(OverHalfops)+" halfop"+(OverHalfops != 1 ? "s" : "")+" " : "")+
+ (OverDehalfops ? ConvToStr(OverDehalfops)+" dehalfop"+(OverDehalfops != 1 ? "s" : "") : "")
+ +(Total ? "]" : ""));
+
+ OverriddenMode = false;
+ OverOps = OverDeops = OverVoices = OverDevoices = OverHalfops = OverDehalfops = 0;
+ }
+ }
+
+ virtual void On005Numeric(std::string &output)
+ {
+ output.append(" OVERRIDE");
+ }
+
+ virtual bool CanOverride(User* source, const char* token)
+ {
+ // checks to see if the oper's type has <type:override>
+ override_t::iterator j = overrides.find(source->oper);
+
+ if (j != overrides.end())
+ {
+ // its defined or * is set, return its value as a boolean for if the token is set
+ return ((j->second.find(token, 0) != std::string::npos) || (j->second.find("*", 0) != std::string::npos));
+ }
+
+ // its not defined at all, count as false
+ return false;
+ }
+
+
+ virtual int OnLocalTopicChange(User *source, Channel *channel, const std::string &topic)