summaryrefslogtreecommitdiff
path: root/src/modules
diff options
context:
space:
mode:
authorattilamolnar <attilamolnar@hush.com>2012-11-28 03:22:02 +0100
committerattilamolnar <attilamolnar@hush.com>2012-11-28 19:28:36 +0100
commit772dad05a42e20e03a5445b84a7f6612ee44283f (patch)
tree5f3df00983b90a3d8ac87da2074a3a5adfbe1be3 /src/modules
parent56cde817e033c6235cc6a846c90fd143ffb2a0ad (diff)
m_spanningtree Remove redundant params.size() checks
TreeSocket::ProcessConnectedLine() and CommandParser::CallHandler() only call the handler when there are enough parameters
Diffstat (limited to 'src/modules')
-rw-r--r--src/modules/m_spanningtree/fjoin.cpp2
-rw-r--r--src/modules/m_spanningtree/uid.cpp9
2 files changed, 0 insertions, 11 deletions
diff --git a/src/modules/m_spanningtree/fjoin.cpp b/src/modules/m_spanningtree/fjoin.cpp
index 929ace474..71d837b28 100644
--- a/src/modules/m_spanningtree/fjoin.cpp
+++ b/src/modules/m_spanningtree/fjoin.cpp
@@ -55,8 +55,6 @@ CmdResult CommandFJoin::Handle(const std::vector<std::string>& params, User *src
* losing side, so only its own modes get applied. Life is simple for those
* who succeed at internets. :-)
*/
- if (params.size() < 3)
- return CMD_INVALID;
irc::modestacker modestack(true); /* Modes to apply from the users in the user list */
User* who = NULL; /* User we are currently checking */
diff --git a/src/modules/m_spanningtree/uid.cpp b/src/modules/m_spanningtree/uid.cpp
index 4a73eb80c..f33cb038d 100644
--- a/src/modules/m_spanningtree/uid.cpp
+++ b/src/modules/m_spanningtree/uid.cpp
@@ -35,9 +35,6 @@ CmdResult CommandUID::Handle(const parameterlist &params, User* serversrc)
* 0 1 2 3 4 5 6 7 8 9 (n-1)
* UID uuid age nick host dhost ident ip.string signon +modes (modepara) :gecos
*/
- if (params.size() < 10)
- return CMD_INVALID;
-
time_t age_t = ConvToInt(params[1]);
time_t signon = ConvToInt(params[7]);
std::string empty;
@@ -163,8 +160,6 @@ CmdResult CommandUID::Handle(const parameterlist &params, User* serversrc)
CmdResult CommandFHost::Handle(const parameterlist &params, User* src)
{
- if (params.size() < 1)
- return CMD_INVALID;
if (IS_SERVER(src))
return CMD_FAILURE;
src->ChangeDisplayedHost(params[0].c_str());
@@ -173,8 +168,6 @@ CmdResult CommandFHost::Handle(const parameterlist &params, User* src)
CmdResult CommandFIdent::Handle(const parameterlist &params, User* src)
{
- if (params.size() < 1)
- return CMD_INVALID;
if (IS_SERVER(src))
return CMD_FAILURE;
src->ChangeIdent(params[0].c_str());
@@ -183,8 +176,6 @@ CmdResult CommandFIdent::Handle(const parameterlist &params, User* src)
CmdResult CommandFName::Handle(const parameterlist &params, User* src)
{
- if (params.size() < 1)
- return CMD_INVALID;
if (IS_SERVER(src))
return CMD_FAILURE;
src->ChangeName(params[0].c_str());