summaryrefslogtreecommitdiff
path: root/src/regchannel.cpp
diff options
context:
space:
mode:
Diffstat (limited to 'src/regchannel.cpp')
-rw-r--r--src/regchannel.cpp22
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
*/