diff options
author | Attila Molnar <attilamolnar@hush.com> | 2016-08-29 14:50:08 +0200 |
---|---|---|
committer | Attila Molnar <attilamolnar@hush.com> | 2016-08-29 14:50:08 +0200 |
commit | 19f0c09aa783cc3b945c880d509c1da8bc8e0275 (patch) | |
tree | 06930b6a8adcbcd3f90e297e2bb705bd13908f37 /src/modules | |
parent | 19295ade368e9691b9d4f3152520284c7ad67b13 (diff) |
Convert ModeHandler::GetNumParams() to NeedsParam() that returns a bool
Diffstat (limited to 'src/modules')
-rw-r--r-- | src/modules/m_namedmodes.cpp | 6 | ||||
-rw-r--r-- | src/modules/m_permchannels.cpp | 2 | ||||
-rw-r--r-- | src/modules/m_spanningtree/translate.cpp | 2 | ||||
-rw-r--r-- | src/modules/m_spanningtree/uid.cpp | 2 |
4 files changed, 6 insertions, 6 deletions
diff --git a/src/modules/m_namedmodes.cpp b/src/modules/m_namedmodes.cpp index d4263d899..7a86c9e3c 100644 --- a/src/modules/m_namedmodes.cpp +++ b/src/modules/m_namedmodes.cpp @@ -31,7 +31,7 @@ static void DisplayList(LocalUser* user, Channel* channel) if (!channel->IsModeSet(mh)) continue; numeric.Add("+" + mh->name); - if (mh->GetNumParams(true)) + if (mh->NeedsParam(true)) { if ((mh->name == "key") && (!channel->HasUser(user)) && (!user->HasPrivPermission("channels/auspex"))) numeric.Add("<key>"); @@ -80,7 +80,7 @@ class CommandProp : public SplitCommand ModeHandler* mh = ServerInstance->Modes->FindMode(prop, MODETYPE_CHANNEL); if (mh) { - if (mh->GetNumParams(plus)) + if (mh->NeedsParam(plus)) { if (i != parameters.size()) modes.push(mh, plus, parameters[i++]); @@ -161,7 +161,7 @@ class ModuleNamedModes : public Module } curr.param.clear(); - if (mh->GetNumParams(curr.adding)) + if (mh->NeedsParam(curr.adding)) { if (value.empty()) { diff --git a/src/modules/m_permchannels.cpp b/src/modules/m_permchannels.cpp index 9a5da5ce4..9e77bd60e 100644 --- a/src/modules/m_permchannels.cpp +++ b/src/modules/m_permchannels.cpp @@ -236,7 +236,7 @@ public: ModeHandler* mode = ServerInstance->Modes->FindMode(*n, MODETYPE_CHANNEL); if (mode) { - if (mode->GetNumParams(true)) + if (mode->NeedsParam(true)) list.GetToken(par); else par.clear(); diff --git a/src/modules/m_spanningtree/translate.cpp b/src/modules/m_spanningtree/translate.cpp index 48c0632e5..66e1bb35b 100644 --- a/src/modules/m_spanningtree/translate.cpp +++ b/src/modules/m_spanningtree/translate.cpp @@ -27,7 +27,7 @@ std::string Translate::ModeChangeListToParams(const Modes::ChangeList::List& mod { const Modes::Change& item = *i; ModeHandler* mh = item.mh; - if (!mh->GetNumParams(item.adding)) + if (!mh->NeedsParam(item.adding)) continue; ret.push_back(' '); diff --git a/src/modules/m_spanningtree/uid.cpp b/src/modules/m_spanningtree/uid.cpp index eff537119..a41fe408d 100644 --- a/src/modules/m_spanningtree/uid.cpp +++ b/src/modules/m_spanningtree/uid.cpp @@ -98,7 +98,7 @@ CmdResult CommandUID::HandleServer(TreeServer* remoteserver, std::vector<std::st if (!mh) throw ProtocolException("Unrecognised mode '" + std::string(1, *v) + "'"); - if (mh->GetNumParams(true)) + if (mh->NeedsParam(true)) { if (paramptr >= params.size() - 1) throw ProtocolException("Out of parameters while processing modes"); |