From 31f1e7ad092f8bf16ee653cc105eea4a769650ca Mon Sep 17 00:00:00 2001 From: brain Date: Mon, 19 May 2008 21:16:42 +0000 Subject: 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 --- src/modules/m_spanningtree/ftopic.cpp | 10 +++++----- 1 file changed, 5 insertions(+), 5 deletions(-) (limited to 'src/modules/m_spanningtree/ftopic.cpp') 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 & 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 & 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; } } -- cgit v1.3.1-10-gc9f91