From 3d8ec5dbd9cfde34fcbc63ad7b9b1369866f0a33 Mon Sep 17 00:00:00 2001 From: danieldg Date: Wed, 2 Sep 2009 00:49:24 +0000 Subject: Remove "servermode" parameter, replace with IS_FAKE() which is more reliable git-svn-id: http://svn.inspircd.org/repository/trunk/inspircd@11633 e03df62e-2008-0410-955e-edbf42e46eb7 --- src/modes/cmode_b.cpp | 8 ++++---- src/modes/cmode_h.cpp | 2 +- src/modes/cmode_k.cpp | 2 +- src/modes/cmode_l.cpp | 2 +- src/modes/cmode_o.cpp | 2 +- src/modes/cmode_t.cpp | 2 +- src/modes/cmode_v.cpp | 2 +- src/modes/umode_o.cpp | 2 +- src/modes/umode_s.cpp | 2 +- 9 files changed, 12 insertions(+), 12 deletions(-) (limited to 'src/modes') 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) -- cgit v1.2.3