#include "inspircd.h"
-/* $ModDesc: Provides the ability to abbreviate commands a-la BBC BASIC keywords. */
-
class ModuleAbbreviation : public Module
{
public:
- void init() CXX11_OVERRIDE
- {
- ServerInstance->Modules->Attach(I_OnPreCommand, this);
- }
-
void Prioritize()
{
ServerInstance->Modules->SetPriority(this, I_OnPreCommand, PRIORITY_FIRST);
{
if (matchlist.length() > 450)
{
- user->WriteNumeric(420, "%s :Ambiguous abbreviation and too many possible matches.", user->nick.c_str());
+ user->WriteNumeric(420, ":Ambiguous abbreviation and too many possible matches.");
return MOD_RES_DENY;
}
/* Ambiguous command, list the matches */
if (!matchlist.empty())
{
- user->WriteNumeric(420, "%s :Ambiguous abbreviation, posssible matches: %s%s", user->nick.c_str(), foundcommand.c_str(), matchlist.c_str());
+ user->WriteNumeric(420, ":Ambiguous abbreviation, posssible matches: %s%s", foundcommand.c_str(), matchlist.c_str());
return MOD_RES_DENY;
}