]> git.netwichtig.de Git - user/henk/code/inspircd.git/blobdiff - src/modes/cmode_v.cpp
Add OnSendWhoLine hook, and use it in the oper hiding modules
[user/henk/code/inspircd.git] / src / modes / cmode_v.cpp
index 47befbac99449d809d0e6f59dfb1be326aea7320..03dbb5a33f0027ed38262a9cdfa51bb3ea26263b 100644 (file)
@@ -4,7 +4,7 @@
  *       +------------------------------------+
  *
  *  InspIRCd: (C) 2002-2009 InspIRCd Development Team
- * See: http://www.inspircd.org/wiki/index.php/Credits
+ * See: http://wiki.inspircd.org/Credits
  *
  * This program is free but copyrighted software; see
  *            the file COPYING for details.
@@ -20,7 +20,7 @@
 #include "modules.h"
 #include "modes/cmode_v.h"
 
-ModeChannelVoice::ModeChannelVoice(InspIRCd* Instance) : ModeHandler(Instance, 'v', 1, 1, true, MODETYPE_CHANNEL, false, '+', '%', TR_NICK)
+ModeChannelVoice::ModeChannelVoice(InspIRCd* Instance) : ModeHandler(Instance, NULL, 'v', 1, 1, true, MODETYPE_CHANNEL, false, '+', '%', TR_NICK)
 {
 }
 
@@ -73,7 +73,7 @@ void ModeChannelVoice::RemoveMode(User*, irc::modestacker* stack)
 {
 }
 
-ModeAction ModeChannelVoice::OnModeChange(User* source, User*, Channel* channel, std::string &parameter, bool adding, bool servermode)
+ModeAction ModeChannelVoice::OnModeChange(User* source, User*, Channel* channel, std::string &parameter, bool adding)
 {
        int status = channel->GetStatus(source);
 
@@ -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)))
                                {