diff options
author | Peter Powell <petpow@saberuk.com> | 2013-05-18 18:55:01 +0100 |
---|---|---|
committer | Peter Powell <petpow@saberuk.com> | 2013-05-18 19:11:07 +0100 |
commit | 5c9427cde0a949a17a476311db0a2a275345337b (patch) | |
tree | bf4cea76e7270f476d3f19ec82db9885db9574c1 /src/modules/m_channames.cpp | |
parent | 6153822a2de1867b7b90b95e8ed9bc1a8c792c84 (diff) |
Remove the size argument from IsChannel and IsNick.
There was only one case (which was probably an error) where these
methods were not set to their ServerLimits value.
Diffstat (limited to 'src/modules/m_channames.cpp')
-rw-r--r-- | src/modules/m_channames.cpp | 12 |
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(); |