From b2f5fc1e32971532c9f302884007e645ea3c38ce Mon Sep 17 00:00:00 2001 From: brain Date: Wed, 8 Mar 2006 18:25:51 +0000 Subject: Fixed #defines to be enums (tidier) Removed UCMODE_PROTECT/UCMODE_FOUNDER git-svn-id: http://svn.inspircd.org/repository/trunk/inspircd@3555 e03df62e-2008-0410-955e-edbf42e46eb7 --- include/channels.h | 27 ++++++++++++++------------- 1 file changed, 14 insertions(+), 13 deletions(-) diff --git a/include/channels.h b/include/channels.h index f15464123..c3658c6b0 100644 --- a/include/channels.h +++ b/include/channels.h @@ -24,12 +24,14 @@ #include #include -#define CM_TOPICLOCK 1 -#define CM_NOEXTERNAL 2 -#define CM_INVITEONLY 4 -#define CM_MODERATED 8 -#define CM_SECRET 16 -#define CM_PRIVATE 32 +enum ChannelModes { + CM_TOPICLOCK = 1, + CM_NOEXTERNAL = 2, + CM_INVITEONLY = 4, + CM_MODERATED = 8, + CM_SECRET = 16, + CM_PRIVATE = 32 +}; class userrec; @@ -230,14 +232,13 @@ class chanrec : public Extensible virtual ~chanrec() { /* stub */ } }; -/* used to hold a channel and a users modes on that channel, e.g. +v, +h, +o +/** used to hold a channel and a users modes on that channel, e.g. +v, +h, +o * needs to come AFTER struct chanrec */ - -#define UCMODE_OP 1 -#define UCMODE_VOICE 2 -#define UCMODE_HOP 4 -#define UCMODE_PROTECT 8 -#define UCMODE_FOUNDER 16 +enum UserChannelModes { + UCMODE_OP = 1, + UCMODE_VOICE = 2, + UCMODE_HOP = 4 +}; /** Holds a user's modes on a channel * This class associates a users privilages with a channel by creating a pointer link between -- cgit v1.2.3