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_safelist.cpp | 16 ++++++++-------- 1 file changed, 8 insertions(+), 8 deletions(-) (limited to 'src/modules/m_safelist.cpp') 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 ¶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) { /* 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 ¶meters, User* user) + ModResult HandleList(const std::vector ¶meters, 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) -- cgit v1.2.3