summaryrefslogtreecommitdiff
path: root/include
diff options
context:
space:
mode:
authorAdam- <Adam-@5417fbe8-f217-4b02-8779-1006273d7864>2009-11-07 21:46:58 +0000
committerAdam- <Adam-@5417fbe8-f217-4b02-8779-1006273d7864>2009-11-07 21:46:58 +0000
commit9047b0347df08f950c8cdbe8b4ea97870bcf76eb (patch)
treec111c82095d381d275b4a2df5dfb6f17211703c9 /include
parent029f39964b2e8f0371ef5bc776d1052d7894e695 (diff)
Made mlock_on, mlock_off, access, and akick private in ChannelInfo
git-svn-id: http://anope.svn.sourceforge.net/svnroot/anope/trunk@2630 5417fbe8-f217-4b02-8779-1006273d7864
Diffstat (limited to 'include')
-rw-r--r--include/regchannel.h34
1 files changed, 27 insertions, 7 deletions
diff --git a/include/regchannel.h b/include/regchannel.h
index 45c8341b6..73a0666ab 100644
--- a/include/regchannel.h
+++ b/include/regchannel.h
@@ -12,7 +12,11 @@
class CoreExport ChannelInfo : public Extensible
{
private:
- std::map<ChannelModeName, std::string> Params;
+ std::map<ChannelModeName, std::string> Params; /* Map of parameters by mode name */
+ std::vector<ChanAccess *> access; /* List of authorized users */
+ std::vector<AutoKick *> akick; /* List of users to kickban */
+ std::bitset<128> mlock_on; /* Modes mlocked on */
+ std::bitset<128> mlock_off; /* Modes mlocked off */
public:
ChannelInfo();
@@ -39,12 +43,6 @@ class CoreExport ChannelInfo : public Extensible
int16 bantype;
int16 *levels; /* Access levels for commands */
- std::vector<ChanAccess *> access; /* List of authorized users */
- std::vector<AutoKick *> akick; /* List of users to kickban */
-
- std::bitset<128> mlock_on;
- std::bitset<128> mlock_off;
-
char *entry_message; /* Notice sent on entering channel */
MemoInfo memos;
@@ -94,6 +92,11 @@ class CoreExport ChannelInfo : public Extensible
*/
ChanAccess *GetAccess(NickCore *nc, int16 level = 0);
+ /** Get the size of the accss vector for this channel
+ * @return The access vector size
+ */
+ const unsigned GetAccessCount() const;
+
/** Erase an entry from the channel access list
*
* @param index The index in the access list vector
@@ -130,6 +133,17 @@ class CoreExport ChannelInfo : public Extensible
*/
AutoKick *AddAkick(const std::string &user, const std::string &mask, const std::string &reason, time_t t = time(NULL));
+ /** Get an entry from the channel akick list
+ * @param index The index in the akick vector
+ * @return The akick structure, or NULL if not found
+ */
+ AutoKick *GetAkick(unsigned index);
+
+ /** Get the size of the akick vector for this channel
+ * @return The akick vector size
+ */
+ const unsigned GetAkickCount() const;
+
/** Erase an entry from the channel akick list
* @param akick The akick
*/
@@ -162,6 +176,12 @@ class CoreExport ChannelInfo : public Extensible
*/
void ClearMLock();
+ /** Get the number of mlocked modes for this channel
+ * @param status true for mlock on, false for mlock off
+ * @return The number of mlocked modes
+ */
+ const size_t GetMLockCount(bool status) const;
+
/** Set a channel mode param on the channel
* @param Name The mode
* @param param The param