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/modes/cmode_b.cpp | 14 +++++++------- 1 file changed, 7 insertions(+), 7 deletions(-) (limited to 'src/modes/cmode_b.cpp') diff --git a/src/modes/cmode_b.cpp b/src/modes/cmode_b.cpp index 415d33c30..36078f4b2 100644 --- a/src/modes/cmode_b.cpp +++ b/src/modes/cmode_b.cpp @@ -115,9 +115,9 @@ std::string& ModeChannelBan::AddBan(User *user, std::string &dest, Channel *chan return dest; } - int MOD_RESULT = 0; - FOREACH_RESULT(I_OnAddBan,OnAddBan(user,chan,dest)); - if (MOD_RESULT) + ModResult MOD_RESULT; + FIRST_MOD_RESULT(ServerInstance, OnAddBan, MOD_RESULT, (user,chan,dest)); + if (MOD_RESULT == MOD_RES_DENY) { dest = ""; return dest; @@ -149,7 +149,7 @@ ModePair ModeChannelBan::ModeSet(User*, User*, Channel* channel, const std::stri return std::make_pair(true, i->data); } } - return std::make_pair(false, parameter); + return std::make_pair(false, parameter); } std::string& ModeChannelBan::DelBan(User *user, std::string& dest, Channel *chan, int) @@ -168,9 +168,9 @@ std::string& ModeChannelBan::DelBan(User *user, std::string& dest, Channel *chan { if (!strcasecmp(i->data.c_str(), dest.c_str())) { - int MOD_RESULT = 0; - FOREACH_RESULT(I_OnDelBan,OnDelBan(user, chan, dest)); - if (MOD_RESULT) + ModResult MOD_RESULT; + FIRST_MOD_RESULT(ServerInstance, OnDelBan, MOD_RESULT, (user, chan, dest)); + if (MOD_RESULT == MOD_RES_DENY) { dest = ""; return dest; -- cgit v1.2.3