summaryrefslogtreecommitdiff
path: root/src/modes
diff options
context:
space:
mode:
Diffstat (limited to 'src/modes')
-rw-r--r--src/modes/cmode_b.cpp3
-rw-r--r--src/modes/cmode_h.cpp6
-rw-r--r--src/modes/cmode_k.cpp2
-rw-r--r--src/modes/cmode_l.cpp2
-rw-r--r--src/modes/cmode_o.cpp6
-rw-r--r--src/modes/cmode_t.cpp2
-rw-r--r--src/modes/cmode_v.cpp6
-rw-r--r--src/modes/umode_i.cpp2
-rw-r--r--src/modes/umode_o.cpp3
-rw-r--r--src/modes/umode_s.cpp3
-rw-r--r--src/modes/umode_w.cpp2
11 files changed, 26 insertions, 11 deletions
diff --git a/src/modes/cmode_b.cpp b/src/modes/cmode_b.cpp
index 9c9c2129c..d9ecb5b07 100644
--- a/src/modes/cmode_b.cpp
+++ b/src/modes/cmode_b.cpp
@@ -25,8 +25,9 @@
#include "hashcomp.h"
#include "modes/cmode_b.h"
-ModeChannelBan::ModeChannelBan(InspIRCd* Instance) : ModeHandler(Instance, NULL, 'b', 1, 1, true, MODETYPE_CHANNEL, false)
+ModeChannelBan::ModeChannelBan(InspIRCd* Instance) : ModeHandler(NULL, 'b', PARAM_ALWAYS, MODETYPE_CHANNEL)
{
+ list = true;
}
ModeAction ModeChannelBan::OnModeChange(User* source, User*, Channel* channel, std::string &parameter, bool adding)
diff --git a/src/modes/cmode_h.cpp b/src/modes/cmode_h.cpp
index a61df4ba0..927c7ea73 100644
--- a/src/modes/cmode_h.cpp
+++ b/src/modes/cmode_h.cpp
@@ -19,8 +19,12 @@
#include "modules.h"
#include "modes/cmode_h.h"
-ModeChannelHalfOp::ModeChannelHalfOp(InspIRCd* Instance) : ModeHandler(Instance, NULL, 'h', 1, 1, true, MODETYPE_CHANNEL, false, '%', '@', TR_NICK)
+ModeChannelHalfOp::ModeChannelHalfOp(InspIRCd* Instance) : ModeHandler(NULL, 'h', PARAM_ALWAYS, MODETYPE_CHANNEL)
{
+ list = true;
+ prefix = '%';
+ levelrequired = OP_VALUE;
+ m_paramtype = TR_NICK;
}
unsigned int ModeChannelHalfOp::GetPrefixRank()
diff --git a/src/modes/cmode_k.cpp b/src/modes/cmode_k.cpp
index c785f6705..ea035e7b8 100644
--- a/src/modes/cmode_k.cpp
+++ b/src/modes/cmode_k.cpp
@@ -17,7 +17,7 @@
#include "users.h"
#include "modes/cmode_k.h"
-ModeChannelKey::ModeChannelKey(InspIRCd* Instance) : ModeHandler(Instance, NULL, 'k', 1, 1, false, MODETYPE_CHANNEL, false)
+ModeChannelKey::ModeChannelKey(InspIRCd* Instance) : ModeHandler(NULL, 'k', PARAM_ALWAYS, MODETYPE_CHANNEL)
{
}
diff --git a/src/modes/cmode_l.cpp b/src/modes/cmode_l.cpp
index a2ba07f10..1aea53a61 100644
--- a/src/modes/cmode_l.cpp
+++ b/src/modes/cmode_l.cpp
@@ -17,7 +17,7 @@
#include "users.h"
#include "modes/cmode_l.h"
-ModeChannelLimit::ModeChannelLimit(InspIRCd* Instance) : ModeHandler(Instance, NULL, 'l', 1, 0, false, MODETYPE_CHANNEL, false)
+ModeChannelLimit::ModeChannelLimit(InspIRCd* Instance) : ModeHandler(NULL, 'l', PARAM_SETONLY, MODETYPE_CHANNEL)
{
}
diff --git a/src/modes/cmode_o.cpp b/src/modes/cmode_o.cpp
index 19c365ad9..8af364ad4 100644
--- a/src/modes/cmode_o.cpp
+++ b/src/modes/cmode_o.cpp
@@ -19,8 +19,12 @@
#include "modules.h"
#include "modes/cmode_o.h"
-ModeChannelOp::ModeChannelOp(InspIRCd* Instance) : ModeHandler(Instance, NULL, 'o', 1, 1, true, MODETYPE_CHANNEL, false, '@', '@', TR_NICK)
+ModeChannelOp::ModeChannelOp(InspIRCd* Instance) : ModeHandler(NULL, 'o', PARAM_ALWAYS, MODETYPE_CHANNEL)
{
+ list = true;
+ prefix = '@';
+ levelrequired = OP_VALUE;
+ m_paramtype = TR_NICK;
}
unsigned int ModeChannelOp::GetPrefixRank()
diff --git a/src/modes/cmode_t.cpp b/src/modes/cmode_t.cpp
index 6424e1f6c..b3f266086 100644
--- a/src/modes/cmode_t.cpp
+++ b/src/modes/cmode_t.cpp
@@ -17,7 +17,7 @@
#include "users.h"
#include "modes/cmode_t.h"
-ModeChannelTopicOps::ModeChannelTopicOps(InspIRCd* Instance) : ModeHandler(Instance, NULL, 't', 0, 0, false, MODETYPE_CHANNEL, false)
+ModeChannelTopicOps::ModeChannelTopicOps(InspIRCd* Instance) : ModeHandler(NULL, 't', PARAM_NONE, MODETYPE_CHANNEL)
{
}
diff --git a/src/modes/cmode_v.cpp b/src/modes/cmode_v.cpp
index 752dd509b..76faa8aae 100644
--- a/src/modes/cmode_v.cpp
+++ b/src/modes/cmode_v.cpp
@@ -20,8 +20,12 @@
#include "modules.h"
#include "modes/cmode_v.h"
-ModeChannelVoice::ModeChannelVoice(InspIRCd* Instance) : ModeHandler(Instance, NULL, 'v', 1, 1, true, MODETYPE_CHANNEL, false, '+', '%', TR_NICK)
+ModeChannelVoice::ModeChannelVoice(InspIRCd* Instance) : ModeHandler(NULL, 'v', PARAM_ALWAYS, MODETYPE_CHANNEL)
{
+ list = true;
+ prefix = '+';
+ levelrequired = HALFOP_VALUE;
+ m_paramtype = TR_NICK;
}
unsigned int ModeChannelVoice::GetPrefixRank()
diff --git a/src/modes/umode_i.cpp b/src/modes/umode_i.cpp
index caac9ff37..5c7c41b62 100644
--- a/src/modes/umode_i.cpp
+++ b/src/modes/umode_i.cpp
@@ -17,7 +17,7 @@
#include "users.h"
#include "modes/umode_i.h"
-ModeUserInvisible::ModeUserInvisible(InspIRCd* Instance) : SimpleUserModeHandler(Instance, NULL, 'i')
+ModeUserInvisible::ModeUserInvisible(InspIRCd* Instance) : SimpleUserModeHandler(NULL, 'i')
{
}
diff --git a/src/modes/umode_o.cpp b/src/modes/umode_o.cpp
index 02550ffe5..ec9b4ad5b 100644
--- a/src/modes/umode_o.cpp
+++ b/src/modes/umode_o.cpp
@@ -17,8 +17,9 @@
#include "users.h"
#include "modes/umode_o.h"
-ModeUserOperator::ModeUserOperator(InspIRCd* Instance) : ModeHandler(Instance, NULL, 'o', 0, 0, false, MODETYPE_USER, true)
+ModeUserOperator::ModeUserOperator(InspIRCd* Instance) : ModeHandler(NULL, 'o', PARAM_NONE, MODETYPE_USER)
{
+ oper = true;
}
ModeAction ModeUserOperator::OnModeChange(User* source, User* dest, Channel*, std::string&, bool adding)
diff --git a/src/modes/umode_s.cpp b/src/modes/umode_s.cpp
index c45c185dc..abfc480d9 100644
--- a/src/modes/umode_s.cpp
+++ b/src/modes/umode_s.cpp
@@ -17,8 +17,9 @@
#include "users.h"
#include "modes/umode_s.h"
-ModeUserServerNoticeMask::ModeUserServerNoticeMask(InspIRCd* Instance) : ModeHandler(Instance, NULL, 's', 1, 0, false, MODETYPE_USER, true)
+ModeUserServerNoticeMask::ModeUserServerNoticeMask(InspIRCd* Instance) : ModeHandler(NULL, 's', PARAM_SETONLY, MODETYPE_USER)
{
+ oper = true;
}
ModeAction ModeUserServerNoticeMask::OnModeChange(User* source, User* dest, Channel*, std::string &parameter, bool adding)
diff --git a/src/modes/umode_w.cpp b/src/modes/umode_w.cpp
index 5990fd2a0..8cc31094d 100644
--- a/src/modes/umode_w.cpp
+++ b/src/modes/umode_w.cpp
@@ -17,7 +17,7 @@
#include "users.h"
#include "modes/umode_w.h"
-ModeUserWallops::ModeUserWallops(InspIRCd* Instance) : SimpleUserModeHandler(Instance, NULL, 'w')
+ModeUserWallops::ModeUserWallops(InspIRCd* Instance) : SimpleUserModeHandler(NULL, 'w')
{
}