summaryrefslogtreecommitdiff
path: root/src/modes
diff options
context:
space:
mode:
authordanieldg <danieldg@e03df62e-2008-0410-955e-edbf42e46eb7>2009-09-02 00:49:24 +0000
committerdanieldg <danieldg@e03df62e-2008-0410-955e-edbf42e46eb7>2009-09-02 00:49:24 +0000
commit3d8ec5dbd9cfde34fcbc63ad7b9b1369866f0a33 (patch)
treea27087e7a9bfab5c9ed54a0bb5b8260b6bed0868 /src/modes
parent347dcb9ef44e19e2e2613ee7e8c7d5fbb0aca4ca (diff)
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
Diffstat (limited to 'src/modes')
-rw-r--r--src/modes/cmode_b.cpp8
-rw-r--r--src/modes/cmode_h.cpp2
-rw-r--r--src/modes/cmode_k.cpp2
-rw-r--r--src/modes/cmode_l.cpp2
-rw-r--r--src/modes/cmode_o.cpp2
-rw-r--r--src/modes/cmode_t.cpp2
-rw-r--r--src/modes/cmode_v.cpp2
-rw-r--r--src/modes/umode_o.cpp2
-rw-r--r--src/modes/umode_s.cpp2
9 files changed, 12 insertions, 12 deletions
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 &parameter, bool adding, bool servermode)
+ModeAction ModeChannelBan::OnModeChange(User* source, User*, Channel* channel, std::string &parameter, 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 &parameter, bool adding, bool servermode)
+ModeAction ModeChannelHalfOp::OnModeChange(User* source, User*, Channel* channel, std::string &parameter, 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 &parameter, bool adding, bool servermode)
+ModeAction ModeChannelKey::OnModeChange(User* source, User*, Channel* channel, std::string &parameter, 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 &parameter, bool adding, bool servermode)
+ModeAction ModeChannelLimit::OnModeChange(User*, User*, Channel* channel, std::string &parameter, 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 &parameter, bool adding, bool servermode)
+ModeAction ModeChannelOp::OnModeChange(User* source, User*, Channel* channel, std::string &parameter, 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 &parameter, bool adding, bool servermode)
+ModeAction ModeChannelVoice::OnModeChange(User* source, User*, Channel* channel, std::string &parameter, 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 &parameter, bool adding, bool servermode)
+ModeAction ModeUserServerNoticeMask::OnModeChange(User* source, User* dest, Channel*, std::string &parameter, bool adding)
{
/* Set the array fields */
if (adding)