From 86775e2e98f55b3b88befe2daff0ca23f02f3155 Mon Sep 17 00:00:00 2001 From: danieldg Date: Wed, 2 Sep 2009 00:49:36 +0000 Subject: ModResult conversion: Change return type of all module functions git-svn-id: http://svn.inspircd.org/repository/trunk/inspircd@11634 e03df62e-2008-0410-955e-edbf42e46eb7 --- src/modules/m_alias.cpp | 12 +++++------- 1 file changed, 5 insertions(+), 7 deletions(-) (limited to 'src/modules/m_alias.cpp') diff --git a/src/modules/m_alias.cpp b/src/modules/m_alias.cpp index 1741bb10d..5140faeaf 100644 --- a/src/modules/m_alias.cpp +++ b/src/modules/m_alias.cpp @@ -137,7 +137,7 @@ class ModuleAlias : public Module return word; } - virtual int 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, User *user, bool validated, const std::string &original_line) { std::multimap::iterator i, upperbound; @@ -145,12 +145,12 @@ class ModuleAlias : public Module * to know. */ if (user->registered != REG_ALL) - return 0; + return MOD_RES_PASSTHRU; /* We dont have any commands looking like this? Stop processing. */ i = Aliases.find(command); if (i == Aliases.end()) - return 0; + return MOD_RES_PASSTHRU; /* Avoid iterating on to different aliases if no patterns match. */ upperbound = Aliases.upper_bound(command); @@ -166,7 +166,7 @@ class ModuleAlias : public Module { if (DoAlias(user, NULL, &(i->second), compare, original_line)) { - return 1; + return MOD_RES_DENY; } } @@ -174,7 +174,7 @@ class ModuleAlias : public Module } // If we made it here, no aliases actually matched. - return 0; + return MOD_RES_PASSTHRU; } virtual void OnUserMessage(User *user, void *dest, int target_type, const std::string &text, char status, const CUList &exempt_list) @@ -243,8 +243,6 @@ class ModuleAlias : public Module i++; } - - return; } -- cgit v1.3.1-10-gc9f91