summaryrefslogtreecommitdiff
path: root/src/modules
diff options
context:
space:
mode:
Diffstat (limited to 'src/modules')
-rw-r--r--src/modules/m_autoop.cpp11
-rw-r--r--src/modules/m_banexception.cpp19
-rw-r--r--src/modules/m_chanfilter.cpp11
-rw-r--r--src/modules/m_exemptchanops.cpp10
-rw-r--r--src/modules/m_inviteexception.cpp19
5 files changed, 37 insertions, 33 deletions
diff --git a/src/modules/m_autoop.cpp b/src/modules/m_autoop.cpp
index 152e9d679..e1042c22b 100644
--- a/src/modules/m_autoop.cpp
+++ b/src/modules/m_autoop.cpp
@@ -24,13 +24,18 @@
#include "inspircd.h"
#include "listmode.h"
-/** Handles +w channel mode
- */
+enum
+{
+ // InspIRCd-specific.
+ RPL_ACCESSLIST = 910,
+ RPL_ENDOFACCESSLIST = 911
+};
+
class AutoOpList : public ListModeBase
{
public:
AutoOpList(Module* Creator)
- : ListModeBase(Creator, "autoop", 'w', "End of Channel Access List", 910, 911, true)
+ : ListModeBase(Creator, "autoop", 'w', "End of Channel Access List", RPL_ACCESSLIST, RPL_ENDOFACCESSLIST, true)
{
ranktoset = ranktounset = OP_VALUE;
syntax = "<prefix>:<mask>";
diff --git a/src/modules/m_banexception.cpp b/src/modules/m_banexception.cpp
index f15c270b0..0501e7670 100644
--- a/src/modules/m_banexception.cpp
+++ b/src/modules/m_banexception.cpp
@@ -26,28 +26,23 @@
#include "inspircd.h"
#include "listmode.h"
-/* Written by Om<om@inspircd.org>, April 2005. */
-/* Rewritten to use the listmode utility by Om, December 2005 */
-/* Adapted from m_exception, which was originally based on m_chanprotect and m_silence */
-
-// The +e channel mode takes a nick!ident@host, glob patterns allowed,
-// and if a user matches an entry on the +e list then they can join the channel, overriding any (+b) bans set on them
-// Now supports CIDR and IP addresses -- Brain
-
+enum
+{
+ // From RFC 2812.
+ RPL_EXCEPTLIST = 348,
+ RPL_ENDOFEXCEPTLIST = 349
+};
-/** Handles +e channel mode
- */
class BanException : public ListModeBase
{
public:
BanException(Module* Creator)
- : ListModeBase(Creator, "banexception", 'e', "End of Channel Exception List", 348, 349, true)
+ : ListModeBase(Creator, "banexception", 'e', "End of Channel Exception List", RPL_EXCEPTLIST, RPL_ENDOFEXCEPTLIST, true)
{
syntax = "<mask>";
}
};
-
class ModuleBanException : public Module
{
BanException be;
diff --git a/src/modules/m_chanfilter.cpp b/src/modules/m_chanfilter.cpp
index 8d2408e7a..18e2791e6 100644
--- a/src/modules/m_chanfilter.cpp
+++ b/src/modules/m_chanfilter.cpp
@@ -27,15 +27,20 @@
#include "listmode.h"
#include "modules/exemption.h"
-/** Handles channel mode +g
- */
+enum
+{
+ // InspIRCd-specific.
+ RPL_ENDOFSPAMFILTER = 940,
+ RPL_SPAMFILTER = 941
+};
+
class ChanFilter : public ListModeBase
{
public:
unsigned long maxlen;
ChanFilter(Module* Creator)
- : ListModeBase(Creator, "filter", 'g', "End of channel spamfilter list", 941, 940, false)
+ : ListModeBase(Creator, "filter", 'g', "End of channel spamfilter list", RPL_SPAMFILTER, RPL_ENDOFSPAMFILTER, false)
{
syntax = "<pattern>";
}
diff --git a/src/modules/m_exemptchanops.cpp b/src/modules/m_exemptchanops.cpp
index ddc75ac3d..b8f62137c 100644
--- a/src/modules/m_exemptchanops.cpp
+++ b/src/modules/m_exemptchanops.cpp
@@ -25,13 +25,17 @@
#include "listmode.h"
#include "modules/exemption.h"
-/** Handles channel mode +X
- */
+enum
+{
+ RPL_ENDOFEXEMPTIONLIST = 953,
+ RPL_EXEMPTIONLIST = 954
+};
+
class ExemptChanOps : public ListModeBase
{
public:
ExemptChanOps(Module* Creator)
- : ListModeBase(Creator, "exemptchanops", 'X', "End of channel exemptchanops list", 954, 953, false)
+ : ListModeBase(Creator, "exemptchanops", 'X', "End of channel exemptchanops list", RPL_EXEMPTIONLIST, RPL_ENDOFEXEMPTIONLIST, false)
{
syntax = "<restriction>:<prefix>";
}
diff --git a/src/modules/m_inviteexception.cpp b/src/modules/m_inviteexception.cpp
index a6819cc98..1690ed6c7 100644
--- a/src/modules/m_inviteexception.cpp
+++ b/src/modules/m_inviteexception.cpp
@@ -26,23 +26,18 @@
#include "inspircd.h"
#include "listmode.h"
-/*
- * Written by Om <om@inspircd.org>, April 2005.
- * Based on m_exception, which was originally based on m_chanprotect and m_silence
- *
- * The +I channel mode takes a nick!ident@host, glob patterns allowed,
- * and if a user matches an entry on the +I list then they can join the channel,
- * ignoring if +i is set on the channel
- * Now supports CIDR and IP addresses -- Brain
- */
+enum
+{
+ // From RFC 2812.
+ RPL_INVEXLIST = 346,
+ RPL_ENDOFINVEXLIST = 347
+};
-/** Handles channel mode +I
- */
class InviteException : public ListModeBase
{
public:
InviteException(Module* Creator)
- : ListModeBase(Creator, "invex", 'I', "End of Channel Invite Exception List", 346, 347, true)
+ : ListModeBase(Creator, "invex", 'I', "End of Channel Invite Exception List", RPL_INVEXLIST, RPL_ENDOFINVEXLIST, true)
{
syntax = "<mask>";
}