From f3e5ccf353bf9833f792d0b1db2833a115383521 Mon Sep 17 00:00:00 2001 From: Sadie Powell Date: Wed, 26 Mar 2025 11:23:05 +0000 Subject: Initialize ChannelInfo in the Modern C++ way. --- src/regchannel.cpp | 14 +++----------- 1 file changed, 3 insertions(+), 11 deletions(-) (limited to 'src') 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; -- cgit