summaryrefslogtreecommitdiff
path: root/src/modules
diff options
context:
space:
mode:
Diffstat (limited to 'src/modules')
-rw-r--r--src/modules/m_banredirect.cpp2
-rw-r--r--src/modules/m_channames.cpp12
-rw-r--r--src/modules/m_conn_join.cpp2
-rw-r--r--src/modules/m_denychans.cpp4
-rw-r--r--src/modules/m_nationalchars.cpp12
-rw-r--r--src/modules/m_nicklock.cpp2
-rw-r--r--src/modules/m_ojoin.cpp2
-rw-r--r--src/modules/m_operjoin.cpp4
-rw-r--r--src/modules/m_redirect.cpp2
-rw-r--r--src/modules/m_sajoin.cpp2
-rw-r--r--src/modules/m_sanick.cpp2
-rw-r--r--src/modules/m_spanningtree/svsjoin.cpp2
-rw-r--r--src/modules/m_watch.cpp4
13 files changed, 26 insertions, 26 deletions
diff --git a/src/modules/m_banredirect.cpp b/src/modules/m_banredirect.cpp
index 5e042ad79..332e625e0 100644
--- a/src/modules/m_banredirect.cpp
+++ b/src/modules/m_banredirect.cpp
@@ -137,7 +137,7 @@ class BanRedirect : public ModeWatcher
{
if (adding && IS_LOCAL(source))
{
- if (!ServerInstance->IsChannel(mask[CHAN].c_str(), ServerInstance->Config->Limits.ChanMax))
+ if (!ServerInstance->IsChannel(mask[CHAN]))
{
source->WriteNumeric(403, "%s %s :Invalid channel name in redirection (%s)", source->nick.c_str(), channel->name.c_str(), mask[CHAN].c_str());
return false;
diff --git a/src/modules/m_channames.cpp b/src/modules/m_channames.cpp
index f1704a528..9b43649a8 100644
--- a/src/modules/m_channames.cpp
+++ b/src/modules/m_channames.cpp
@@ -23,17 +23,17 @@
static std::bitset<256> allowedmap;
-class NewIsChannelHandler : public HandlerBase2<bool, const std::string&, size_t>
+class NewIsChannelHandler : public HandlerBase1<bool, const std::string&>
{
public:
NewIsChannelHandler() { }
~NewIsChannelHandler() { }
- bool Call(const std::string&, size_t);
+ bool Call(const std::string&);
};
-bool NewIsChannelHandler::Call(const std::string& channame, size_t max)
+bool NewIsChannelHandler::Call(const std::string& channame)
{
- if (channame.empty() || channame.length() > max || channame[0] != '#')
+ if (channame.empty() || channame.length() > ServerInstance->Config->Limits.ChanMax || channame[0] != '#')
return false;
for (std::string::const_iterator c = channame.begin(); c != channame.end(); ++c)
@@ -49,7 +49,7 @@ bool NewIsChannelHandler::Call(const std::string& channame, size_t max)
class ModuleChannelNames : public Module
{
NewIsChannelHandler myhandler;
- caller2<bool, const std::string&, size_t> rememberer;
+ caller1<bool, const std::string&> rememberer;
bool badchan;
public:
@@ -71,7 +71,7 @@ class ModuleChannelNames : public Module
std::vector<Channel*> chanvec;
for (chan_hash::const_iterator i = ServerInstance->chanlist->begin(); i != ServerInstance->chanlist->end(); ++i)
{
- if (!ServerInstance->IsChannel(i->second->name, MAXBUF))
+ if (!ServerInstance->IsChannel(i->second->name))
chanvec.push_back(i->second);
}
std::vector<Channel*>::reverse_iterator c2 = chanvec.rbegin();
diff --git a/src/modules/m_conn_join.cpp b/src/modules/m_conn_join.cpp
index c49afbdfc..bfac8147d 100644
--- a/src/modules/m_conn_join.cpp
+++ b/src/modules/m_conn_join.cpp
@@ -57,7 +57,7 @@ class ModuleConnJoin : public Module
while (chans.GetToken(chan))
{
- if (ServerInstance->IsChannel(chan, ServerInstance->Config->Limits.ChanMax))
+ if (ServerInstance->IsChannel(chan))
Channel::JoinUser(localuser, chan);
}
}
diff --git a/src/modules/m_denychans.cpp b/src/modules/m_denychans.cpp
index 63f6f51b9..b09ee7977 100644
--- a/src/modules/m_denychans.cpp
+++ b/src/modules/m_denychans.cpp
@@ -45,7 +45,7 @@ class ModuleDenyChannels : public Module
if (!redirect.empty())
{
- if (!ServerInstance->IsChannel(redirect, ServerInstance->Config->Limits.ChanMax))
+ if (!ServerInstance->IsChannel(redirect))
{
if (user)
user->WriteNotice("Invalid badchan redirect '" + redirect + "'");
@@ -108,7 +108,7 @@ class ModuleDenyChannels : public Module
}
}
- if (ServerInstance->IsChannel(redirect.c_str(), ServerInstance->Config->Limits.ChanMax))
+ if (ServerInstance->IsChannel(redirect))
{
/* simple way to avoid potential loops: don't redirect to +L channels */
Channel *newchan = ServerInstance->FindChan(redirect);
diff --git a/src/modules/m_nationalchars.cpp b/src/modules/m_nationalchars.cpp
index e39a41815..4e921957a 100644
--- a/src/modules/m_nationalchars.cpp
+++ b/src/modules/m_nationalchars.cpp
@@ -31,12 +31,12 @@
/* $ModDesc: Provides an ability to have non-RFC1459 nicks & support for national CASEMAPPING */
-class lwbNickHandler : public HandlerBase2<bool, const std::string&, size_t>
+class lwbNickHandler : public HandlerBase1<bool, const std::string&>
{
public:
lwbNickHandler() { }
~lwbNickHandler() { }
- bool Call(const std::string&, size_t);
+ bool Call(const std::string&);
};
/*,m_reverse_additionalUp[256];*/
@@ -71,7 +71,7 @@ char utf8size(unsigned char * mb)
/* Conditions added */
-bool lwbNickHandler::Call(const std::string& nick, size_t max)
+bool lwbNickHandler::Call(const std::string& nick)
{
if (nick.empty())
return false;
@@ -216,7 +216,7 @@ bool lwbNickHandler::Call(const std::string& nick, size_t max)
}
/* too long? or not -- pointer arithmetic rocks */
- return (p < max);
+ return (p < ServerInstance->Config->Limits.NickMax);
}
@@ -225,7 +225,7 @@ class ModuleNationalChars : public Module
lwbNickHandler myhandler;
std::string charset, casemapping;
unsigned char m_additional[256], m_additionalUp[256], m_lower[256], m_upper[256];
- caller2<bool, const std::string&, size_t> rememberer;
+ caller1<bool, const std::string&> rememberer;
bool forcequit;
const unsigned char * lowermap_rememberer;
@@ -274,7 +274,7 @@ class ModuleNationalChars : public Module
{
/* Fix by Brain: Dont quit UID users */
User* n = *iter;
- if (!isdigit(n->nick[0]) && !ServerInstance->IsNick(n->nick, ServerInstance->Config->Limits.NickMax))
+ if (!isdigit(n->nick[0]) && !ServerInstance->IsNick(n->nick))
ServerInstance->Users->QuitUser(n, message);
}
}
diff --git a/src/modules/m_nicklock.cpp b/src/modules/m_nicklock.cpp
index a6178fc5a..8e0d5ae7f 100644
--- a/src/modules/m_nicklock.cpp
+++ b/src/modules/m_nicklock.cpp
@@ -51,7 +51,7 @@ class CommandNicklock : public Command
/* Do local sanity checks and bails */
if (IS_LOCAL(user))
{
- if (!ServerInstance->IsNick(parameters[1], ServerInstance->Config->Limits.NickMax))
+ if (!ServerInstance->IsNick(parameters[1]))
{
user->WriteNotice("*** Invalid nickname '" + parameters[1] + "'");
return CMD_FAILURE;
diff --git a/src/modules/m_ojoin.cpp b/src/modules/m_ojoin.cpp
index c99e24b0f..35d90b23e 100644
--- a/src/modules/m_ojoin.cpp
+++ b/src/modules/m_ojoin.cpp
@@ -60,7 +60,7 @@ class CommandOjoin : public SplitCommand
CmdResult HandleLocal(const std::vector<std::string>& parameters, LocalUser* user)
{
// Make sure the channel name is allowable.
- if (!ServerInstance->IsChannel(parameters[0], ServerInstance->Config->Limits.ChanMax))
+ if (!ServerInstance->IsChannel(parameters[0]))
{
user->WriteNotice("*** Invalid characters in channel name or name too long");
return CMD_FAILURE;
diff --git a/src/modules/m_operjoin.cpp b/src/modules/m_operjoin.cpp
index faeeb8b55..e890c3afb 100644
--- a/src/modules/m_operjoin.cpp
+++ b/src/modules/m_operjoin.cpp
@@ -83,7 +83,7 @@ class ModuleOperjoin : public Module
return;
for (std::vector<std::string>::const_iterator i = operChans.begin(); i != operChans.end(); ++i)
- if (ServerInstance->IsChannel(*i, ServerInstance->Config->Limits.ChanMax))
+ if (ServerInstance->IsChannel(*i))
Channel::JoinUser(localuser, *i, override);
std::string chanList = localuser->oper->getConfig("autojoin");
@@ -93,7 +93,7 @@ class ModuleOperjoin : public Module
tokenize(chanList, typechans);
for (std::vector<std::string>::const_iterator it = typechans.begin(); it != typechans.end(); ++it)
{
- if (ServerInstance->IsChannel(*it, ServerInstance->Config->Limits.ChanMax))
+ if (ServerInstance->IsChannel(*it))
{
Channel::JoinUser(localuser, *it, override);
}
diff --git a/src/modules/m_redirect.cpp b/src/modules/m_redirect.cpp
index 2ce213958..000d53a2e 100644
--- a/src/modules/m_redirect.cpp
+++ b/src/modules/m_redirect.cpp
@@ -39,7 +39,7 @@ class Redirect : public ModeHandler
{
if (IS_LOCAL(source))
{
- if (!ServerInstance->IsChannel(parameter, ServerInstance->Config->Limits.ChanMax))
+ if (!ServerInstance->IsChannel(parameter))
{
source->WriteNumeric(403, "%s %s :Invalid channel name", source->nick.c_str(), parameter.c_str());
parameter.clear();
diff --git a/src/modules/m_sajoin.cpp b/src/modules/m_sajoin.cpp
index 2724a1ce3..205cd6569 100644
--- a/src/modules/m_sajoin.cpp
+++ b/src/modules/m_sajoin.cpp
@@ -45,7 +45,7 @@ class CommandSajoin : public Command
user->WriteNumeric(ERR_NOPRIVILEGES, "%s :Cannot use an SA command on a u-lined client",user->nick.c_str());
return CMD_FAILURE;
}
- if (IS_LOCAL(user) && !ServerInstance->IsChannel(parameters[1].c_str(), ServerInstance->Config->Limits.ChanMax))
+ if (IS_LOCAL(user) && !ServerInstance->IsChannel(parameters[1]))
{
/* we didn't need to check this for each character ;) */
user->WriteNotice("*** Invalid characters in channel name or name too long");
diff --git a/src/modules/m_sanick.cpp b/src/modules/m_sanick.cpp
index 4ba420367..01899dd0a 100644
--- a/src/modules/m_sanick.cpp
+++ b/src/modules/m_sanick.cpp
@@ -54,7 +54,7 @@ class CommandSanick : public Command
return CMD_FAILURE;
}
- if (!ServerInstance->IsNick(parameters[1], ServerInstance->Config->Limits.NickMax))
+ if (!ServerInstance->IsNick(parameters[1]))
{
user->WriteNotice("*** Invalid nickname '" + parameters[1] + "'");
return CMD_FAILURE;
diff --git a/src/modules/m_spanningtree/svsjoin.cpp b/src/modules/m_spanningtree/svsjoin.cpp
index 6b1d2835c..032633416 100644
--- a/src/modules/m_spanningtree/svsjoin.cpp
+++ b/src/modules/m_spanningtree/svsjoin.cpp
@@ -25,7 +25,7 @@
CmdResult CommandSVSJoin::Handle(const std::vector<std::string>& parameters, User *user)
{
// Check for valid channel name
- if (!ServerInstance->IsChannel(parameters[1].c_str(), ServerInstance->Config->Limits.ChanMax))
+ if (!ServerInstance->IsChannel(parameters[1]))
return CMD_FAILURE;
// Check target exists
diff --git a/src/modules/m_watch.cpp b/src/modules/m_watch.cpp
index 1a0594637..712699775 100644
--- a/src/modules/m_watch.cpp
+++ b/src/modules/m_watch.cpp
@@ -146,7 +146,7 @@ class CommandWatch : public Command
CmdResult remove_watch(User* user, const char* nick)
{
// removing an item from the list
- if (!ServerInstance->IsNick(nick, ServerInstance->Config->Limits.NickMax))
+ if (!ServerInstance->IsNick(nick))
{
user->WriteNumeric(942, "%s %s :Invalid nickname", user->nick.c_str(), nick);
return CMD_FAILURE;
@@ -196,7 +196,7 @@ class CommandWatch : public Command
CmdResult add_watch(User* user, const char* nick)
{
- if (!ServerInstance->IsNick(nick, ServerInstance->Config->Limits.NickMax))
+ if (!ServerInstance->IsNick(nick))
{
user->WriteNumeric(942, "%s %s :Invalid nickname",user->nick.c_str(),nick);
return CMD_FAILURE;