summaryrefslogtreecommitdiff
path: root/src
diff options
context:
space:
mode:
Diffstat (limited to 'src')
-rw-r--r--src/cmd_topic.cpp6
-rw-r--r--src/configreader.cpp1
-rw-r--r--src/modules/m_spanningtree/treesocket1.cpp2
3 files changed, 7 insertions, 2 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);
diff --git a/src/configreader.cpp b/src/configreader.cpp
index 3060b9866..feb55b293 100644
--- a/src/configreader.cpp
+++ b/src/configreader.cpp
@@ -588,6 +588,7 @@ void ServerConfig::Read(bool bail, userrec* user)
{"options", "syntaxhints", "0", new ValueContainerBool (&this->SyntaxHints), DT_BOOLEAN, NoValidation},
{"options", "cyclehosts", "0", new ValueContainerBool (&this->CycleHosts), DT_BOOLEAN, NoValidation},
{"options", "ircumsgprefix","0", new ValueContainerBool (&this->UndernetMsgPrefix), DT_BOOLEAN, NoValidation},
+ {"options", "hostintopic", "1", new ValueContainerBool (&this->FullHostInTopic), DT_BOOLEAN, NoValidation},
{"pid", "file", "", new ValueContainerChar (this->PID), DT_CHARPTR, NoValidation},
{"whowas", "groupsize", "10", new ValueContainerInt (&this->WhoWasGroupSize), DT_INTEGER, NoValidation},
{"whowas", "maxgroups", "10240", new ValueContainerInt (&this->WhoWasMaxGroups), DT_INTEGER, NoValidation},
diff --git a/src/modules/m_spanningtree/treesocket1.cpp b/src/modules/m_spanningtree/treesocket1.cpp
index 1e25a2fff..c17f8d0f6 100644
--- a/src/modules/m_spanningtree/treesocket1.cpp
+++ b/src/modules/m_spanningtree/treesocket1.cpp
@@ -797,7 +797,7 @@ bool TreeSocket::ForceTopic(const std::string &source, std::deque<std::string> &
{
std::string oldtopic = c->topic;
strlcpy(c->topic,params[3].c_str(),MAXTOPIC);
- strlcpy(c->setby,params[2].c_str(),NICKMAX-1);
+ strlcpy(c->setby,params[2].c_str(),127);
c->topicset = ts;
/* if the topic text is the same as the current topic,
* dont bother to send the TOPIC command out, just silently