diff options
-rw-r--r-- | include/regchannel.h | 6 | ||||
-rw-r--r-- | src/regchannel.cpp | 14 |
2 files changed, 6 insertions, 14 deletions
diff --git a/include/regchannel.h b/include/regchannel.h index 22e3a0474..156b48628 100644 --- a/include/regchannel.h +++ b/include/regchannel.h @@ -84,11 +84,11 @@ public: Anope::string last_topic; /* The last topic that was set on this channel */ Anope::string last_topic_setter; /* Setter */ - time_t last_topic_time; /* Time */ + time_t last_topic_time = 0; /* Time */ Channel::ModeList last_modes; /* The last modes set on this channel */ - int16_t bantype; + int16_t bantype = 2; MemoInfo memos; @@ -97,7 +97,7 @@ public: /* For BotServ */ Serialize::Reference<BotInfo> bi; /* Bot used on this channel */ - time_t banexpire; /* Time bans expire in */ + time_t banexpire = 0; /* Time bans expire in */ /** Constructor * @param chname The channel name diff --git a/src/regchannel.cpp b/src/regchannel.cpp index 376c8d661..851b3f0ac 100644 --- a/src/regchannel.cpp +++ b/src/regchannel.cpp @@ -106,24 +106,16 @@ ChannelInfo::ChannelInfo(const Anope::string &chname) : Serializable(CHANNELINFO_TYPE) , access(CHANACCESS_TYPE) , akick(AUTOKICK_TYPE) + , name(chname) + , time_registered(Anope::CurTime) + , last_used(Anope::CurTime) { if (chname.empty()) throw CoreException("Empty channel passed to ChannelInfo constructor"); - this->founder = NULL; - this->successor = NULL; this->c = Channel::Find(chname); if (this->c) this->c->ci = this; - this->banexpire = 0; - this->bi = NULL; - this->last_topic_time = 0; - - this->name = chname; - - this->bantype = 2; - this->memos.memomax = 0; - this->last_used = this->time_registered = Anope::CurTime; size_t old = RegisteredChannelList->size(); (*RegisteredChannelList)[this->name] = this; |