diff options
Diffstat (limited to 'modules/commands')
-rw-r--r-- | modules/commands/cs_entrymsg.cpp | 7 | ||||
-rw-r--r-- | modules/commands/cs_register.cpp | 4 | ||||
-rw-r--r-- | modules/commands/cs_seen.cpp | 7 | ||||
-rw-r--r-- | modules/commands/cs_set_misc.cpp | 7 | ||||
-rw-r--r-- | modules/commands/cs_suspend.cpp | 7 | ||||
-rw-r--r-- | modules/commands/hs_request.cpp | 3 | ||||
-rw-r--r-- | modules/commands/ns_ajoin.cpp | 7 | ||||
-rw-r--r-- | modules/commands/ns_set_misc.cpp | 7 | ||||
-rw-r--r-- | modules/commands/ns_suspend.cpp | 7 | ||||
-rw-r--r-- | modules/commands/os_forbid.h | 5 | ||||
-rw-r--r-- | modules/commands/os_ignore.h | 2 | ||||
-rw-r--r-- | modules/commands/os_news.h | 2 | ||||
-rw-r--r-- | modules/commands/os_oper.cpp | 7 | ||||
-rw-r--r-- | modules/commands/os_session.h | 5 |
14 files changed, 58 insertions, 19 deletions
diff --git a/modules/commands/cs_entrymsg.cpp b/modules/commands/cs_entrymsg.cpp index d3fd7270c..b4aaf805a 100644 --- a/modules/commands/cs_entrymsg.cpp +++ b/modules/commands/cs_entrymsg.cpp @@ -20,7 +20,7 @@ struct EntryMsg : Serializable Anope::string message; time_t when; - EntryMsg(ChannelInfo *c, const Anope::string &cname, const Anope::string &cmessage, time_t ct = Anope::CurTime) : Serializable("EntryMsg") + EntryMsg(ChannelInfo *c, const Anope::string &cname, const Anope::string &cmessage, time_t ct = Anope::CurTime) { this->ci = c; @@ -29,6 +29,11 @@ struct EntryMsg : Serializable this->when = ct; } + Anope::string serialize_name() const + { + return "EntryMsg"; + } + serialized_data serialize() { serialized_data data; diff --git a/modules/commands/cs_register.cpp b/modules/commands/cs_register.cpp index 840db4b73..eb0f3de46 100644 --- a/modules/commands/cs_register.cpp +++ b/modules/commands/cs_register.cpp @@ -54,8 +54,12 @@ class CommandCSRegister : public Command if (!chdesc.empty()) ci->desc = chdesc; + ci->mode_locks = def_mode_locks; for (ChannelInfo::ModeList::iterator it = ci->mode_locks.begin(), it_end = ci->mode_locks.end(); it != it_end; ++it) + { it->second.setter = u->nick; + it->second.ci = ci; + } if (c && !c->topic.empty()) { diff --git a/modules/commands/cs_seen.cpp b/modules/commands/cs_seen.cpp index 3c63e56ed..f879965dc 100644 --- a/modules/commands/cs_seen.cpp +++ b/modules/commands/cs_seen.cpp @@ -33,10 +33,15 @@ struct SeenInfo : Serializable Anope::string message; // for part/kick/quit time_t last; // the time when the user was last seen - SeenInfo() : Serializable("SeenInfo") + SeenInfo() { } + Anope::string serialize_name() const + { + return "SeenInfo"; + } + serialized_data serialize() { serialized_data data; diff --git a/modules/commands/cs_set_misc.cpp b/modules/commands/cs_set_misc.cpp index 3329d3aa2..bbd936c65 100644 --- a/modules/commands/cs_set_misc.cpp +++ b/modules/commands/cs_set_misc.cpp @@ -18,10 +18,15 @@ struct CSMiscData : Anope::string, ExtensibleItem, Serializable Anope::string name; Anope::string data; - CSMiscData(ChannelInfo *c, const Anope::string &n, const Anope::string &d) : Serializable("CSMiscData"), ci(c), name(n), data(d) + CSMiscData(ChannelInfo *c, const Anope::string &n, const Anope::string &d) : ci(c), name(n), data(d) { } + Anope::string serialize_name() const + { + return "CSMiscData"; + } + serialized_data serialize() { serialized_data sdata; diff --git a/modules/commands/cs_suspend.cpp b/modules/commands/cs_suspend.cpp index 48dcd4045..7a0740382 100644 --- a/modules/commands/cs_suspend.cpp +++ b/modules/commands/cs_suspend.cpp @@ -18,10 +18,15 @@ struct ChanSuspend : ExtensibleItem, Serializable Anope::string chan; time_t when; - ChanSuspend() : Serializable("ChanSuspend") + ChanSuspend() { } + Anope::string serialize_name() const + { + return "ChanSuspend"; + } + serialized_data serialize() { serialized_data sd; diff --git a/modules/commands/hs_request.cpp b/modules/commands/hs_request.cpp index f7a904979..0e9934a33 100644 --- a/modules/commands/hs_request.cpp +++ b/modules/commands/hs_request.cpp @@ -30,8 +30,9 @@ struct HostRequest : ExtensibleItem, Serializable Anope::string host; time_t time; - HostRequest() : Serializable("HostRequest") + Anope::string serialize_name() const { + return "HostRequest"; } serialized_data serialize() diff --git a/modules/commands/ns_ajoin.cpp b/modules/commands/ns_ajoin.cpp index 5e2a99aa0..1f578a7cf 100644 --- a/modules/commands/ns_ajoin.cpp +++ b/modules/commands/ns_ajoin.cpp @@ -17,7 +17,12 @@ struct AJoinList : std::vector<std::pair<Anope::string, Anope::string> >, Extens { NickCore *nc; - AJoinList(NickCore *n) : Serializable("AJoinList"), nc(n) { } + AJoinList(NickCore *n) : nc(n) { } + + Anope::string serialize_name() const + { + return "AJoinList"; + } serialized_data serialize() { diff --git a/modules/commands/ns_set_misc.cpp b/modules/commands/ns_set_misc.cpp index 1cfd4fad3..b53b8ceaf 100644 --- a/modules/commands/ns_set_misc.cpp +++ b/modules/commands/ns_set_misc.cpp @@ -19,10 +19,15 @@ struct NSMiscData : Anope::string, ExtensibleItem, Serializable Anope::string name; Anope::string data; - NSMiscData(NickCore *ncore, const Anope::string &n, const Anope::string &d) : Serializable("NSMiscdata"), nc(ncore), name(n), data(d) + NSMiscData(NickCore *ncore, const Anope::string &n, const Anope::string &d) : nc(ncore), name(n), data(d) { } + Anope::string serialize_name() const + { + return "NSMiscData"; + } + serialized_data serialize() { serialized_data sdata; diff --git a/modules/commands/ns_suspend.cpp b/modules/commands/ns_suspend.cpp index 9f7e3a1b8..4d862a264 100644 --- a/modules/commands/ns_suspend.cpp +++ b/modules/commands/ns_suspend.cpp @@ -18,10 +18,15 @@ struct NickSuspend : ExtensibleItem, Serializable Anope::string nick; time_t when; - NickSuspend() : Serializable("NickSuspend") + NickSuspend() { } + Anope::string serialize_name() const + { + return "NickSuspend"; + } + serialized_data serialize() { serialized_data sd; diff --git a/modules/commands/os_forbid.h b/modules/commands/os_forbid.h index 00e769919..1ccb36e91 100644 --- a/modules/commands/os_forbid.h +++ b/modules/commands/os_forbid.h @@ -18,10 +18,7 @@ struct ForbidData : Serializable time_t expires; ForbidType type; - ForbidData() : Serializable("ForbidData") - { - } - + Anope::string serialize_name() const { return "ForbidData"; } serialized_data serialize(); static void unserialize(serialized_data &data); }; diff --git a/modules/commands/os_ignore.h b/modules/commands/os_ignore.h index 84bf5442d..e64bee2f9 100644 --- a/modules/commands/os_ignore.h +++ b/modules/commands/os_ignore.h @@ -17,7 +17,7 @@ struct IgnoreData : Serializable Anope::string reason; time_t time; /* When do we stop ignoring them? */ - IgnoreData() : Serializable("IgnoreData") { } + Anope::string serialize_name() const { return "IgnoreData"; } serialized_data serialize(); static void unserialize(serialized_data &data); }; diff --git a/modules/commands/os_news.h b/modules/commands/os_news.h index 2b2fd7528..02e2c8147 100644 --- a/modules/commands/os_news.h +++ b/modules/commands/os_news.h @@ -22,7 +22,7 @@ struct NewsItem : Serializable Anope::string who; time_t time; - NewsItem() : Serializable("NewsItem") { } + Anope::string serialize_name() const { return "NewsItem"; } serialized_data serialize(); static void unserialize(serialized_data &data); }; diff --git a/modules/commands/os_oper.cpp b/modules/commands/os_oper.cpp index 18391e4ca..ce4a91645 100644 --- a/modules/commands/os_oper.cpp +++ b/modules/commands/os_oper.cpp @@ -15,7 +15,12 @@ struct MyOper : Oper, Serializable { - MyOper(const Anope::string &n, OperType *o) : Oper(n, o), Serializable("Oper") { } + MyOper(const Anope::string &n, OperType *o) : Oper(n, o) { } + + Anope::string serialize_name() const + { + return "Oper"; + } serialized_data serialize() { diff --git a/modules/commands/os_session.h b/modules/commands/os_session.h index 8d04e31c5..898c40fa5 100644 --- a/modules/commands/os_session.h +++ b/modules/commands/os_session.h @@ -10,10 +10,7 @@ struct Exception : Serializable time_t time; /* When this exception was added */ time_t expires; /* Time when it expires. 0 == no expiry */ - Exception() : Serializable("Exception") - { - } - + Anope::string serialize_name() const { return "Exception"; } serialized_data serialize(); static void unserialize(serialized_data &data); }; |