summaryrefslogtreecommitdiff
path: root/src
diff options
context:
space:
mode:
Diffstat (limited to 'src')
-rw-r--r--src/commands/cmd_lusers.cpp2
-rw-r--r--src/mode.cpp10
-rw-r--r--src/modules/m_banredirect.cpp4
-rw-r--r--src/modules/m_operprefix.cpp4
-rw-r--r--src/modules/m_timedbans.cpp2
5 files changed, 11 insertions, 11 deletions
diff --git a/src/commands/cmd_lusers.cpp b/src/commands/cmd_lusers.cpp
index 91a718090..d3dde949c 100644
--- a/src/commands/cmd_lusers.cpp
+++ b/src/commands/cmd_lusers.cpp
@@ -114,7 +114,7 @@ public:
{
}
- void AfterMode(User* source, User* dest, Channel* channel, const std::string& parameter, bool adding, ModeType type)
+ void AfterMode(User* source, User* dest, Channel* channel, const std::string& parameter, bool adding)
{
if (dest->registered != REG_ALL)
return;
diff --git a/src/mode.cpp b/src/mode.cpp
index a9ac006ae..1fc2af407 100644
--- a/src/mode.cpp
+++ b/src/mode.cpp
@@ -175,12 +175,12 @@ ModeType ModeWatcher::GetModeType()
return m_type;
}
-bool ModeWatcher::BeforeMode(User*, User*, Channel*, std::string&, bool, ModeType)
+bool ModeWatcher::BeforeMode(User*, User*, Channel*, std::string&, bool)
{
return true;
}
-void ModeWatcher::AfterMode(User*, User*, Channel*, const std::string&, bool, ModeType)
+void ModeWatcher::AfterMode(User*, User*, Channel*, const std::string&, bool)
{
}
@@ -273,7 +273,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) == false)
+ if ((*watchers)->BeforeMode(user, targetuser, chan, parameter, adding) == false)
return MODEACTION_DENY;
/* A module whacked the parameter completely, and there was one. abort. */
if (pcnt && parameter.empty())
@@ -332,7 +332,7 @@ ModeAction ModeParser::TryMode(User* user, User* targetuser, Channel* chan, bool
return ma;
for (ModeWatchIter watchers = modewatchers[handler_id].begin(); watchers != modewatchers[handler_id].end(); watchers++)
- (*watchers)->AfterMode(user, targetuser, chan, parameter, adding, type);
+ (*watchers)->AfterMode(user, targetuser, chan, parameter, adding);
return MODEACTION_ALLOW;
}
@@ -533,7 +533,7 @@ void ModeParser::DisplayListModes(User* user, Channel* chan, std::string &mode_s
{
std::string dummyparam;
- if (!((*watchers)->BeforeMode(user, NULL, chan, dummyparam, true, MODETYPE_CHANNEL)))
+ if (!((*watchers)->BeforeMode(user, NULL, chan, dummyparam, true)))
display = false;
}
if (display)
diff --git a/src/modules/m_banredirect.cpp b/src/modules/m_banredirect.cpp
index 332e625e0..8e4c5c6e5 100644
--- a/src/modules/m_banredirect.cpp
+++ b/src/modules/m_banredirect.cpp
@@ -56,7 +56,7 @@ class BanRedirect : public ModeWatcher
{
}
- bool BeforeMode(User* source, User* dest, Channel* channel, std::string &param, bool adding, ModeType type)
+ bool BeforeMode(User* source, User* dest, Channel* channel, std::string &param, bool adding)
{
/* nick!ident@host -> nick!ident@host
* nick!ident@host#chan -> nick!ident@host#chan
@@ -65,7 +65,7 @@ class BanRedirect : public ModeWatcher
* nick#chan -> nick!*@*#chan
*/
- if(channel && (type == MODETYPE_CHANNEL) && param.length())
+ if ((channel) && !param.empty())
{
BanRedirectList* redirects;
diff --git a/src/modules/m_operprefix.cpp b/src/modules/m_operprefix.cpp
index 2360ae2a4..b0737cb9a 100644
--- a/src/modules/m_operprefix.cpp
+++ b/src/modules/m_operprefix.cpp
@@ -66,7 +66,7 @@ class HideOperWatcher : public ModeWatcher
ModuleOperPrefixMode* parentmod;
public:
HideOperWatcher(ModuleOperPrefixMode* parent) : ModeWatcher((Module*) parent, 'H', MODETYPE_USER), parentmod(parent) {}
- void AfterMode(User* source, User* dest, Channel* channel, const std::string &parameter, bool adding, ModeType type);
+ void AfterMode(User* source, User* dest, Channel* channel, const std::string &parameter, bool adding);
};
class ModuleOperPrefixMode : public Module
@@ -159,7 +159,7 @@ class ModuleOperPrefixMode : public Module
}
};
-void HideOperWatcher::AfterMode(User* source, User* dest, Channel* channel, const std::string& parameter, bool adding, ModeType type)
+void HideOperWatcher::AfterMode(User* source, User* dest, Channel* channel, const std::string& parameter, bool adding)
{
if (IS_LOCAL(dest))
parentmod->SetOperPrefix(dest, !adding);
diff --git a/src/modules/m_timedbans.cpp b/src/modules/m_timedbans.cpp
index 8a4fbb4dc..90b8fccdd 100644
--- a/src/modules/m_timedbans.cpp
+++ b/src/modules/m_timedbans.cpp
@@ -119,7 +119,7 @@ class BanWatcher : public ModeWatcher
{
}
- void AfterMode(User* source, User* dest, Channel* chan, const std::string& banmask, bool adding, ModeType type)
+ void AfterMode(User* source, User* dest, Channel* chan, const std::string& banmask, bool adding)
{
if (adding)
return;