summaryrefslogtreecommitdiff
path: root/src
diff options
context:
space:
mode:
Diffstat (limited to 'src')
-rw-r--r--src/channels.cpp6
1 files changed, 4 insertions, 2 deletions
diff --git a/src/channels.cpp b/src/channels.cpp
index c39b7615b..b3a5a8d7f 100644
--- a/src/channels.cpp
+++ b/src/channels.cpp
@@ -1017,8 +1017,9 @@ Anope::string Channel::GetModes(bool complete, bool plus)
void Channel::ChangeTopicInternal(const Anope::string &user, const Anope::string &newtopic, time_t ts)
{
+ User *u = finduser(user);
this->topic = newtopic;
- this->topic_setter = user;
+ this->topic_setter = u ? u->nick : user;
this->topic_time = ts;
Log(LOG_DEBUG) << "Topic of " << this->name << " changed by " << user << " to " << newtopic;
@@ -1033,8 +1034,9 @@ void Channel::ChangeTopicInternal(const Anope::string &user, const Anope::string
void Channel::ChangeTopic(const Anope::string &user, const Anope::string &newtopic, time_t ts)
{
+ User *u = finduser(user);
this->topic = newtopic;
- this->topic_setter = user;
+ this->topic_setter = u ? u->nick : user;
this->topic_time = ts;
ircdproto->SendTopic(whosends(this->ci), this);