X-Git-Url: https://git.netwichtig.de/gitweb/?a=blobdiff_plain;f=src%2Fmodules%2Fm_abbreviation.cpp;h=b87e352d27b678ddc338a50a15f1ef52644112cc;hb=cb4c516ace8fef75b8a54a141c3644af9697ac0a;hp=a24aefc99e732c156ddb4b47f5b292b8e83eaedd;hpb=67a4a9b62355ea57a2f4521ca5fc53bd4eac3a1f;p=user%2Fhenk%2Fcode%2Finspircd.git diff --git a/src/modules/m_abbreviation.cpp b/src/modules/m_abbreviation.cpp index a24aefc99..b87e352d2 100644 --- a/src/modules/m_abbreviation.cpp +++ b/src/modules/m_abbreviation.cpp @@ -2,7 +2,7 @@ * | Inspire Internet Relay Chat Daemon | * +------------------------------------+ * - * InspIRCd: (C) 2002-2009 InspIRCd Development Team + * InspIRCd: (C) 2002-2010 InspIRCd Development Team * See: http://wiki.inspircd.org/Credits * * This program is free but copyrighted software; see @@ -17,13 +17,14 @@ class ModuleAbbreviation : public Module { - public: - - ModuleAbbreviation() - { + void init() + { ServerInstance->Modules->Attach(I_OnPreCommand, this); - /* Must do this first */ + } + + void Prioritize() + { ServerInstance->Modules->SetPriority(this, I_OnPreCommand, PRIORITY_FIRST); } @@ -32,7 +33,7 @@ class ModuleAbbreviation : public Module return Version("Provides the ability to abbreviate commands a-la BBC BASIC keywords.",VF_VENDOR); } - virtual ModResult OnPreCommand(std::string &command, std::vector ¶meters, User *user, bool validated, const std::string &original_line) + virtual ModResult OnPreCommand(std::string &command, std::vector ¶meters, LocalUser *user, bool validated, const std::string &original_line) { /* Command is already validated, has a length of 0, or last character is not a . */ if (validated || command.empty() || *command.rbegin() != '.')