mirror of
https://github.com/inspircd/inspircd.git
synced 2025-03-10 19:19:02 -04:00
Remove excessive debug
git-svn-id: http://svn.inspircd.org/repository/trunk/inspircd@9846 e03df62e-2008-0410-955e-edbf42e46eb7
This commit is contained in:
parent
61185fc62b
commit
58857b594c
@ -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;
|
||||
}
|
||||
|
Loading…
x
Reference in New Issue
Block a user