diff options
author | Attila Molnar <attilamolnar@hush.com> | 2016-04-11 15:53:01 +0200 |
---|---|---|
committer | Attila Molnar <attilamolnar@hush.com> | 2016-04-11 15:53:01 +0200 |
commit | 2706a993b3f8ee52e2728047fad6a56f7e3cf405 (patch) | |
tree | 30d99f78630372bbe630fcf47f2f32fc8891fbe9 /include/channels.h | |
parent | b25070bf5e9447533bf1a0555c6954740ca12340 (diff) |
Refactor topic setting logic to go through Channel::SetTopic() in all cases
- Pass topic set time and optionally the setter to SetTopic()
- Don't do anything if the topic is changed by a local user to what it is currently
Diffstat (limited to 'include/channels.h')
-rw-r--r-- | include/channels.h | 5 |
1 files changed, 4 insertions, 1 deletions
diff --git a/include/channels.h b/include/channels.h index 0a131ddb3..be872b7fe 100644 --- a/include/channels.h +++ b/include/channels.h @@ -138,8 +138,11 @@ class CoreExport Channel : public Extensible /** Sets the channel topic. * @param user The user setting the topic. * @param topic The topic to set it to. + * @param topicts Timestamp of the new topic. + * @param setter Setter string, may be used when the original setter is no longer online. + * If omitted or NULL, the setter string is obtained from the user. */ - void SetTopic(User* user, const std::string& topic); + void SetTopic(User* user, const std::string& topic, time_t topicts, const std::string* setter = NULL); /** Obtain the channel "user counter" * This returns the number of users on this channel |