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:
+3
-11
@@ -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;
|
||||
|
||||
Reference in New Issue
Block a user