summaryrefslogtreecommitdiff
path: root/include/regchannel.h
diff options
context:
space:
mode:
authorAdam <Adam@anope.org>2012-12-29 20:29:41 -0500
committerAdam <Adam@anope.org>2012-12-29 20:29:41 -0500
commit326f1a9c8bfe0024883b5dd0da66ec7b9f1ac36f (patch)
treea129c46c40f1d5068bcbeba9030e24412e38fd8d /include/regchannel.h
parent793c4382868744f6a9522bd1a1865ffff1dbdb70 (diff)
Cleanup after mode locks, badwords, akick, access, if destructed
Diffstat (limited to 'include/regchannel.h')
-rw-r--r--include/regchannel.h13
1 files changed, 11 insertions, 2 deletions
diff --git a/include/regchannel.h b/include/regchannel.h
index 1cefe27dd..6c1b618b2 100644
--- a/include/regchannel.h
+++ b/include/regchannel.h
@@ -138,11 +138,12 @@ enum BadWordType
/* Structure used to contain bad words. */
struct CoreExport BadWord : Serializable
{
- ChannelInfo *ci;
+ Serialize::Reference<ChannelInfo> ci;
Anope::string word;
BadWordType type;
- BadWord() : Serializable("BadWord") { }
+ BadWord();
+ ~BadWord();
void Serialize(Serialize::Data &data) const anope_override;
static Serializable* Unserialize(Serializable *obj, Serialize::Data &);
};
@@ -172,6 +173,7 @@ class CoreExport AutoKick : public Flags<AutoKickFlag>, public Serializable
time_t last_used;
AutoKick();
+ ~AutoKick();
void Serialize(Serialize::Data &data) const anope_override;
static Serializable* Unserialize(Serializable *obj, Serialize::Data &);
};
@@ -187,6 +189,7 @@ struct CoreExport ModeLock : Serializable
time_t created;
ModeLock(ChannelInfo *ch, bool s, ChannelModeName n, const Anope::string &p, const Anope::string &se = "", time_t c = Anope::CurTime);
+ ~ModeLock();
void Serialize(Serialize::Data &data) const anope_override;
static Serializable* Unserialize(Serializable *obj, Serialize::Data &);
@@ -357,6 +360,8 @@ class CoreExport ChannelInfo : public Serializable, public Extensible, public Fl
*/
unsigned GetAkickCount() const;
+ void EraseAkick(const AutoKick *akick);
+
/** Erase an entry from the channel akick list
* @param index The index of the akick
*/
@@ -384,6 +389,8 @@ class CoreExport ChannelInfo : public Serializable, public Extensible, public Fl
*/
unsigned GetBadWordCount() const;
+ void EraseBadWord(const BadWord *bw);
+
/** Remove a badword
* @param index The index of the badword
*/
@@ -419,6 +426,8 @@ class CoreExport ChannelInfo : public Serializable, public Extensible, public Fl
*/
bool RemoveMLock(ChannelMode *mode, bool status, const Anope::string &param = "");
+ void RemoveMLock(ModeLock *mlock);
+
/** Clear all mlocks on the channel
*/
void ClearMLock();