summaryrefslogtreecommitdiff
path: root/src/modes
diff options
context:
space:
mode:
Diffstat (limited to 'src/modes')
-rw-r--r--src/modes/cmode_b.cpp14
-rw-r--r--src/modes/cmode_h.cpp16
-rw-r--r--src/modes/cmode_o.cpp16
-rw-r--r--src/modes/cmode_v.cpp16
4 files changed, 31 insertions, 31 deletions
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;
diff --git a/src/modes/cmode_h.cpp b/src/modes/cmode_h.cpp
index ce4a0ac56..54ab139ce 100644
--- a/src/modes/cmode_h.cpp
+++ b/src/modes/cmode_h.cpp
@@ -107,12 +107,12 @@ std::string ModeChannelHalfOp::AddHalfOp(User *user,const char* dest,Channel *ch
{
if (IS_LOCAL(user))
{
- int MOD_RESULT = 0;
- FOREACH_RESULT(I_OnAccessCheck,OnAccessCheck(user,d,chan,AC_HALFOP));
+ ModResult MOD_RESULT;
+ FIRST_MOD_RESULT(ServerInstance, OnAccessCheck, MOD_RESULT, (user,d,chan,AC_HALFOP));
- if (MOD_RESULT == ACR_DENY)
+ if (MOD_RESULT == MOD_RES_DENY)
return "";
- if (MOD_RESULT == ACR_DEFAULT)
+ if (MOD_RESULT == MOD_RES_PASSTHRU)
{
if ((status < STATUS_OP) && (!ServerInstance->ULine(user->server)))
{
@@ -135,12 +135,12 @@ std::string ModeChannelHalfOp::DelHalfOp(User *user,const char *dest,Channel *ch
{
if (IS_LOCAL(user))
{
- int MOD_RESULT = 0;
- FOREACH_RESULT(I_OnAccessCheck,OnAccessCheck(user,d,chan,AC_DEHALFOP));
+ ModResult MOD_RESULT;
+ FIRST_MOD_RESULT(ServerInstance, OnAccessCheck, MOD_RESULT, (user,d,chan,AC_DEHALFOP));
- if (MOD_RESULT == ACR_DENY)
+ if (MOD_RESULT == MOD_RES_DENY)
return "";
- if (MOD_RESULT == ACR_DEFAULT)
+ if (MOD_RESULT == MOD_RES_PASSTHRU)
{
if ((user != d) && ((status < STATUS_OP) && (!ServerInstance->ULine(user->server))))
{
diff --git a/src/modes/cmode_o.cpp b/src/modes/cmode_o.cpp
index 9a271f9a6..908eb698c 100644
--- a/src/modes/cmode_o.cpp
+++ b/src/modes/cmode_o.cpp
@@ -105,12 +105,12 @@ std::string ModeChannelOp::AddOp(User *user,const char* dest,Channel *chan,int s
{
if (IS_LOCAL(user))
{
- int MOD_RESULT = 0;
- FOREACH_RESULT(I_OnAccessCheck,OnAccessCheck(user,d,chan,AC_OP));
+ ModResult MOD_RESULT;
+ FIRST_MOD_RESULT(ServerInstance, OnAccessCheck, MOD_RESULT, (user,d,chan,AC_OP));
- if (MOD_RESULT == ACR_DENY)
+ if (MOD_RESULT == MOD_RES_DENY)
return "";
- if (MOD_RESULT == ACR_DEFAULT)
+ if (MOD_RESULT == MOD_RES_PASSTHRU)
{
if ((status < STATUS_OP) && (!ServerInstance->ULine(user->server)))
{
@@ -133,12 +133,12 @@ std::string ModeChannelOp::DelOp(User *user,const char *dest,Channel *chan,int s
{
if (IS_LOCAL(user))
{
- int MOD_RESULT = 0;
- FOREACH_RESULT(I_OnAccessCheck,OnAccessCheck(user,d,chan,AC_DEOP));
+ ModResult MOD_RESULT;
+ FIRST_MOD_RESULT(ServerInstance, OnAccessCheck, MOD_RESULT, (user,d,chan,AC_DEOP));
- if (MOD_RESULT == ACR_DENY)
+ if (MOD_RESULT == MOD_RES_DENY)
return "";
- if (MOD_RESULT == ACR_DEFAULT)
+ if (MOD_RESULT == MOD_RES_PASSTHRU)
{
if ((status < STATUS_OP) && (!ServerInstance->ULine(user->server)) && (IS_LOCAL(user)))
{
diff --git a/src/modes/cmode_v.cpp b/src/modes/cmode_v.cpp
index 22cfb19ef..03dbb5a33 100644
--- a/src/modes/cmode_v.cpp
+++ b/src/modes/cmode_v.cpp
@@ -105,12 +105,12 @@ std::string ModeChannelVoice::AddVoice(User *user,const char* dest,Channel *chan
{
if (IS_LOCAL(user))
{
- int MOD_RESULT = 0;
- FOREACH_RESULT(I_OnAccessCheck,OnAccessCheck(user,d,chan,AC_VOICE));
+ ModResult MOD_RESULT;
+ FIRST_MOD_RESULT(ServerInstance, OnAccessCheck, MOD_RESULT, (user,d,chan,AC_VOICE));
- if (MOD_RESULT == ACR_DENY)
+ if (MOD_RESULT == MOD_RES_DENY)
return "";
- if (MOD_RESULT == ACR_DEFAULT)
+ if (MOD_RESULT == MOD_RES_PASSTHRU)
{
if ((status < STATUS_HOP) && (!ServerInstance->ULine(user->server)))
{
@@ -133,12 +133,12 @@ std::string ModeChannelVoice::DelVoice(User *user,const char *dest,Channel *chan
{
if (IS_LOCAL(user))
{
- int MOD_RESULT = 0;
- FOREACH_RESULT(I_OnAccessCheck,OnAccessCheck(user,d,chan,AC_DEVOICE));
+ ModResult MOD_RESULT;
+ FIRST_MOD_RESULT(ServerInstance, OnAccessCheck, MOD_RESULT, (user,d,chan,AC_DEVOICE));
- if (MOD_RESULT == ACR_DENY)
+ if (MOD_RESULT == MOD_RES_DENY)
return "";
- if (MOD_RESULT == ACR_DEFAULT)
+ if (MOD_RESULT == MOD_RES_PASSTHRU)
{
if ((status < STATUS_HOP) && (!ServerInstance->ULine(user->server)))
{