1
0
mirror of https://github.com/anope/anope.git synced 2026-07-03 17:23:14 +02:00

Initialize ChannelInfo in the Modern C++ way.

This commit is contained in:
Sadie Powell
2025-03-26 11:23:05 +00:00
parent b5213d5a81
commit f3e5ccf353
2 changed files with 6 additions and 14 deletions
+3 -11
View File
@@ -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;