summaryrefslogtreecommitdiff
path: root/src/modules/m_safelist.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_safelist.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_safelist.cpp')
-rw-r--r--src/modules/m_safelist.cpp16
1 files changed, 8 insertions, 8 deletions
diff --git a/src/modules/m_safelist.cpp b/src/modules/m_safelist.cpp
index b99c78c83..bd1a54110 100644
--- a/src/modules/m_safelist.cpp
+++ b/src/modules/m_safelist.cpp
@@ -68,24 +68,24 @@ class ModuleSafeList : public Module
* OnPreCommand()
* Intercept the LIST command.
*/
- 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)
{
/* If the command doesnt appear to be valid, we dont want to mess with it. */
if (!validated)
- return 0;
+ return MOD_RES_PASSTHRU;
if (command == "LIST")
{
return this->HandleList(parameters, user);
}
- return 0;
+ return MOD_RES_PASSTHRU;
}
/*
* HandleList()
* Handle (override) the LIST command.
*/
- int HandleList(const std::vector<std::string> &parameters, User* user)
+ ModResult HandleList(const std::vector<std::string> &parameters, User* user)
{
int pcnt = parameters.size();
int minusers = 0, maxusers = 0;
@@ -95,7 +95,7 @@ class ModuleSafeList : public Module
user->WriteServ("NOTICE %s :*** Server load is currently too heavy. Please try again later.", user->nick.c_str());
user->WriteNumeric(321, "%s Channel :Users Name",user->nick.c_str());
user->WriteNumeric(323, "%s :End of channel list.",user->nick.c_str());
- return 1;
+ return MOD_RES_DENY;
}
/* First, let's check if the user is currently /list'ing */
@@ -105,7 +105,7 @@ class ModuleSafeList : public Module
if (ld)
{
/* user is already /list'ing, we don't want to do shit. */
- return 1;
+ return MOD_RES_DENY;
}
/* Work around mIRC suckyness. YOU SUCK, KHALED! */
@@ -134,7 +134,7 @@ class ModuleSafeList : public Module
user->WriteServ("NOTICE %s :*** Woah there, slow down a little, you can't /LIST so often!",user->nick.c_str());
user->WriteNumeric(321, "%s Channel :Users Name",user->nick.c_str());
user->WriteNumeric(323, "%s :End of channel list.",user->nick.c_str());
- return 1;
+ return MOD_RES_DENY;
}
delete last_list_time;
@@ -156,7 +156,7 @@ class ModuleSafeList : public Module
global_listing++;
- return 1;
+ return MOD_RES_DENY;
}
virtual void OnBufferFlushed(User* user)