From 2312f1fbd06ac01bb55e1d99070cde05a09a5a17 Mon Sep 17 00:00:00 2001 From: Adam Date: Sat, 7 Oct 2017 21:10:47 -0400 Subject: No longer expose c->ci and ci->c --- include/channels.h | 6 ++++-- include/modules/chanserv/channel.h | 4 ++-- 2 files changed, 6 insertions(+), 4 deletions(-) (limited to 'include') diff --git a/include/channels.h b/include/channels.h index 63e0559c3..d04a63bcf 100644 --- a/include/channels.h +++ b/include/channels.h @@ -53,8 +53,6 @@ class CoreExport Channel : public Base, public Extensible public: /* Channel name */ Anope::string name; - /* Set if this channel is registered. ci->c == this. Contains information relevant to the registered channel */ - Serialize::Reference ci; /* When the channel was created */ time_t creation_time; /* If the channel has just been created in a netjoin */ @@ -98,6 +96,10 @@ class CoreExport Channel : public Base, public Extensible */ ~Channel(); + /** Get the chanserv channel for this channel + */ + ChanServ::Channel *GetChannel(); + /** Gets the channels name * @return the channel name */ diff --git a/include/modules/chanserv/channel.h b/include/modules/chanserv/channel.h index a3b06b350..aab95de67 100644 --- a/include/modules/chanserv/channel.h +++ b/include/modules/chanserv/channel.h @@ -25,12 +25,12 @@ namespace ChanServ class CoreExport Channel : public Serialize::Object { public: - ::Channel *c = nullptr; /* Pointer to channel, if the channel exists */ - static constexpr const char *const NAME = "channel"; using Serialize::Object::Object; + ::Channel *GetChannel() { return ::Channel::Find(GetName()); } + virtual Anope::string GetName() anope_abstract; virtual void SetName(const Anope::string &) anope_abstract; -- cgit