X-Git-Url: https://git.netwichtig.de/gitweb/?a=blobdiff_plain;f=src%2Fmodules%2Fm_permchannels.cpp;h=9a5da5ce49e2313f85ee907beadb14d63957b5ab;hb=2706a993b3f8ee52e2728047fad6a56f7e3cf405;hp=22513abeafdb8c20fc27da671425e4925f43d1ca;hpb=b25070bf5e9447533bf1a0555c6954740ca12340;p=user%2Fhenk%2Fcode%2Finspircd.git diff --git a/src/modules/m_permchannels.cpp b/src/modules/m_permchannels.cpp index 22513abea..9a5da5ce4 100644 --- a/src/modules/m_permchannels.cpp +++ b/src/modules/m_permchannels.cpp @@ -207,16 +207,16 @@ public: c = new Channel(channel, TS); unsigned int topicset = tag->getInt("topicts"); - c->topic = tag->getString("topic"); + std::string topic = tag->getString("topic"); - if ((topicset != 0) || (!c->topic.empty())) + if ((topicset != 0) || (!topic.empty())) { if (topicset == 0) topicset = ServerInstance->Time(); - c->topicset = topicset; - c->setby = tag->getString("topicsetby"); - if (c->setby.empty()) - c->setby = ServerInstance->Config->ServerName; + std::string topicsetby = tag->getString("topicsetby"); + if (topicsetby.empty()) + topicsetby = ServerInstance->Config->ServerName; + c->SetTopic(ServerInstance->FakeClient, topic, topicset, &topicsetby); } ServerInstance->Logs->Log(MODNAME, LOG_DEBUG, "Added %s with topic %s", channel.c_str(), c->topic.c_str());