summaryrefslogtreecommitdiff
path: root/include
diff options
context:
space:
mode:
authordanieldg <danieldg@e03df62e-2008-0410-955e-edbf42e46eb7>2009-11-15 18:26:25 +0000
committerdanieldg <danieldg@e03df62e-2008-0410-955e-edbf42e46eb7>2009-11-15 18:26:25 +0000
commitdf37ab42f454e3a96d59a2a86eb76bcb4af0818a (patch)
tree8e523c772ef0a2f19340ae80f5781766777f7a2a /include
parent800f02e7599d5f90d1c16f02cb1c28901d354140 (diff)
Hide channel mode structures
git-svn-id: http://svn.inspircd.org/repository/trunk/inspircd@12132 e03df62e-2008-0410-955e-edbf42e46eb7
Diffstat (limited to 'include')
-rw-r--r--include/channels.h42
-rw-r--r--include/modes/cmode_t.h3
2 files changed, 16 insertions, 29 deletions
diff --git a/include/channels.h b/include/channels.h
index 9b4e40375..3ad26ceda 100644
--- a/include/channels.h
+++ b/include/channels.h
@@ -55,14 +55,6 @@ class BanItem : public HostItem
{
};
-/** used to hold a channel and a users modes on that channel, e.g. +v, +h, +o
- */
-enum UserChannelModes {
- UCMODE_OP = 1, /* Opped user */
- UCMODE_VOICE = 2, /* Voiced user */
- UCMODE_HOP = 4 /* Halfopped user */
-};
-
/** Holds all relevent information for a channel.
* This class represents a channel, and contains its name, modes, topic, topic set time,
* etc, and an instance of the BanList type.
@@ -81,6 +73,19 @@ class CoreExport Channel : public Extensible
*/
int maxbans;
+ /** Modes for the channel.
+ * This is not a null terminated string! It is a bitset where
+ * each item in it represents if a mode is set. For example
+ * for mode +A, index 0. Use modechar-65 to calculate which
+ * field to check.
+ */
+ std::bitset<64> modes;
+
+ /** Parameters for custom modes.
+ * One for each custom mode letter.
+ */
+ CustomModeList custom_mode_params;
+
public:
/** Creates a channel record and initialises it with default values
* @throw Nothing at present.
@@ -89,33 +94,20 @@ class CoreExport Channel : public Extensible
/** The channel's name.
*/
- std::string name; /* CHANMAX */
+ std::string name;
/** Time that the object was instantiated (used for TS calculation etc)
*/
time_t age;
- /** Modes for the channel.
- * This is not a null terminated string! It is a bitset where
- * each item in it represents if a mode is set. For example
- * for mode +A, index 0. Use modechar-65 to calculate which
- * field to check.
- */
- std::bitset<64> modes;
-
/** User list.
*/
UserMembList userlist;
- /** Parameters for custom modes.
- * One for each custom mode letter.
- */
- CustomModeList custom_mode_params;
-
/** Channel topic.
* If this is an empty string, no channel topic is set.
*/
- std::string topic; /* MAXTOPIC */
+ std::string topic;
/** Time topic was set.
* If no topic was ever set, this will be equal to Channel::created
@@ -398,10 +390,6 @@ class CoreExport Channel : public Extensible
/** Clears the cached max bans value
*/
void ResetMaxBans();
-
- /** Destructor for Channel
- */
- virtual ~Channel() { /* stub */ }
};
#endif
diff --git a/include/modes/cmode_t.h b/include/modes/cmode_t.h
index 6d0ce4777..5f4bb9c60 100644
--- a/include/modes/cmode_t.h
+++ b/include/modes/cmode_t.h
@@ -17,9 +17,8 @@ class InspIRCd;
/** Channel mode +t
*/
-class ModeChannelTopicOps : public ModeHandler
+class ModeChannelTopicOps : public SimpleChannelModeHandler
{
public:
ModeChannelTopicOps();
- ModeAction OnModeChange(User* source, User* dest, Channel* channel, std::string &parameter, bool adding);
};