From 845ca576b4c5a94f0a3ec12a4dd524a7d017155e Mon Sep 17 00:00:00 2001 From: Adam Date: Wed, 28 Jan 2015 22:57:15 -0500 Subject: More properly track topic change sources and allow users with access to change topics through topiclock --- include/channels.h | 2 +- include/modules.h | 5 +++-- 2 files changed, 4 insertions(+), 3 deletions(-) (limited to 'include') diff --git a/include/channels.h b/include/channels.h index 9bc6c27c6..80459d357 100644 --- a/include/channels.h +++ b/include/channels.h @@ -258,7 +258,7 @@ class CoreExport Channel : public Base, public Extensible * @param newtopic The new topic * @param ts The time the new topic is being set */ - void ChangeTopicInternal(const Anope::string &user, const Anope::string &newtopic, time_t ts = Anope::CurTime); + void ChangeTopicInternal(User *u, const Anope::string &user, const Anope::string &newtopic, time_t ts = Anope::CurTime); /** Update the topic of the channel, and reset it if topiclock etc says to * @param user The user setting the topic diff --git a/include/modules.h b/include/modules.h index 0569fd33f..5ea35c888 100644 --- a/include/modules.h +++ b/include/modules.h @@ -474,11 +474,12 @@ class CoreExport Module : public Extensible virtual void OnJoinChannel(User *u, Channel *c) { throw NotImplementedException(); } /** Called when a new topic is set + * @param source The user changing the topic, if any * @param c The channel - * @param setter The user who set the new topic + * @param setter The user who set the new topic, if there is no source * @param topic The new topic */ - virtual void OnTopicUpdated(Channel *c, const Anope::string &user, const Anope::string &topic) { throw NotImplementedException(); } + virtual void OnTopicUpdated(User *source, Channel *c, const Anope::string &user, const Anope::string &topic) { throw NotImplementedException(); } /** Called before a channel expires * @param ci The channel -- cgit