summaryrefslogtreecommitdiff
path: root/src/modules
diff options
context:
space:
mode:
authorw00t <w00t@e03df62e-2008-0410-955e-edbf42e46eb7>2007-07-24 20:21:29 +0000
committerw00t <w00t@e03df62e-2008-0410-955e-edbf42e46eb7>2007-07-24 20:21:29 +0000
commitc88d4a3511cd9706b5c02c576b0445f13391afd3 (patch)
tree601df768ed6050351a48b2e914f223e6d4fe8bea /src/modules
parent2f44ee5b2a4b44cc7005ed76eaeef8c136713153 (diff)
Replace some voodoo with a define
git-svn-id: http://svn.inspircd.org/repository/trunk/inspircd@7556 e03df62e-2008-0410-955e-edbf42e46eb7
Diffstat (limited to 'src/modules')
-rw-r--r--src/modules/m_alias.cpp6
-rw-r--r--src/modules/m_filter.h2
-rw-r--r--src/modules/m_spanningtree/treesocket2.cpp2
3 files changed, 5 insertions, 5 deletions
diff --git a/src/modules/m_alias.cpp b/src/modules/m_alias.cpp
index 94c64b405..a8f079bf1 100644
--- a/src/modules/m_alias.cpp
+++ b/src/modules/m_alias.cpp
@@ -77,7 +77,7 @@ class ModuleAlias : public Module
: Module(Me)
{
ReadAliases();
- pars.resize(127);
+ pars.resize(MAXPARAMETERS);
}
void Implements(char* List)
@@ -251,10 +251,10 @@ class ModuleAlias : public Module
SearchAndReplace(newline, "\r", "$");
irc::tokenstream ss(newline);
- const char* parv[127];
+ const char* parv[MAXPARAMETERS];
int x = 0;
- while (ss.GetToken(pars[x]))
+ while (ss.GetToken(pars[x]) && x < MAXPARAMETERS)
{
parv[x] = pars[x].c_str();
x++;
diff --git a/src/modules/m_filter.h b/src/modules/m_filter.h
index 576269325..5e74177e5 100644
--- a/src/modules/m_filter.h
+++ b/src/modules/m_filter.h
@@ -341,7 +341,7 @@ int FilterBase::OnPreCommand(const std::string &command, const char** parameters
command_t* c = ServerInstance->Parser->GetHandler(command);
if (c)
{
- const char* params[127];
+ const char* params[MAXPARAMETERS];
for (int item = 0; item < pcnt; item++)
params[item] = parameters[item];
params[replacepoint] = "Reason filtered";
diff --git a/src/modules/m_spanningtree/treesocket2.cpp b/src/modules/m_spanningtree/treesocket2.cpp
index 23362ca99..a321ee36b 100644
--- a/src/modules/m_spanningtree/treesocket2.cpp
+++ b/src/modules/m_spanningtree/treesocket2.cpp
@@ -1400,7 +1400,7 @@ bool TreeSocket::ProcessLine(std::string &line)
{
if (Utils->IsServer(prefix))
{
- const char* modelist[127];
+ const char* modelist[MAXPARAMETERS];
for (size_t i = 0; i < params.size(); i++)
modelist[i] = params[i].c_str();
userrec* fake = new userrec(Instance);