summaryrefslogtreecommitdiff
path: root/src/modules/m_channames.cpp
diff options
context:
space:
mode:
authorAttila Molnar <attilamolnar@hush.com>2013-05-18 12:03:55 -0700
committerAttila Molnar <attilamolnar@hush.com>2013-05-18 12:03:55 -0700
commit8f27fefa75e2952e7ab8757eb9fe4af4586817f0 (patch)
tree752def83ea80788d6a04fb8cc8358146915e7c4a /src/modules/m_channames.cpp
parent143b2b081821f027eaa72be522ea691447980850 (diff)
parent5c9427cde0a949a17a476311db0a2a275345337b (diff)
Merge pull request #543 from SaberUK/master+sizeparam-removal
Remove the size argument from IsChannel and IsNick.
Diffstat (limited to 'src/modules/m_channames.cpp')
-rw-r--r--src/modules/m_channames.cpp12
1 files changed, 6 insertions, 6 deletions
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();