summaryrefslogtreecommitdiff
path: root/src
diff options
context:
space:
mode:
authorbrain <brain@e03df62e-2008-0410-955e-edbf42e46eb7>2008-06-06 15:49:39 +0000
committerbrain <brain@e03df62e-2008-0410-955e-edbf42e46eb7>2008-06-06 15:49:39 +0000
commit58857b594c596bc831fb100971c5d09eea3494c8 (patch)
tree22cef8a7783076a624b1e3dce19485a8cca556b4 /src
parent61185fc62b7d3d05e33a116fca26aa9dc72ab691 (diff)
Remove excessive debug
git-svn-id: http://svn.inspircd.org/repository/trunk/inspircd@9846 e03df62e-2008-0410-955e-edbf42e46eb7
Diffstat (limited to 'src')
-rw-r--r--src/modules/m_abbreviation.cpp8
1 files changed, 3 insertions, 5 deletions
diff --git a/src/modules/m_abbreviation.cpp b/src/modules/m_abbreviation.cpp
index 35a6082d9..f94f8a5cc 100644
--- a/src/modules/m_abbreviation.cpp
+++ b/src/modules/m_abbreviation.cpp
@@ -12,9 +12,8 @@
*/
#include "inspircd.h"
-#include "wildcard.h"
-/* $ModDesc: Provides the ability to abbreviate commands. */
+/* $ModDesc: Provides the ability to abbreviate commands a-la BBC BASIC keywords. */
class ModuleAbbreviation : public Module
{
@@ -43,15 +42,13 @@ class ModuleAbbreviation : public Module
/* Whack the . off the end */
command.erase(command.end() - 1);
- ServerInstance->Logs->Log("m_abbreviation", DEBUG, "Abbreviated command: %s", command.c_str());
-
+ /* Look for any command that starts with the same characters, if it does, replace the command string with it */
size_t clen = command.length();
for (Commandtable::iterator n = ServerInstance->Parser->cmdlist.begin(); n != ServerInstance->Parser->cmdlist.end(); ++n)
{
if (n->first.length() < clen)
continue;
- ServerInstance->Logs->Log("m_abbreviation", DEBUG, "command=%s abbr=%s", command.c_str(), n->first.substr(0, clen).c_str());
if (command == n->first.substr(0, clen))
{
/* Found the command */
@@ -60,6 +57,7 @@ class ModuleAbbreviation : public Module
}
}
+ /* No match, we have to put the . back again so that the invalid command numeric looks correct. */
command += '.';
return false;
}