diff options
Diffstat (limited to 'include')
| -rw-r--r-- | include/account.h | 4 | ||||
| -rw-r--r-- | include/bots.h | 2 | ||||
| -rw-r--r-- | include/channels.h | 6 | ||||
| -rw-r--r-- | include/config.h | 4 | ||||
| -rw-r--r-- | include/extern.h | 4 | ||||
| -rw-r--r-- | include/operserv.h | 4 | ||||
| -rw-r--r-- | include/regchannel.h | 6 | ||||
| -rw-r--r-- | include/servers.h | 2 | ||||
| -rw-r--r-- | include/services.h | 4 | ||||
| -rw-r--r-- | include/users.h | 4 |
10 files changed, 20 insertions, 20 deletions
diff --git a/include/account.h b/include/account.h index 0b7c95b44..7644d9d89 100644 --- a/include/account.h +++ b/include/account.h @@ -100,7 +100,7 @@ class CoreExport NickRequest : public Extensible class NickCore; -class CoreExport NickAlias : public Extensible, public Flags<NickNameFlag> +class CoreExport NickAlias : public Extensible, public Flags<NickNameFlag, NS_END> { public: /** Default constructor @@ -135,7 +135,7 @@ class CoreExport NickAlias : public Extensible, public Flags<NickNameFlag> void OnCancel(User *u); }; -class CoreExport NickCore : public Extensible, public Flags<NickCoreFlag> +class CoreExport NickCore : public Extensible, public Flags<NickCoreFlag, NI_END> { public: /** Default constructor diff --git a/include/bots.h b/include/bots.h index 9227f5c68..1b017b058 100644 --- a/include/bots.h +++ b/include/bots.h @@ -29,7 +29,7 @@ enum BotFlag BI_END }; -class CoreExport BotInfo : public Extensible, public Flags<BotFlag> +class CoreExport BotInfo : public Extensible, public Flags<BotFlag, BI_END> { public: std::string uid; /* required for UID supporting servers, as opposed to the shitty struct Uid. */ diff --git a/include/channels.h b/include/channels.h index 75f5dad3d..7cdc32de3 100644 --- a/include/channels.h +++ b/include/channels.h @@ -39,7 +39,7 @@ struct UserContainer { User *user; UserData ud; - Flags<ChannelModeName> *Status; + Flags<ChannelModeName, CMODE_END> *Status; UserContainer(User *u) : user(u) { } virtual ~UserContainer() { } @@ -55,7 +55,7 @@ enum ChannelFlags CH_SYNCING }; -class CoreExport Channel : public Extensible, public Flags<ChannelFlags> +class CoreExport Channel : public Extensible, public Flags<ChannelFlags, CMODE_END> { private: /** A map of channel modes with their parameters set on this channel @@ -63,7 +63,7 @@ class CoreExport Channel : public Extensible, public Flags<ChannelFlags> std::map<ChannelModeName, std::string> Params; /* Modes set on the channel */ - Flags<ChannelModeName> modes; + Flags<ChannelModeName, CMODE_END> modes; public: /** Default constructor diff --git a/include/config.h b/include/config.h index 9849e8c59..f6f794a33 100644 --- a/include/config.h +++ b/include/config.h @@ -576,7 +576,7 @@ class ServerConfig /* Don't allow nicks to use /ns group to regroup nicks */ bool NSNoGroupChange; /* Default flags for newly registered nicks */ - Flags<NickCoreFlag> NSDefFlags; + Flags<NickCoreFlag, NI_END> NSDefFlags; /* Default language used by services */ unsigned NSDefLanguage; /* Users must be connected this long before they can register @@ -616,7 +616,7 @@ class ServerConfig bool NSAddAccessOnReg; /* Default flags for newly registered channels */ - Flags<ChannelInfoFlag> CSDefFlags; + Flags<ChannelInfoFlag, CI_END> CSDefFlags; /* Max number of channels a user can own */ unsigned CSMaxReg; /* Time before a channel expires */ diff --git a/include/extern.h b/include/extern.h index 093def853..9e6c94de7 100644 --- a/include/extern.h +++ b/include/extern.h @@ -326,8 +326,8 @@ E int str_is_cidr(char *str, uint32 * ip, uint32 * mask, char **host); /**** modes.cpp ****/ /* Number of generic modes we support */ E unsigned GenericChannelModes, GenericUserModes; -E Flags<ChannelModeName> DefMLockOn; -E Flags<ChannelModeName> DefMLockOff; +E Flags<ChannelModeName, CMODE_END> DefMLockOn; +E Flags<ChannelModeName, CMODE_END> DefMLockOff; E std::map<ChannelModeName, std::string> DefMLockParams; /* Modes to set on bots when they join the channel */ E std::list<ChannelModeStatus *> BotModes; diff --git a/include/operserv.h b/include/operserv.h index 35aff0dda..9dbe8e7c3 100644 --- a/include/operserv.h +++ b/include/operserv.h @@ -12,8 +12,8 @@ extern CoreExport std::vector<NewsItem *> News; extern CoreExport std::vector<std::bitset<32> > DefCon; extern CoreExport bool DefConModesSet; -extern CoreExport Flags<ChannelModeName> DefConModesOn; -extern CoreExport Flags<ChannelModeName> DefConModesOff; +extern CoreExport Flags<ChannelModeName, CMODE_END> DefConModesOn; +extern CoreExport Flags<ChannelModeName, CMODE_END> DefConModesOff; extern CoreExport std::map<ChannelModeName, std::string> DefConModesOnParams; class XLineManager; diff --git a/include/regchannel.h b/include/regchannel.h index 947deda8c..ec04134f1 100644 --- a/include/regchannel.h +++ b/include/regchannel.h @@ -62,15 +62,15 @@ enum ChannelInfoFlag CI_END }; -class CoreExport ChannelInfo : public Extensible, public Flags<ChannelInfoFlag> +class CoreExport ChannelInfo : public Extensible, public Flags<ChannelInfoFlag, CI_END> { private: std::map<ChannelModeName, std::string> Params; /* Map of parameters by mode name for mlock */ std::vector<ChanAccess *> access; /* List of authorized users */ std::vector<AutoKick *> akick; /* List of users to kickban */ std::vector<BadWord *> badwords; /* List of badwords */ - Flags<ChannelModeName> mlock_on; /* Modes mlocked on */ - Flags<ChannelModeName> mlock_off; /* Modes mlocked off */ + Flags<ChannelModeName, CMODE_END> mlock_on; /* Modes mlocked on */ + Flags<ChannelModeName, CMODE_END> mlock_off; /* Modes mlocked off */ public: /** Default constructor diff --git a/include/servers.h b/include/servers.h index 2da40143e..615705052 100644 --- a/include/servers.h +++ b/include/servers.h @@ -59,7 +59,7 @@ struct CapabInfo CapabType Flag; }; -extern CoreExport Flags<CapabType> Capab; +extern CoreExport Flags<CapabType, CAPAB_END> Capab; extern CoreExport CapabInfo Capab_Info[]; /** Flags set on servers diff --git a/include/services.h b/include/services.h index c945c10d4..766137ba2 100644 --- a/include/services.h +++ b/include/services.h @@ -308,10 +308,10 @@ class DatabaseException : public CoreException /** Class with the ability to keep flags on items, they should extend from this * where T is an enum. */ -template<typename T> class Flags +template<typename T, size_t Size = 32> class Flags { protected: - std::bitset<128> Flag_Values; + std::bitset<Size> Flag_Values; public: /** Add a flag to this item diff --git a/include/users.h b/include/users.h index f5df0607c..a6e75680b 100644 --- a/include/users.h +++ b/include/users.h @@ -20,7 +20,7 @@ extern CoreExport user_uid_map UserListByUID; struct ChannelContainer { Channel *chan; - Flags<ChannelModeName> *Status; + Flags<ChannelModeName, CMODE_END> *Status; ChannelContainer(Channel *c) : chan(c) { } virtual ~ChannelContainer() { } @@ -36,7 +36,7 @@ class CoreExport User : public Extensible std::string ident; std::string uid; bool OnAccess; /* If the user is on the access list of the nick theyre on */ - Flags<UserModeName> modes; /* Bitset of mode names the user has set on them */ + Flags<UserModeName, UMODE_END> modes; /* Bitset of mode names the user has set on them */ std::map<UserModeName, std::string> Params; /* Map of user modes and the params this user has */ NickCore *nc; /* NickCore account the user is currently loggged in as */ |
