diff options
| author | Adam <Adam@anope.org> | 2011-05-08 19:48:26 -0400 |
|---|---|---|
| committer | Adam <Adam@anope.org> | 2011-05-16 04:10:18 -0400 |
| commit | 9962fae1a176d62813d8c83ca77104a2efc60e92 (patch) | |
| tree | 6174b6e37e963a7d4fc479d51411b416aac8dc8d /src/regchannel.cpp | |
| parent | 9fcbe293e2820a92921762d892767e2b1802c9c0 (diff) | |
Calculate nc::channelcount at runtime
Diffstat (limited to 'src/regchannel.cpp')
| -rw-r--r-- | src/regchannel.cpp | 22 |
1 files changed, 22 insertions, 0 deletions
diff --git a/src/regchannel.cpp b/src/regchannel.cpp index 5a94027ae..1bd8807d9 100644 --- a/src/regchannel.cpp +++ b/src/regchannel.cpp @@ -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 */ |
