summaryrefslogtreecommitdiff
path: root/src
diff options
context:
space:
mode:
authorbrain <brain@e03df62e-2008-0410-955e-edbf42e46eb7>2008-06-06 16:19:07 +0000
committerbrain <brain@e03df62e-2008-0410-955e-edbf42e46eb7>2008-06-06 16:19:07 +0000
commitb523e54a454d82e8df1e95850cdeaf79d75df294 (patch)
tree33cca8d3a9a7457341eeb53db43a6ee9c1318917 /src
parentfdaf67113a7d5b9cd5bbe9c8f729c3cc686486bf (diff)
Abort on matchlist.length() > 450
git-svn-id: http://svn.inspircd.org/repository/trunk/inspircd@9850 e03df62e-2008-0410-955e-edbf42e46eb7
Diffstat (limited to 'src')
-rw-r--r--src/modules/m_abbreviation.cpp3
1 files changed, 1 insertions, 2 deletions
diff --git a/src/modules/m_abbreviation.cpp b/src/modules/m_abbreviation.cpp
index d3c423f53..0b59613ca 100644
--- a/src/modules/m_abbreviation.cpp
+++ b/src/modules/m_abbreviation.cpp
@@ -45,7 +45,6 @@ class ModuleAbbreviation : public Module
/* Look for any command that starts with the same characters, if it does, replace the command string with it */
size_t clen = command.length();
std::string foundcommand, matchlist;
- size_t matches = 0;
bool foundmatch = false;
for (Commandtable::iterator n = ServerInstance->Parser->cmdlist.begin(); n != ServerInstance->Parser->cmdlist.end(); ++n)
{
@@ -54,7 +53,7 @@ class ModuleAbbreviation : public Module
if (command == n->first.substr(0, clen))
{
- if (++matches > 10)
+ if (matchlist.length() > 450)
{
user->WriteNumeric(420, "%s :Ambiguous abbreviation and too many possible matches.", user->nick.c_str());
return true;