diff options
author | attilamolnar <attilamolnar@hush.com> | 2013-06-01 23:00:55 +0200 |
---|---|---|
committer | attilamolnar <attilamolnar@hush.com> | 2013-06-01 23:00:55 +0200 |
commit | 40c5b25db4aef95957788c46de1005708ce000d2 (patch) | |
tree | f6cba8f73bf50dd2c611d85d4d5c28d917e0bb47 | |
parent | 397dea782f9d38ea141d0270a33424376640f5cf (diff) |
Remove #define MAXPARAMETERS and "MAXPARA" 005 token
-rw-r--r-- | include/inspircd.h | 5 | ||||
-rw-r--r-- | src/command_parse.cpp | 2 | ||||
-rw-r--r-- | src/modules/m_alias.cpp | 2 | ||||
-rw-r--r-- | src/server.cpp | 1 |
4 files changed, 2 insertions, 8 deletions
diff --git a/include/inspircd.h b/include/inspircd.h index d9f7fe59f..6e75cc9a8 100644 --- a/include/inspircd.h +++ b/include/inspircd.h @@ -74,11 +74,6 @@ CoreExport extern InspIRCd* ServerInstance; #include "inspstring.h" #include "protocol.h" -/** - * Used to define the maximum number of parameters a command may have. - */ -#define MAXPARAMETERS 127 - /** Returned by some functions to indicate failure. */ #define ERROR -1 diff --git a/src/command_parse.cpp b/src/command_parse.cpp index e3d928a2f..bb86219d7 100644 --- a/src/command_parse.cpp +++ b/src/command_parse.cpp @@ -196,7 +196,7 @@ void CommandParser::ProcessCommand(LocalUser *user, std::string &cmd) if (command[0] == ':') tokens.GetToken(command); - while (tokens.GetToken(token) && (command_p.size() <= MAXPARAMETERS)) + while (tokens.GetToken(token)) command_p.push_back(token); std::transform(command.begin(), command.end(), command.begin(), ::toupper); diff --git a/src/modules/m_alias.cpp b/src/modules/m_alias.cpp index c9fa9bd0a..34f4c4f64 100644 --- a/src/modules/m_alias.cpp +++ b/src/modules/m_alias.cpp @@ -360,7 +360,7 @@ class ModuleAlias : public Module std::string command, token; ss.GetToken(command); - while (ss.GetToken(token) && (pars.size() <= MAXPARAMETERS)) + while (ss.GetToken(token)) { pars.push_back(token); } diff --git a/src/server.cpp b/src/server.cpp index 66b175a1a..a8ef1917b 100644 --- a/src/server.cpp +++ b/src/server.cpp @@ -181,7 +181,6 @@ void ISupportManager::Build() tokens["KICKLEN"] = ConvToStr(ServerInstance->Config->Limits.MaxKick); tokens["MAXBANS"] = "64"; // TODO: make this a config setting. tokens["MAXCHANNELS"] = ConvToStr(ServerInstance->Config->MaxChans); - tokens["MAXPARA"] = ConvToStr(MAXPARAMETERS); tokens["MAXTARGETS"] = ConvToStr(ServerInstance->Config->MaxTargets); tokens["MODES"] = ConvToStr(ServerInstance->Config->Limits.MaxModes); tokens["NETWORK"] = ConvToStr(ServerInstance->Config->Network); |