summaryrefslogtreecommitdiff
path: root/src/modules/m_alias.cpp
diff options
context:
space:
mode:
authordanieldg <danieldg@e03df62e-2008-0410-955e-edbf42e46eb7>2009-09-02 00:49:36 +0000
committerdanieldg <danieldg@e03df62e-2008-0410-955e-edbf42e46eb7>2009-09-02 00:49:36 +0000
commit86775e2e98f55b3b88befe2daff0ca23f02f3155 (patch)
treecbc3abf3f55ae6fd1112bcf6bf44e02b502ac2d6 /src/modules/m_alias.cpp
parent3d8ec5dbd9cfde34fcbc63ad7b9b1369866f0a33 (diff)
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
Diffstat (limited to 'src/modules/m_alias.cpp')
-rw-r--r--src/modules/m_alias.cpp12
1 files changed, 5 insertions, 7 deletions
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<std::string> &parameters, User *user, bool validated, const std::string &original_line)
+ virtual ModResult OnPreCommand(std::string &command, std::vector<std::string> &parameters, User *user, bool validated, const std::string &original_line)
{
std::multimap<std::string, Alias>::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;
}