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_messageflood.cpp | 16 ++++++++-------- 1 file changed, 8 insertions(+), 8 deletions(-) (limited to 'src/modules/m_messageflood.cpp') diff --git a/src/modules/m_messageflood.cpp b/src/modules/m_messageflood.cpp index fc62cd67e..da1038512 100644 --- a/src/modules/m_messageflood.cpp +++ b/src/modules/m_messageflood.cpp @@ -205,11 +205,11 @@ class ModuleMsgFlood : public Module ServerInstance->Modules->Attach(eventlist, this, 3); } - int ProcessMessages(User* user,Channel* dest, const std::string &text) + ModResult ProcessMessages(User* user,Channel* dest, const std::string &text) { if (!IS_LOCAL(user) || (CHANOPS_EXEMPT(ServerInstance, 'f') && dest->GetStatus(user) == STATUS_OP)) { - return 0; + return MOD_RES_PASSTHRU; } floodsettings *f; @@ -239,27 +239,27 @@ class ModuleMsgFlood : public Module delete dest; } - return 1; + return MOD_RES_DENY; } } - return 0; + return MOD_RES_PASSTHRU; } - virtual int OnUserPreMessage(User *user, void *dest, int target_type, std::string &text, char status, CUList &exempt_list) + virtual ModResult OnUserPreMessage(User *user, void *dest, int target_type, std::string &text, char status, CUList &exempt_list) { if (target_type == TYPE_CHANNEL) return ProcessMessages(user,(Channel*)dest,text); - return 0; + return MOD_RES_PASSTHRU; } - virtual int OnUserPreNotice(User *user, void *dest, int target_type, std::string &text, char status, CUList &exempt_list) + virtual ModResult OnUserPreNotice(User *user, void *dest, int target_type, std::string &text, char status, CUList &exempt_list) { if (target_type == TYPE_CHANNEL) return ProcessMessages(user,(Channel*)dest,text); - return 0; + return MOD_RES_PASSTHRU; } void OnChannelDelete(Channel* chan) -- cgit v1.2.3