1
0
mirror of https://github.com/anope/anope.git synced 2026-07-07 07:53:12 +02:00

Calculate nc::channelcount at runtime

This commit is contained in:
Adam
2011-05-08 19:48:26 -04:00
parent 9fcbe293e2
commit 9962fae1a1
14 changed files with 57 additions and 48 deletions
+22
View File
@@ -166,6 +166,28 @@ ChannelInfo::~ChannelInfo()
--this->founder->channelcount;
}
/** Change the founder of the channek
* @params nc The new founder
*/
void ChannelInfo::SetFounder(NickCore *nc)
{
if (this->founder)
--this->founder->channelcount;
this->founder = nc;
if (this->founder)
++this->founder->channelcount;
if (this->founder == this->successor)
this->successor = NULL;
}
/** Get the founder of the channel
* @return The founder
*/
NickCore *ChannelInfo::GetFounder() const
{
return this->founder;
}
/** Find which bot should send mode/topic/etc changes for this channel
* @return The bot
*/