diff options
50 files changed, 91 insertions, 96 deletions
diff --git a/include/mode.h b/include/mode.h index 0f43d6db4..a6b10475d 100644 --- a/include/mode.h +++ b/include/mode.h @@ -243,7 +243,7 @@ class CoreExport ModeHandler : public classbase * @param adding This value is true when the mode is being set, or false when it is being unset. * @return MODEACTION_ALLOW to allow the mode, or MODEACTION_DENY to prevent the mode, also see the description of 'parameter'. */ - virtual ModeAction OnModeChange(User* source, User* dest, Channel* channel, std::string ¶meter, bool adding, bool servermode = false); /* Can change the mode parameter as its a ref */ + virtual ModeAction OnModeChange(User* source, User* dest, Channel* channel, std::string ¶meter, bool adding); /* Can change the mode parameter as its a ref */ /** * If your mode is a listmode, then this method will be called for displaying an item list, e.g. on MODE #channel +modechar * without any parameter or other modes in the command. @@ -330,7 +330,7 @@ class CoreExport SimpleUserModeHandler : public ModeHandler SimpleUserModeHandler(InspIRCd* Instance, Module* Creator, char modeletter) : ModeHandler(Instance, Creator, modeletter, 0, 0, false, MODETYPE_USER, false) {} virtual ~SimpleUserModeHandler() {} - virtual ModeAction OnModeChange(User* source, User* dest, Channel* channel, std::string ¶meter, bool adding, bool servermode = false); + virtual ModeAction OnModeChange(User* source, User* dest, Channel* channel, std::string ¶meter, bool adding); }; /** A prebuilt mode handler which handles a simple channel mode, e.g. no parameters, usable by any user, with no extra @@ -344,7 +344,7 @@ class CoreExport SimpleChannelModeHandler : public ModeHandler SimpleChannelModeHandler(InspIRCd* Instance, Module* Creator, char modeletter) : ModeHandler(Instance, Creator, modeletter, 0, 0, false, MODETYPE_CHANNEL, false) {} virtual ~SimpleChannelModeHandler() {} - virtual ModeAction OnModeChange(User* source, User* dest, Channel* channel, std::string ¶meter, bool adding, bool servermode = false); + virtual ModeAction OnModeChange(User* source, User* dest, Channel* channel, std::string ¶meter, bool adding); }; /** @@ -403,7 +403,7 @@ class CoreExport ModeWatcher : public classbase * @return True to allow the mode change to go ahead, false to abort it. If you abort the * change, the mode handler (and ModeWatcher::AfterMode()) will never see the mode change. */ - virtual bool BeforeMode(User* source, User* dest, Channel* channel, std::string ¶meter, bool adding, ModeType type, bool servermode = false); + virtual bool BeforeMode(User* source, User* dest, Channel* channel, std::string ¶meter, bool adding, ModeType type); /** * After the mode character has been processed by the ModeHandler, this method will be called. * @param source The sender of the mode @@ -414,7 +414,7 @@ class CoreExport ModeWatcher : public classbase * @param adding True if the mode is being added and false if it is being removed * @type The mode type, either MODETYPE_USER or MODETYPE_CHANNEL */ - virtual void AfterMode(User* source, User* dest, Channel* channel, const std::string ¶meter, bool adding, ModeType type, bool servermode = false); + virtual void AfterMode(User* source, User* dest, Channel* channel, const std::string ¶meter, bool adding, ModeType type); }; typedef std::vector<ModeWatcher*>::iterator ModeWatchIter; @@ -454,7 +454,7 @@ class CoreExport ModeParser : public classbase /** * Attempts to apply a mode change to a user or channel */ - ModeAction TryMode(User* user, User* targu, Channel* targc, bool adding, unsigned char mode, std::string ¶m, bool servermode, bool SkipACL); + ModeAction TryMode(User* user, User* targu, Channel* targc, bool adding, unsigned char mode, std::string ¶m, bool SkipACL); /** The string representing the last set of modes to be parsed. * Use GetLastParse() to get this value, to be used for display purposes. @@ -541,9 +541,8 @@ class CoreExport ModeParser : public classbase * @param user The user setting or removing the modes. When the modes are set * by a server, an 'uninitialized' User is used, where *user::nick == NULL * and *user->server == NULL. - * @param servermode True if a server is setting the mode. */ - void Process(const std::vector<std::string>& parameters, User *user, bool servermode, bool merge = false); + void Process(const std::vector<std::string>& parameters, User *user, bool merge = false); /** Find the mode handler for a given mode and type. * @param modeletter mode letter to search for diff --git a/include/modes/cmode_b.h b/include/modes/cmode_b.h index db4a13508..3e4683840 100644 --- a/include/modes/cmode_b.h +++ b/include/modes/cmode_b.h @@ -24,8 +24,8 @@ class ModeChannelBan : public ModeHandler BanItem b; public: ModeChannelBan(InspIRCd* Instance); - ModeAction OnModeChange(User* source, User* dest, Channel* channel, std::string ¶meter, bool adding, bool servermode); - std::string& AddBan(User *user,std::string& dest,Channel *chan,int status, bool servermode); + ModeAction OnModeChange(User* source, User* dest, Channel* channel, std::string ¶meter, bool adding); + std::string& AddBan(User *user,std::string& dest,Channel *chan,int status); std::string& DelBan(User *user,std::string& dest,Channel *chan,int status); void DisplayList(User* user, Channel* channel); void DisplayEmptyList(User* user, Channel* channel); diff --git a/include/modes/cmode_h.h b/include/modes/cmode_h.h index 0873c20e6..cd6d260f4 100644 --- a/include/modes/cmode_h.h +++ b/include/modes/cmode_h.h @@ -23,7 +23,7 @@ class ModeChannelHalfOp : public ModeHandler private: public: ModeChannelHalfOp(InspIRCd* Instance); - ModeAction OnModeChange(User* source, User* dest, Channel* channel, std::string ¶meter, bool adding, bool servermode); + ModeAction OnModeChange(User* source, User* dest, Channel* channel, std::string ¶meter, bool adding); std::string AddHalfOp(User *user,const char *dest,Channel *chan,int status); std::string DelHalfOp(User *user,const char *dest,Channel *chan,int status); ModePair ModeSet(User* source, User* dest, Channel* channel, const std::string ¶meter); diff --git a/include/modes/cmode_k.h b/include/modes/cmode_k.h index 671143be6..a84adff5f 100644 --- a/include/modes/cmode_k.h +++ b/include/modes/cmode_k.h @@ -21,7 +21,7 @@ class ModeChannelKey : public ModeHandler { public: ModeChannelKey(InspIRCd* Instance); - ModeAction OnModeChange(User* source, User* dest, Channel* channel, std::string ¶meter, bool adding, bool servermode); + ModeAction OnModeChange(User* source, User* dest, Channel* channel, std::string ¶meter, bool adding); ModePair ModeSet(User* source, User* dest, Channel* channel, const std::string ¶meter); void RemoveMode(Channel* channel, irc::modestacker* stack = NULL); void RemoveMode(User* user, irc::modestacker* stack = NULL); diff --git a/include/modes/cmode_l.h b/include/modes/cmode_l.h index eba711095..a2f1030a2 100644 --- a/include/modes/cmode_l.h +++ b/include/modes/cmode_l.h @@ -21,7 +21,7 @@ class ModeChannelLimit : public ModeHandler { public: ModeChannelLimit(InspIRCd* Instance); - ModeAction OnModeChange(User* source, User* dest, Channel* channel, std::string ¶meter, bool adding, bool servermode); + ModeAction OnModeChange(User* source, User* dest, Channel* channel, std::string ¶meter, bool adding); ModePair ModeSet(User* source, User* dest, Channel* channel, const std::string ¶meter); bool CheckTimeStamp(std::string &their_param, const std::string &our_param, Channel* channel); }; diff --git a/include/modes/cmode_o.h b/include/modes/cmode_o.h index 9063d2e3c..f0b3154e2 100644 --- a/include/modes/cmode_o.h +++ b/include/modes/cmode_o.h @@ -23,7 +23,7 @@ class ModeChannelOp : public ModeHandler private: public: ModeChannelOp(InspIRCd* Instance); - ModeAction OnModeChange(User* source, User* dest, Channel* channel, std::string ¶meter, bool adding, bool servermode); + ModeAction OnModeChange(User* source, User* dest, Channel* channel, std::string ¶meter, bool adding); std::string AddOp(User *user,const char *dest,Channel *chan,int status); std::string DelOp(User *user,const char *dest,Channel *chan,int status); ModePair ModeSet(User* source, User* dest, Channel* channel, const std::string ¶meter); diff --git a/include/modes/cmode_t.h b/include/modes/cmode_t.h index 55226b6da..b7f87e614 100644 --- a/include/modes/cmode_t.h +++ b/include/modes/cmode_t.h @@ -21,5 +21,5 @@ class ModeChannelTopicOps : public ModeHandler { public: ModeChannelTopicOps(InspIRCd* Instance); - ModeAction OnModeChange(User* source, User* dest, Channel* channel, std::string ¶meter, bool adding, bool servermode); + ModeAction OnModeChange(User* source, User* dest, Channel* channel, std::string ¶meter, bool adding); }; diff --git a/include/modes/cmode_v.h b/include/modes/cmode_v.h index 61fc55823..06a6ce5a5 100644 --- a/include/modes/cmode_v.h +++ b/include/modes/cmode_v.h @@ -23,7 +23,7 @@ class ModeChannelVoice : public ModeHandler private: public: ModeChannelVoice(InspIRCd* Instance); - ModeAction OnModeChange(User* source, User* dest, Channel* channel, std::string ¶meter, bool adding, bool servermode); + ModeAction OnModeChange(User* source, User* dest, Channel* channel, std::string ¶meter, bool adding); std::string AddVoice(User *user,const char *dest,Channel *chan,int status); std::string DelVoice(User *user,const char *dest,Channel *chan,int status); ModePair ModeSet(User* source, User* dest, Channel* channel, const std::string ¶meter); diff --git a/include/modes/umode_o.h b/include/modes/umode_o.h index c297bc035..9a3439ba7 100644 --- a/include/modes/umode_o.h +++ b/include/modes/umode_o.h @@ -21,6 +21,6 @@ class ModeUserOperator : public ModeHandler { public: ModeUserOperator(InspIRCd* Instance); - ModeAction OnModeChange(User* source, User* dest, Channel* channel, std::string ¶meter, bool adding, bool servermode); + ModeAction OnModeChange(User* source, User* dest, Channel* channel, std::string ¶meter, bool adding); unsigned int GetCount(); }; diff --git a/include/modes/umode_s.h b/include/modes/umode_s.h index 39e74489e..ac85050f8 100644 --- a/include/modes/umode_s.h +++ b/include/modes/umode_s.h @@ -21,7 +21,7 @@ class ModeUserServerNoticeMask : public ModeHandler { public: ModeUserServerNoticeMask(InspIRCd* Instance); - ModeAction OnModeChange(User* source, User* dest, Channel* channel, std::string ¶meter, bool adding, bool servermode); + ModeAction OnModeChange(User* source, User* dest, Channel* channel, std::string ¶meter, bool adding); void OnParameterMissing(User* user, User* dest, Channel* channel); std::string GetUserParameter(User* user); }; diff --git a/include/modules.h b/include/modules.h index f220e1692..c4a2e80c8 100644 --- a/include/modules.h +++ b/include/modules.h @@ -1160,7 +1160,7 @@ class CoreExport Module : public Extensible * to skip all permission checking. Please note that for remote mode changes, your return value * will be ignored! */ - virtual int OnRawMode(User* user, Channel* chan, const char mode, const std::string ¶m, bool adding, int pcnt, bool servermode = true); + virtual int OnRawMode(User* user, Channel* chan, const char mode, const std::string ¶m, bool adding, int pcnt); /** Called whenever a user joins a channel, to determine if key checks should go ahead or not. * This method will always be called for each join, wether or not the channel is actually +k, and diff --git a/include/u_listmode.h b/include/u_listmode.h index d6e534e07..773ca421f 100644 --- a/include/u_listmode.h +++ b/include/u_listmode.h @@ -268,7 +268,7 @@ class ListModeBase : public ModeHandler /** Handle the list mode. * See mode.h */ - virtual ModeAction OnModeChange(User* source, User*, Channel* channel, std::string ¶meter, bool adding, bool servermode) + virtual ModeAction OnModeChange(User* source, User*, Channel* channel, std::string ¶meter, bool adding) { // Try and grab the list modelist* el; @@ -326,7 +326,7 @@ class ListModeBase : public ModeHandler // And now add the mask onto the list... ListItem e; e.mask = parameter; - e.nick = servermode ? ServerInstance->Config->ServerName : source->nick; + e.nick = source->nick; e.time = stringtime(ServerInstance); el->push_back(e); diff --git a/src/mode.cpp b/src/mode.cpp index e31855e77..a89227982 100644 --- a/src/mode.cpp +++ b/src/mode.cpp @@ -126,7 +126,7 @@ std::string ModeHandler::GetUserParameter(User* user) return ""; } -ModeAction ModeHandler::OnModeChange(User*, User*, Channel*, std::string&, bool, bool) +ModeAction ModeHandler::OnModeChange(User*, User*, Channel*, std::string&, bool) { return MODEACTION_DENY; } @@ -160,7 +160,7 @@ bool ModeHandler::CheckTimeStamp(std::string& theirs, const std::string& ours, C return (theirs < ours); } -ModeAction SimpleUserModeHandler::OnModeChange(User* source, User* dest, Channel* channel, std::string ¶meter, bool adding, bool servermode) +ModeAction SimpleUserModeHandler::OnModeChange(User* source, User* dest, Channel* channel, std::string ¶meter, bool adding) { if (adding) { @@ -183,7 +183,7 @@ ModeAction SimpleUserModeHandler::OnModeChange(User* source, User* dest, Channel } -ModeAction SimpleChannelModeHandler::OnModeChange(User* source, User* dest, Channel* channel, std::string ¶meter, bool adding, bool servermode) +ModeAction SimpleChannelModeHandler::OnModeChange(User* source, User* dest, Channel* channel, std::string ¶meter, bool adding) { if (adding) { @@ -223,12 +223,12 @@ ModeType ModeWatcher::GetModeType() return m_type; } -bool ModeWatcher::BeforeMode(User*, User*, Channel*, std::string&, bool, ModeType, bool) +bool ModeWatcher::BeforeMode(User*, User*, Channel*, std::string&, bool, ModeType) { return true; } -void ModeWatcher::AfterMode(User*, User*, Channel*, const std::string&, bool, ModeType, bool) +void ModeWatcher::AfterMode(User*, User*, Channel*, const std::string&, bool, ModeType) { } @@ -342,7 +342,7 @@ void ModeParser::DisplayCurrentModes(User *user, User* targetuser, Channel* targ } ModeAction ModeParser::TryMode(User* user, User* targetuser, Channel* chan, bool adding, const unsigned char modechar, - std::string ¶meter, bool servermode, bool SkipACL) + std::string ¶meter, bool SkipACL) { ModeType type = chan ? MODETYPE_CHANNEL : MODETYPE_USER; unsigned char mask = chan ? MASK_CHANNEL : MASK_USER; @@ -351,7 +351,7 @@ ModeAction ModeParser::TryMode(User* user, User* targetuser, Channel* chan, bool int pcnt = mh->GetNumParams(adding); int MOD_RESULT = 0; - FOREACH_RESULT(I_OnRawMode, OnRawMode(user, chan, modechar, parameter, adding, pcnt, servermode)); + FOREACH_RESULT(I_OnRawMode, OnRawMode(user, chan, modechar, parameter, adding, pcnt)); if (IS_LOCAL(user) && (MOD_RESULT == ACR_DENY)) return MODEACTION_DENY; @@ -397,7 +397,7 @@ ModeAction ModeParser::TryMode(User* user, User* targetuser, Channel* chan, bool for (ModeWatchIter watchers = modewatchers[handler_id].begin(); watchers != modewatchers[handler_id].end(); watchers++) { - if ((*watchers)->BeforeMode(user, targetuser, chan, parameter, adding, type, servermode) == false) + if ((*watchers)->BeforeMode(user, targetuser, chan, parameter, adding, type) == false) return MODEACTION_DENY; /* A module whacked the parameter completely, and there was one. abort. */ if (pcnt && parameter.empty()) @@ -432,7 +432,7 @@ ModeAction ModeParser::TryMode(User* user, User* targetuser, Channel* chan, bool } /* Call the handler for the mode */ - ModeAction ma = mh->OnModeChange(user, targetuser, chan, parameter, adding, servermode); + ModeAction ma = mh->OnModeChange(user, targetuser, chan, parameter, adding); if (pcnt && parameter.empty()) return MODEACTION_DENY; @@ -450,12 +450,12 @@ ModeAction ModeParser::TryMode(User* user, User* targetuser, Channel* chan, bool } for (ModeWatchIter watchers = modewatchers[handler_id].begin(); watchers != modewatchers[handler_id].end(); watchers++) - (*watchers)->AfterMode(user, targetuser, chan, parameter, adding, type, servermode); + (*watchers)->AfterMode(user, targetuser, chan, parameter, adding, type); return MODEACTION_ALLOW; } -void ModeParser::Process(const std::vector<std::string>& parameters, User *user, bool servermode, bool merge) +void ModeParser::Process(const std::vector<std::string>& parameters, User *user, bool merge) { std::string target = parameters[0]; Channel* targetchannel = ServerInstance->FindChan(target); @@ -481,7 +481,7 @@ void ModeParser::Process(const std::vector<std::string>& parameters, User *user, bool SkipAccessChecks = false; - if (servermode || !IS_LOCAL(user) || ServerInstance->ULine(user->server)) + if (!IS_LOCAL(user) || ServerInstance->ULine(user->server)) { SkipAccessChecks = true; } @@ -555,7 +555,7 @@ void ModeParser::Process(const std::vector<std::string>& parameters, User *user, } } - ModeAction ma = TryMode(user, targetuser, targetchannel, adding, modechar, parameter, servermode, SkipAccessChecks); + ModeAction ma = TryMode(user, targetuser, targetchannel, adding, modechar, parameter, SkipAccessChecks); if (ma != MODEACTION_ALLOW) continue; @@ -593,16 +593,12 @@ void ModeParser::Process(const std::vector<std::string>& parameters, User *user, LastParse.append(output_mode); LastParse.append(output_parameters.str()); - if (!user && targetchannel) - targetchannel->WriteChannelWithServ(ServerInstance->Config->ServerName, "MODE %s", LastParse.c_str()); - else if (!user && targetuser) - targetuser->WriteServ("MODE %s", LastParse.c_str()); - else if (targetchannel) + if (targetchannel) { targetchannel->WriteChannel(user, "MODE %s", LastParse.c_str()); FOREACH_MOD(I_OnMode,OnMode(user, targetchannel, TYPE_CHANNEL, LastParseParams, LastParseTranslate)); } - else if (targetuser) + else { targetuser->WriteFrom(user, "MODE %s", LastParse.c_str()); FOREACH_MOD(I_OnMode,OnMode(user, targetuser, TYPE_USER, LastParseParams, LastParseTranslate)); @@ -1033,7 +1029,7 @@ void ModeHandler::RemoveMode(User* user, irc::modestacker* stack) sprintf(moderemove,"-%c",this->GetModeChar()); parameters.push_back(user->nick); parameters.push_back(moderemove); - ServerInstance->Modes->Process(parameters, ServerInstance->FakeClient, true); + ServerInstance->Modes->Process(parameters, ServerInstance->FakeClient); } } } diff --git a/src/modes/cmode_b.cpp b/src/modes/cmode_b.cpp index 595bdb99e..415d33c30 100644 --- a/src/modes/cmode_b.cpp +++ b/src/modes/cmode_b.cpp @@ -29,13 +29,13 @@ ModeChannelBan::ModeChannelBan(InspIRCd* Instance) : ModeHandler(Instance, NULL, { } -ModeAction ModeChannelBan::OnModeChange(User* source, User*, Channel* channel, std::string ¶meter, bool adding, bool servermode) +ModeAction ModeChannelBan::OnModeChange(User* source, User*, Channel* channel, std::string ¶meter, bool adding) { int status = channel->GetStatus(source); /* Call the correct method depending on wether we're adding or removing the mode */ if (adding) { - parameter = this->AddBan(source, parameter, channel, status, servermode); + parameter = this->AddBan(source, parameter, channel, status); } else { @@ -92,7 +92,7 @@ void ModeChannelBan::DisplayEmptyList(User* user, Channel* channel) user->WriteServ("368 %s %s :End of channel ban list",user->nick.c_str(), channel->name.c_str()); } -std::string& ModeChannelBan::AddBan(User *user, std::string &dest, Channel *chan, int, bool servermode) +std::string& ModeChannelBan::AddBan(User *user, std::string &dest, Channel *chan, int) { if ((!user) || (!chan)) { @@ -135,7 +135,7 @@ std::string& ModeChannelBan::AddBan(User *user, std::string &dest, Channel *chan b.set_time = ServerInstance->Time(); b.data.assign(dest, 0, MAXBUF); - b.set_by.assign(servermode ? ServerInstance->Config->ServerName : user->nick, 0, 64); + b.set_by.assign(user->nick, 0, 64); chan->bans.push_back(b); return dest; } diff --git a/src/modes/cmode_h.cpp b/src/modes/cmode_h.cpp index 24eacdb24..ce4a0ac56 100644 --- a/src/modes/cmode_h.cpp +++ b/src/modes/cmode_h.cpp @@ -75,7 +75,7 @@ void ModeChannelHalfOp::RemoveMode(User*, irc::modestacker* stack) { } -ModeAction ModeChannelHalfOp::OnModeChange(User* source, User*, Channel* channel, std::string ¶meter, bool adding, bool servermode) +ModeAction ModeChannelHalfOp::OnModeChange(User* source, User*, Channel* channel, std::string ¶meter, bool adding) { int status = channel->GetStatus(source); diff --git a/src/modes/cmode_k.cpp b/src/modes/cmode_k.cpp index 4ffc24686..c785f6705 100644 --- a/src/modes/cmode_k.cpp +++ b/src/modes/cmode_k.cpp @@ -61,7 +61,7 @@ void ModeChannelKey::RemoveMode(User*, irc::modestacker* stack) { } -ModeAction ModeChannelKey::OnModeChange(User* source, User*, Channel* channel, std::string ¶meter, bool adding, bool servermode) +ModeAction ModeChannelKey::OnModeChange(User* source, User*, Channel* channel, std::string ¶meter, bool adding) { bool exists = channel->IsModeSet('k'); if (IS_LOCAL(source)) diff --git a/src/modes/cmode_l.cpp b/src/modes/cmode_l.cpp index e0293de72..a2ba07f10 100644 --- a/src/modes/cmode_l.cpp +++ b/src/modes/cmode_l.cpp @@ -40,7 +40,7 @@ bool ModeChannelLimit::CheckTimeStamp(std::string &their_param, const std::strin return (atoi(their_param.c_str()) < atoi(our_param.c_str())); } -ModeAction ModeChannelLimit::OnModeChange(User*, User*, Channel* channel, std::string ¶meter, bool adding, bool servermode) +ModeAction ModeChannelLimit::OnModeChange(User*, User*, Channel* channel, std::string ¶meter, bool adding) { if (adding) { diff --git a/src/modes/cmode_o.cpp b/src/modes/cmode_o.cpp index cadd7ee26..9a271f9a6 100644 --- a/src/modes/cmode_o.cpp +++ b/src/modes/cmode_o.cpp @@ -73,7 +73,7 @@ void ModeChannelOp::RemoveMode(User*, irc::modestacker* stack) { } -ModeAction ModeChannelOp::OnModeChange(User* source, User*, Channel* channel, std::string ¶meter, bool adding, bool servermode) +ModeAction ModeChannelOp::OnModeChange(User* source, User*, Channel* channel, std::string ¶meter, bool adding) { int status = channel->GetStatus(source); diff --git a/src/modes/cmode_t.cpp b/src/modes/cmode_t.cpp index ca6a4a105..6424e1f6c 100644 --- a/src/modes/cmode_t.cpp +++ b/src/modes/cmode_t.cpp @@ -21,7 +21,7 @@ ModeChannelTopicOps::ModeChannelTopicOps(InspIRCd* Instance) : ModeHandler(Insta { } -ModeAction ModeChannelTopicOps::OnModeChange(User*, User*, Channel* channel, std::string&, bool adding, bool servermode) +ModeAction ModeChannelTopicOps::OnModeChange(User*, User*, Channel* channel, std::string&, bool adding) { if (channel->modes[CM_TOPICLOCK] != adding) { diff --git a/src/modes/cmode_v.cpp b/src/modes/cmode_v.cpp index cba8e7fd0..22cfb19ef 100644 --- a/src/modes/cmode_v.cpp +++ b/src/modes/cmode_v.cpp @@ -73,7 +73,7 @@ void ModeChannelVoice::RemoveMode(User*, irc::modestacker* stack) { } -ModeAction ModeChannelVoice::OnModeChange(User* source, User*, Channel* channel, std::string ¶meter, bool adding, bool servermode) +ModeAction ModeChannelVoice::OnModeChange(User* source, User*, Channel* channel, std::string ¶meter, bool adding) { int status = channel->GetStatus(source); diff --git a/src/modes/umode_o.cpp b/src/modes/umode_o.cpp index 6848f6e17..02550ffe5 100644 --- a/src/modes/umode_o.cpp +++ b/src/modes/umode_o.cpp @@ -21,7 +21,7 @@ ModeUserOperator::ModeUserOperator(InspIRCd* Instance) : ModeHandler(Instance, N { } -ModeAction ModeUserOperator::OnModeChange(User* source, User* dest, Channel*, std::string&, bool adding, bool servermode) +ModeAction ModeUserOperator::OnModeChange(User* source, User* dest, Channel*, std::string&, bool adding) { /* Only opers can execute this class at all */ if (!ServerInstance->ULine(source->nick.c_str()) && !ServerInstance->ULine(source->server) && source->oper.empty()) diff --git a/src/modes/umode_s.cpp b/src/modes/umode_s.cpp index 8bac7cd53..c45c185dc 100644 --- a/src/modes/umode_s.cpp +++ b/src/modes/umode_s.cpp @@ -21,7 +21,7 @@ ModeUserServerNoticeMask::ModeUserServerNoticeMask(InspIRCd* Instance) : ModeHan { } -ModeAction ModeUserServerNoticeMask::OnModeChange(User* source, User* dest, Channel*, std::string ¶meter, bool adding, bool servermode) +ModeAction ModeUserServerNoticeMask::OnModeChange(User* source, User* dest, Channel*, std::string ¶meter, bool adding) { /* Set the array fields */ if (adding) diff --git a/src/modules.cpp b/src/modules.cpp index ed85bedee..62a156ac6 100644 --- a/src/modules.cpp +++ b/src/modules.cpp @@ -141,7 +141,7 @@ bool Module::OnCheckReady(User*) { return true; } int Module::OnUserRegister(User*) { return 0; } int Module::OnUserPreKick(User*, User*, Channel*, const std::string&) { return 0; } void Module::OnUserKick(User*, User*, Channel*, const std::string&, bool&) { } -int Module::OnRawMode(User*, Channel*, const char, const std::string &, bool, int, bool) { return 0; } +int Module::OnRawMode(User*, Channel*, const char, const std::string &, bool, int) { return 0; } int Module::OnCheckInvite(User*, Channel*) { return 0; } int Module::OnCheckKey(User*, Channel*, const std::string&) { return 0; } int Module::OnCheckLimit(User*, Channel*) { return 0; } @@ -764,7 +764,7 @@ void InspIRCd::AddCommand(Command *f) void InspIRCd::SendMode(const std::vector<std::string>& parameters, User *user) { - this->Modes->Process(parameters, user, true); + this->Modes->Process(parameters, user); } void InspIRCd::DumpText(User* User, const std::string &LinePrefix, std::stringstream &TextStream) diff --git a/src/modules/m_auditorium.cpp b/src/modules/m_auditorium.cpp index ae5fba018..594dccf90 100644 --- a/src/modules/m_auditorium.cpp +++ b/src/modules/m_auditorium.cpp @@ -20,7 +20,7 @@ class AuditoriumMode : public ModeHandler public: AuditoriumMode(InspIRCd* Instance, Module* Creator) : ModeHandler(Instance, Creator, 'u', 0, 0, false, MODETYPE_CHANNEL, false, 0, '@') { } - ModeAction OnModeChange(User* source, User* dest, Channel* channel, std::string ¶meter, bool adding, bool) + ModeAction OnModeChange(User* source, User* dest, Channel* channel, std::string ¶meter, bool adding) { if (channel->IsModeSet('u') != adding) { diff --git a/src/modules/m_banredirect.cpp b/src/modules/m_banredirect.cpp index 8bbdc1edc..316225893 100644 --- a/src/modules/m_banredirect.cpp +++ b/src/modules/m_banredirect.cpp @@ -42,7 +42,7 @@ class BanRedirect : public ModeWatcher { } - bool BeforeMode(User* source, User* dest, Channel* channel, std::string ¶m, bool adding, ModeType type, bool) + bool BeforeMode(User* source, User* dest, Channel* channel, std::string ¶m, bool adding, ModeType type) { /* nick!ident@host -> nick!ident@host * nick!ident@host#chan -> nick!ident@host#chan diff --git a/src/modules/m_chanprotect.cpp b/src/modules/m_chanprotect.cpp index 6301f56cb..e436e9225 100644 --- a/src/modules/m_chanprotect.cpp +++ b/src/modules/m_chanprotect.cpp @@ -179,7 +179,7 @@ class ChanFounder : public ModeHandler, public FounderProtectBase { } - ModeAction OnModeChange(User* source, User* dest, Channel* channel, std::string ¶meter, bool adding, bool) + ModeAction OnModeChange(User* source, User* dest, Channel* channel, std::string ¶meter, bool adding) { User* theuser = FounderProtectBase::FindAndVerify(parameter, channel); @@ -255,7 +255,7 @@ class ChanProtect : public ModeHandler, public FounderProtectBase { } - ModeAction OnModeChange(User* source, User* dest, Channel* channel, std::string ¶meter, bool adding, bool) + ModeAction OnModeChange(User* source, User* dest, Channel* channel, std::string ¶meter, bool adding) { User* theuser = FounderProtectBase::FindAndVerify(parameter, channel); diff --git a/src/modules/m_cloaking.cpp b/src/modules/m_cloaking.cpp index 77316a346..43f73bfe0 100644 --- a/src/modules/m_cloaking.cpp +++ b/src/modules/m_cloaking.cpp @@ -67,7 +67,7 @@ class CloakUser : public ModeHandler { } - ModeAction OnModeChange(User* source, User* dest, Channel* channel, std::string ¶meter, bool adding, bool) + ModeAction OnModeChange(User* source, User* dest, Channel* channel, std::string ¶meter, bool adding) { /* For remote clients, we dont take any action, we just allow it. * The local server where they are will set their cloak instead. diff --git a/src/modules/m_commonchans.cpp b/src/modules/m_commonchans.cpp index 4aa420d1f..71639c51e 100644 --- a/src/modules/m_commonchans.cpp +++ b/src/modules/m_commonchans.cpp @@ -22,7 +22,7 @@ class PrivacyMode : public ModeHandler public: PrivacyMode(InspIRCd* Instance, Module* Creator) : ModeHandler(Instance, Creator, 'c', 0, 0, false, MODETYPE_USER, false) { } - ModeAction OnModeChange(User* source, User* dest, Channel* channel, std::string ¶meter, bool adding, bool) + ModeAction OnModeChange(User* source, User* dest, Channel* channel, std::string ¶meter, bool adding) { if (adding) { diff --git a/src/modules/m_deaf.cpp b/src/modules/m_deaf.cpp index c3b31c873..0600d1ab9 100644 --- a/src/modules/m_deaf.cpp +++ b/src/modules/m_deaf.cpp @@ -22,7 +22,7 @@ class User_d : public ModeHandler public: User_d(InspIRCd* Instance, Module* Creator) : ModeHandler(Instance, Creator, 'd', 0, 0, false, MODETYPE_USER, false) { } - ModeAction OnModeChange(User* source, User* dest, Channel* channel, std::string ¶meter, bool adding, bool) + ModeAction OnModeChange(User* source, User* dest, Channel* channel, std::string ¶meter, bool adding) { if (adding) { diff --git a/src/modules/m_delayjoin.cpp b/src/modules/m_delayjoin.cpp index 5f5a95432..d9eb83c48 100644 --- a/src/modules/m_delayjoin.cpp +++ b/src/modules/m_delayjoin.cpp @@ -21,7 +21,7 @@ class DelayJoinMode : public ModeHandler public: DelayJoinMode(InspIRCd* Instance, Module* Parent) : ModeHandler(Instance, Parent, 'D', 0, 0, false, MODETYPE_CHANNEL, false, 0, '@') {}; - ModeAction OnModeChange(User* source, User* dest, Channel* channel, std::string ¶meter, bool adding, bool); + ModeAction OnModeChange(User* source, User* dest, Channel* channel, std::string ¶meter, bool adding); }; class ModuleDelayJoin : public Module @@ -52,7 +52,7 @@ class ModuleDelayJoin : public Module /* $ModDesc: Allows for delay-join channels (+D) where users dont appear to join until they speak */ -ModeAction DelayJoinMode::OnModeChange(User* source, User* dest, Channel* channel, std::string ¶meter, bool adding, bool) +ModeAction DelayJoinMode::OnModeChange(User* source, User* dest, Channel* channel, std::string ¶meter, bool adding) { /* no change */ if (channel->IsModeSet('D') == adding) diff --git a/src/modules/m_delaymsg.cpp b/src/modules/m_delaymsg.cpp index 54a0f75d4..c40439ea8 100644 --- a/src/modules/m_delaymsg.cpp +++ b/src/modules/m_delaymsg.cpp @@ -39,7 +39,7 @@ class DelayMsgMode : public ModeHandler return (atoi(their_param.c_str()) < atoi(our_param.c_str())); } - ModeAction OnModeChange(User* source, User* dest, Channel* channel, std::string ¶meter, bool adding, bool); + ModeAction OnModeChange(User* source, User* dest, Channel* channel, std::string ¶meter, bool adding); }; class ModuleDelayMsg : public Module @@ -65,7 +65,7 @@ class ModuleDelayMsg : public Module /* $ModDesc: Allows for delay-join channels (+D) where users dont appear to join until they speak */ -ModeAction DelayMsgMode::OnModeChange(User* source, User* dest, Channel* channel, std::string ¶meter, bool adding, bool) +ModeAction DelayMsgMode::OnModeChange(User* source, User* dest, Channel* channel, std::string ¶meter, bool adding) { if (adding) { diff --git a/src/modules/m_helpop.cpp b/src/modules/m_helpop.cpp index 1064714a2..d8a544039 100644 --- a/src/modules/m_helpop.cpp +++ b/src/modules/m_helpop.cpp @@ -24,7 +24,7 @@ class Helpop : public ModeHandler public: Helpop(InspIRCd* Instance, Module* Creator) : ModeHandler(Instance, Creator, 'h', 0, 0, false, MODETYPE_USER, true) { } - ModeAction OnModeChange(User* source, User* dest, Channel* channel, std::string ¶meter, bool adding, bool) + ModeAction OnModeChange(User* source, User* dest, Channel* channel, std::string ¶meter, bool adding) { if (adding) { diff --git a/src/modules/m_hidechans.cpp b/src/modules/m_hidechans.cpp index 137bab92b..070a3ce53 100644 --- a/src/modules/m_hidechans.cpp +++ b/src/modules/m_hidechans.cpp @@ -22,7 +22,7 @@ class HideChans : public ModeHandler public: HideChans(InspIRCd* Instance, Module* Creator) : ModeHandler(Instance, Creator, 'I', 0, 0, false, MODETYPE_USER, false) { } - ModeAction OnModeChange(User* source, User* dest, Channel* channel, std::string ¶meter, bool adding, bool) + ModeAction OnModeChange(User* source, User* dest, Channel* channel, std::string ¶meter, bool adding) { if (adding) { diff --git a/src/modules/m_hideoper.cpp b/src/modules/m_hideoper.cpp index 51d1259ed..be4de8f8d 100644 --- a/src/modules/m_hideoper.cpp +++ b/src/modules/m_hideoper.cpp @@ -22,7 +22,7 @@ class HideOper : public ModeHandler public: HideOper(InspIRCd* Instance, Module* Creator) : ModeHandler(Instance, Creator, 'H', 0, 0, false, MODETYPE_USER, true) { } - ModeAction OnModeChange(User* source, User* dest, Channel* channel, std::string ¶meter, bool adding, bool) + ModeAction OnModeChange(User* source, User* dest, Channel* channel, std::string ¶meter, bool adding) { if (adding) { diff --git a/src/modules/m_invisible.cpp b/src/modules/m_invisible.cpp index 4a3846ce4..7ccd8188b 100644 --- a/src/modules/m_invisible.cpp +++ b/src/modules/m_invisible.cpp @@ -53,7 +53,7 @@ class InvisibleMode : public ModeHandler delete qo; } - ModeAction OnModeChange(User* source, User* dest, Channel* channel, std::string ¶meter, bool adding, bool) + ModeAction OnModeChange(User* source, User* dest, Channel* channel, std::string ¶meter, bool adding) { if (dest->IsModeSet('Q') != adding) { @@ -112,7 +112,7 @@ class InvisibleDeOper : public ModeWatcher { } - bool BeforeMode(User* source, User* dest, Channel* channel, std::string ¶m, bool adding, ModeType type, bool) + bool BeforeMode(User* source, User* dest, Channel* channel, std::string ¶m, bool adding, ModeType type) { /* Users who are opers and have +Q get their +Q removed when they deoper */ if ((!adding) && (dest->IsModeSet('Q'))) @@ -120,7 +120,7 @@ class InvisibleDeOper : public ModeWatcher std::vector<std::string> newmodes; newmodes.push_back(dest->nick); newmodes.push_back("-Q"); - ServerInstance->Modes->Process(newmodes, source, true); + ServerInstance->Modes->Process(newmodes, source); } return true; } diff --git a/src/modules/m_joinflood.cpp b/src/modules/m_joinflood.cpp index ac194decd..c83df92c4 100644 --- a/src/modules/m_joinflood.cpp +++ b/src/modules/m_joinflood.cpp @@ -97,7 +97,7 @@ class JoinFlood : public ModeHandler return std::make_pair(false, parameter); } - ModeAction OnModeChange(User* source, User* dest, Channel* channel, std::string ¶meter, bool adding, bool) + ModeAction OnModeChange(User* source, User* dest, Channel* channel, std::string ¶meter, bool adding) { joinfloodsettings* dummy; diff --git a/src/modules/m_kicknorejoin.cpp b/src/modules/m_kicknorejoin.cpp index 915480ed9..5327c0592 100644 --- a/src/modules/m_kicknorejoin.cpp +++ b/src/modules/m_kicknorejoin.cpp @@ -40,7 +40,7 @@ class KickRejoin : public ModeHandler return std::make_pair(false, parameter); } - ModeAction OnModeChange(User* source, User* dest, Channel* channel, std::string ¶meter, bool adding, bool) + ModeAction OnModeChange(User* source, User* dest, Channel* channel, std::string ¶meter, bool adding) { if (!adding) { diff --git a/src/modules/m_messageflood.cpp b/src/modules/m_messageflood.cpp index 007047e10..fc62cd67e 100644 --- a/src/modules/m_messageflood.cpp +++ b/src/modules/m_messageflood.cpp @@ -87,7 +87,7 @@ class MsgFlood : public ModeHandler return std::make_pair(false, parameter); } - ModeAction OnModeChange(User* source, User* dest, Channel* channel, std::string ¶meter, bool adding, bool) + ModeAction OnModeChange(User* source, User* dest, Channel* channel, std::string ¶meter, bool adding) { floodsettings *f; diff --git a/src/modules/m_nickflood.cpp b/src/modules/m_nickflood.cpp index d0e4eaeb6..614843901 100644 --- a/src/modules/m_nickflood.cpp +++ b/src/modules/m_nickflood.cpp @@ -101,7 +101,7 @@ class NickFlood : public ModeHandler return std::make_pair(false, parameter); } - ModeAction OnModeChange(User* source, User* dest, Channel* channel, std::string ¶meter, bool adding, bool) + ModeAction OnModeChange(User* source, User* dest, Channel* channel, std::string ¶meter, bool adding) { nickfloodsettings* dummy; diff --git a/src/modules/m_noctcp.cpp b/src/modules/m_noctcp.cpp index 6f9ddf8ed..f58fd192c 100644 --- a/src/modules/m_noctcp.cpp +++ b/src/modules/m_noctcp.cpp @@ -20,7 +20,7 @@ class NoCTCP : public ModeHandler public: NoCTCP(InspIRCd* Instance, Module* Creator) : ModeHandler(Instance, Creator, 'C', 0, 0, false, MODETYPE_CHANNEL, false) { } - ModeAction OnModeChange(User* source, User* dest, Channel* channel, std::string ¶meter, bool adding, bool) + ModeAction OnModeChange(User* source, User* dest, Channel* channel, std::string ¶meter, bool adding) { if (adding) { diff --git a/src/modules/m_nonicks.cpp b/src/modules/m_nonicks.cpp index 1a8e83795..1b34c7597 100644 --- a/src/modules/m_nonicks.cpp +++ b/src/modules/m_nonicks.cpp @@ -20,7 +20,7 @@ class NoNicks : public ModeHandler public: NoNicks(InspIRCd* Instance, Module* Creator) : ModeHandler(Instance, Creator, 'N', 0, 0, false, MODETYPE_CHANNEL, false) { } - ModeAction OnModeChange(User* source, User* dest, Channel* channel, std::string ¶meter, bool adding, bool) + ModeAction OnModeChange(User* source, User* dest, Channel* channel, std::string ¶meter, bool adding) { if (adding) { diff --git a/src/modules/m_operchans.cpp b/src/modules/m_operchans.cpp index da8f2c140..f714e00f6 100644 --- a/src/modules/m_operchans.cpp +++ b/src/modules/m_operchans.cpp @@ -21,7 +21,7 @@ class OperChans : public ModeHandler /* This is an oper-only mode */ OperChans(InspIRCd* Instance, Module* Creator) : ModeHandler(Instance, Creator, 'O', 0, 0, false, MODETYPE_CHANNEL, true) { } - ModeAction OnModeChange(User* source, User* dest, Channel* channel, std::string ¶meter, bool adding, bool) + ModeAction OnModeChange(User* source, User* dest, Channel* channel, std::string ¶meter, bool adding) { if (adding) { diff --git a/src/modules/m_operprefix.cpp b/src/modules/m_operprefix.cpp index d416d5699..deb826108 100644 --- a/src/modules/m_operprefix.cpp +++ b/src/modules/m_operprefix.cpp @@ -58,9 +58,9 @@ class OperPrefixMode : public ModeHandler return OPERPREFIX_VALUE; } - ModeAction OnModeChange(User* source, User* dest, Channel* channel, std::string ¶meter, bool adding, bool servermode) + ModeAction OnModeChange(User* source, User* dest, Channel* channel, std::string ¶meter, bool adding) { - if (servermode || (source && ServerInstance->ULine(source->server))) + if (IS_FAKE(source) || (source && ServerInstance->ULine(source->server))) return MODEACTION_ALLOW; else { @@ -151,10 +151,10 @@ class ModuleOperPrefixMode : public Module } // XXX: is there a better way to do this? - virtual int OnRawMode(User* user, Channel* chan, const char mode, const std::string ¶m, bool adding, int pcnt, bool servermode) + virtual int OnRawMode(User* user, Channel* chan, const char mode, const std::string ¶m, bool adding, int pcnt) { /* force event propagation to its ModeHandler */ - if (!servermode && chan && (mode == 'y')) + if (!IS_FAKE(user) && chan && (mode == 'y')) return ACR_ALLOW; return 0; } diff --git a/src/modules/m_permchannels.cpp b/src/modules/m_permchannels.cpp index 100afea9a..f765c2422 100644 --- a/src/modules/m_permchannels.cpp +++ b/src/modules/m_permchannels.cpp @@ -23,7 +23,7 @@ class PermChannel : public ModeHandler public: PermChannel(InspIRCd* Instance, Module* Creator) : ModeHandler(Instance, Creator, 'P', 0, 0, false, MODETYPE_CHANNEL, false) { } - ModeAction OnModeChange(User* source, User* dest, Channel* channel, std::string ¶meter, bool adding, bool sm) + ModeAction OnModeChange(User* source, User* dest, Channel* channel, std::string ¶meter, bool adding) { if (!source->HasPrivPermission("channels/set-permanent")) { @@ -43,7 +43,7 @@ class PermChannel : public ModeHandler { if (channel->IsModeSet('P')) { - if (channel->GetUserCounter() == 0 && !sm) + if (channel->GetUserCounter() == 0 && !IS_FAKE(source)) { /* * ugh, ugh, UGH! diff --git a/src/modules/m_redirect.cpp b/src/modules/m_redirect.cpp index fc743402e..dd7d2e954 100644 --- a/src/modules/m_redirect.cpp +++ b/src/modules/m_redirect.cpp @@ -30,7 +30,7 @@ class Redirect : public ModeHandler return std::make_pair(false, parameter); } - ModeAction OnModeChange(User* source, User* dest, Channel* channel, std::string ¶meter, bool adding, bool server) + ModeAction OnModeChange(User* source, User* dest, Channel* channel, std::string ¶meter, bool adding) { if (adding) { @@ -44,7 +44,7 @@ class Redirect : public ModeHandler } } - if (IS_LOCAL(source) && !IS_OPER(source) && !server) + if (IS_LOCAL(source) && !IS_OPER(source)) { Channel* c = ServerInstance->FindChan(parameter); if (!c) diff --git a/src/modules/m_services_account.cpp b/src/modules/m_services_account.cpp index e32973bd0..78fbb28dc 100644 --- a/src/modules/m_services_account.cpp +++ b/src/modules/m_services_account.cpp @@ -24,7 +24,7 @@ class Channel_r : public ModeHandler public: Channel_r(InspIRCd* Instance, Module* Creator) : ModeHandler(Instance, Creator, 'r', 0, 0, false, MODETYPE_CHANNEL, false) { } - ModeAction OnModeChange(User* source, User* dest, Channel* channel, std::string ¶meter, bool adding, bool) + ModeAction OnModeChange(User* source, User* dest, Channel* channel, std::string ¶meter, bool adding) { // only a u-lined server may add or remove the +r mode. if (IS_REMOTE(source) || ServerInstance->ULine(source->nick.c_str()) || ServerInstance->ULine(source->server)) @@ -54,9 +54,9 @@ class User_r : public ModeHandler public: User_r(InspIRCd* Instance, Module* Creator) : ModeHandler(Instance, Creator, 'r', 0, 0, false, MODETYPE_USER, false) { } - ModeAction OnModeChange(User* source, User* dest, Channel* channel, std::string ¶meter, bool adding, bool servermode) + ModeAction OnModeChange(User* source, User* dest, Channel* channel, std::string ¶meter, bool adding) { - if (servermode || IS_REMOTE(source) || ServerInstance->ULine(source->nick.c_str()) || ServerInstance->ULine(source->server)) + if (IS_REMOTE(source) || ServerInstance->ULine(source->nick.c_str()) || ServerInstance->ULine(source->server)) { if ((adding && !dest->IsModeSet('r')) || (!adding && dest->IsModeSet('r'))) { diff --git a/src/modules/m_servprotect.cpp b/src/modules/m_servprotect.cpp index 9a1da8465..f4729d848 100644 --- a/src/modules/m_servprotect.cpp +++ b/src/modules/m_servprotect.cpp @@ -22,7 +22,7 @@ class ServProtectMode : public ModeHandler public: ServProtectMode(InspIRCd* Instance, Module* Creator) : ModeHandler(Instance, Creator, 'k', 0, 0, false, MODETYPE_USER, true) { } - ModeAction OnModeChange(User* source, User* dest, Channel* channel, std::string ¶meter, bool adding, bool) + ModeAction OnModeChange(User* source, User* dest, Channel* channel, std::string ¶meter, bool adding) { /* Because this returns MODEACTION_DENY all the time, there is only ONE * way to add this mode and that is at client introduction in the UID command, @@ -71,12 +71,12 @@ class ModuleServProtectMode : public Module } } - virtual int OnRawMode(User* user, Channel* chan, const char mode, const std::string ¶m, bool adding, int pcnt, bool servermode) + virtual int OnRawMode(User* user, Channel* chan, const char mode, const std::string ¶m, bool adding, int pcnt) { /* Check that the mode is not a server mode, it is being removed, the user making the change is local, there is a parameter, * and the user making the change is not a uline */ - if (!servermode && !adding && chan && IS_LOCAL(user) && !param.empty() && !ServerInstance->ULine(user->server)) + if (!adding && chan && IS_LOCAL(user) && !param.empty() && !ServerInstance->ULine(user->server)) { /* Check if the parameter is a valid nick/uuid */ diff --git a/src/modules/m_showwhois.cpp b/src/modules/m_showwhois.cpp index bbc89a2b4..c6e9ed27c 100644 --- a/src/modules/m_showwhois.cpp +++ b/src/modules/m_showwhois.cpp @@ -22,7 +22,7 @@ class SeeWhois : public ModeHandler public: SeeWhois(InspIRCd* Instance, Module* Creator, bool IsOpersOnly) : ModeHandler(Instance, Creator, 'W', 0, 0, false, MODETYPE_USER, IsOpersOnly) { } - ModeAction OnModeChange(User* source, User* dest, Channel* channel, std::string ¶meter, bool adding, bool) + ModeAction OnModeChange(User* source, User* dest, Channel* channel, std::string ¶meter, bool adding) { if (adding) { diff --git a/src/modules/m_spanningtree/fmode.cpp b/src/modules/m_spanningtree/fmode.cpp index 0328ad40b..d95c94284 100644 --- a/src/modules/m_spanningtree/fmode.cpp +++ b/src/modules/m_spanningtree/fmode.cpp @@ -97,7 +97,7 @@ bool TreeSocket::ForceMode(const std::string &source, parameterlist ¶ms) */ if (TS <= ourTS) { - ServerInstance->Modes->Process(modelist, who, (who == Utils->ServerUser), true); + ServerInstance->Modes->Process(modelist, who, true); /* HOT POTATO! PASS IT ON! */ Utils->DoOneToAllButSender(source,"FMODE",params,sourceserv); diff --git a/src/modules/m_sslmodes.cpp b/src/modules/m_sslmodes.cpp index 641d68544..b05f73326 100644 --- a/src/modules/m_sslmodes.cpp +++ b/src/modules/m_sslmodes.cpp @@ -24,7 +24,7 @@ class SSLMode : public ModeHandler public: SSLMode(InspIRCd* Instance, Module* Creator) : ModeHandler(Instance, Creator, 'z', 0, 0, false, MODETYPE_CHANNEL, false) { } - ModeAction OnModeChange(User* source, User* dest, Channel* channel, std::string ¶meter, bool adding, bool) + ModeAction OnModeChange(User* source, User* dest, Channel* channel, std::string ¶meter, bool adding) { if (adding) { |