diff options
author | Sadie Powell <sadie@witchery.services> | 2025-03-12 14:20:43 +0000 |
---|---|---|
committer | Sadie Powell <sadie@witchery.services> | 2025-03-12 15:53:52 +0000 |
commit | e7b18609f6141b7ad4acb1e233aebd2fd48d775f (patch) | |
tree | 8534b2e980b63e2a9fedb9c86183ab2673a6b303 /src/regchannel.cpp | |
parent | cdcf0e2f9a8fb0e1c363fc65f71f3131fc6c5ea5 (diff) |
Add defines for the core serialisation type names.
Diffstat (limited to 'src/regchannel.cpp')
-rw-r--r-- | src/regchannel.cpp | 21 |
1 files changed, 13 insertions, 8 deletions
diff --git a/src/regchannel.cpp b/src/regchannel.cpp index 51b395399..88adf49b8 100644 --- a/src/regchannel.cpp +++ b/src/regchannel.cpp @@ -19,9 +19,10 @@ #include "bots.h" #include "servers.h" -Serialize::Checker<registered_channel_map> RegisteredChannelList("ChannelInfo"); +Serialize::Checker<registered_channel_map> RegisteredChannelList(CHANNELINFO_TYPE); -AutoKick::AutoKick() : Serializable("AutoKick") +AutoKick::AutoKick() + : Serializable(AUTOKICK_TYPE) { } @@ -39,7 +40,7 @@ AutoKick::~AutoKick() } AutoKick::Type::Type() - : Serialize::Type("AutoKick") + : Serialize::Type(AUTOKICK_TYPE) { } @@ -101,8 +102,10 @@ Serializable *AutoKick::Type::Unserialize(Serializable *obj, Serialize::Data &da return ak; } -ChannelInfo::ChannelInfo(const Anope::string &chname) : Serializable("ChannelInfo"), - access("ChanAccess"), akick("AutoKick") +ChannelInfo::ChannelInfo(const Anope::string &chname) + : Serializable(CHANNELINFO_TYPE) + , access(CHANACCESS_TYPE) + , akick(AUTOKICK_TYPE) { if (chname.empty()) throw CoreException("Empty channel passed to ChannelInfo constructor"); @@ -130,8 +133,10 @@ ChannelInfo::ChannelInfo(const Anope::string &chname) : Serializable("ChannelInf FOREACH_MOD(OnCreateChan, (this)); } -ChannelInfo::ChannelInfo(const ChannelInfo &ci) : Serializable("ChannelInfo"), - access("ChanAccess"), akick("AutoKick") +ChannelInfo::ChannelInfo(const ChannelInfo &ci) + : Serializable(CHANNELINFO_TYPE) + , access(CHANACCESS_TYPE) + , akick(AUTOKICK_TYPE) { *this = ci; @@ -185,7 +190,7 @@ ChannelInfo::~ChannelInfo() } ChannelInfo::Type::Type() - : Serialize::Type("ChannelInfo") + : Serialize::Type(CHANNELINFO_TYPE) { } |