summaryrefslogtreecommitdiff
path: root/src/cmd_topic.cpp
diff options
context:
space:
mode:
authorbrain <brain@e03df62e-2008-0410-955e-edbf42e46eb7>2007-02-11 18:50:04 +0000
committerbrain <brain@e03df62e-2008-0410-955e-edbf42e46eb7>2007-02-11 18:50:04 +0000
commitb111eec597349ad2dc7d4b54945097df813535b4 (patch)
tree4ed9808c0de98052ea3f7e284e1cbb39a4ddccd1 /src/cmd_topic.cpp
parent750f9e29370ced3fe6f1549acbfada9483eff5f4 (diff)
Allow for nick!user@host in TOPIC information.
Note that this adds another <options> tag value, 'hostintopic'. (defaults to yes) git-svn-id: http://svn.inspircd.org/repository/trunk/inspircd@6572 e03df62e-2008-0410-955e-edbf42e46eb7
Diffstat (limited to 'src/cmd_topic.cpp')
-rw-r--r--src/cmd_topic.cpp6
1 files changed, 5 insertions, 1 deletions
diff --git a/src/cmd_topic.cpp b/src/cmd_topic.cpp
index f9abaa309..dfd03a651 100644
--- a/src/cmd_topic.cpp
+++ b/src/cmd_topic.cpp
@@ -95,7 +95,11 @@ CmdResult cmd_topic::Handle (const char** parameters, int pcnt, userrec *user)
strlcpy(Ptr->topic, parameters[1], MAXTOPIC-1);
}
- strlcpy(Ptr->setby,user->nick,NICKMAX-1);
+ if (ServerInstance->Config->FullHostInTopic)
+ strlcpy(Ptr->setby,user->GetFullHost(),127);
+ else
+ strlcpy(Ptr->setby,user->nick,127);
+
Ptr->topicset = ServerInstance->Time();
Ptr->WriteChannel(user, "TOPIC %s :%s", Ptr->name, Ptr->topic);