summaryrefslogtreecommitdiff
path: root/src/modules/m_spanningtree/ftopic.cpp
diff options
context:
space:
mode:
authorbrain <brain@e03df62e-2008-0410-955e-edbf42e46eb7>2008-05-19 21:16:42 +0000
committerbrain <brain@e03df62e-2008-0410-955e-edbf42e46eb7>2008-05-19 21:16:42 +0000
commit31f1e7ad092f8bf16ee653cc105eea4a769650ca (patch)
treedced0411d5fbe803fe92ea54cb03d36c0a817563 /src/modules/m_spanningtree/ftopic.cpp
parent869bd02318d94a38369a125726b8edeb54ba0706 (diff)
Convert channel::name to std::string, this was a beastie!
git-svn-id: http://svn.inspircd.org/repository/trunk/inspircd@9770 e03df62e-2008-0410-955e-edbf42e46eb7
Diffstat (limited to 'src/modules/m_spanningtree/ftopic.cpp')
-rw-r--r--src/modules/m_spanningtree/ftopic.cpp10
1 files changed, 5 insertions, 5 deletions
diff --git a/src/modules/m_spanningtree/ftopic.cpp b/src/modules/m_spanningtree/ftopic.cpp
index 80854f3b1..3ea775112 100644
--- a/src/modules/m_spanningtree/ftopic.cpp
+++ b/src/modules/m_spanningtree/ftopic.cpp
@@ -31,11 +31,11 @@ bool TreeSocket::ForceTopic(const std::string &source, std::deque<std::string> &
Channel* c = this->Instance->FindChan(params[0]);
if (c)
{
- if ((ts >= c->topicset) || (!*c->topic))
+ if ((ts >= c->topicset) || (c->topic.empty()))
{
std::string oldtopic = c->topic;
- strlcpy(c->topic,params[3].c_str(),MAXTOPIC);
- strlcpy(c->setby,params[2].c_str(),127);
+ c->topic.assign(params[3], 0, MAXTOPIC);
+ c->setby.assign(params[2], 0, 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
@@ -46,11 +46,11 @@ bool TreeSocket::ForceTopic(const std::string &source, std::deque<std::string> &
User* user = this->Instance->FindNick(source);
if (!user)
{
- c->WriteChannelWithServ(Instance->Config->ServerName, "TOPIC %s :%s", c->name, c->topic);
+ c->WriteChannelWithServ(Instance->Config->ServerName, "TOPIC %s :%s", c->name.c_str(), c->topic.c_str());
}
else
{
- c->WriteChannel(user, "TOPIC %s :%s", c->name, c->topic);
+ c->WriteChannel(user, "TOPIC %s :%s", c->name.c_str(), c->topic.c_str());
nsource = user->server;
}
}