summaryrefslogtreecommitdiff
path: root/include
diff options
context:
space:
mode:
authorw00t <w00t@e03df62e-2008-0410-955e-edbf42e46eb7>2008-08-04 15:28:29 +0000
committerw00t <w00t@e03df62e-2008-0410-955e-edbf42e46eb7>2008-08-04 15:28:29 +0000
commit904161fdba32468ff4d97d9533e62809131ed1a2 (patch)
tree77c35abdd8fdc34c6c63ca7d531aa2222781f08a /include
parent83c6918cfa416e8bf65a48973fe6b726d825e069 (diff)
Add Channel::SetTopic(User *, std::string &) to set topic on a channel. Use it in CommandTopic. Also modify OnLocalTopicChange to accept a new return value. (0 == proceed as normal, 1 == don't check anything, -1 == disallow change silently).
git-svn-id: http://svn.inspircd.org/repository/trunk/inspircd@10082 e03df62e-2008-0410-955e-edbf42e46eb7
Diffstat (limited to 'include')
-rw-r--r--include/channels.h6
1 files changed, 6 insertions, 0 deletions
diff --git a/include/channels.h b/include/channels.h
index c27329310..605ac8216 100644
--- a/include/channels.h
+++ b/include/channels.h
@@ -232,6 +232,12 @@ class CoreExport Channel : public Extensible
*/
std::string GetModeParameter(char mode);
+ /** Sets the channel topic.
+ * @param u The user setting the topic
+ * @param t The topic to set it to. Non-const, as it may be modified by a hook.
+ */
+ int SetTopic(User *u, std::string &t);
+
/** Obtain the channel "user counter"
* This returns the channel reference counter, which is initialized
* to 0 when the channel is created and incremented/decremented