X-Git-Url: https://git.netwichtig.de/gitweb/?a=blobdiff_plain;f=src%2Fmodules%2Fm_permchannels.cpp;h=ff269934e6fd111b434ca8d7caaa9fc14d006531;hb=819147178db00008a215670992d0f532dd57f9e5;hp=85c83940e79eb9899e4a0d15c366a10a8f6c8b62;hpb=b6dbd6caab62bc2c0d11ce5a45d511611eb9c2ef;p=user%2Fhenk%2Fcode%2Finspircd.git diff --git a/src/modules/m_permchannels.cpp b/src/modules/m_permchannels.cpp index 85c83940e..ff269934e 100644 --- a/src/modules/m_permchannels.cpp +++ b/src/modules/m_permchannels.cpp @@ -91,7 +91,7 @@ public: Implementation eventlist[] = { I_OnChannelPreDelete }; ServerInstance->Modules->Attach(eventlist, this, 1); - OnRehash(NULL, ""); + OnRehash(NULL); } virtual ~ModulePermanentChannels() @@ -100,7 +100,7 @@ public: delete p; } - virtual void OnRehash(User *user, const std::string ¶meter) + virtual void OnRehash(User *user) { /* * Process config-defined list of permanent channels. @@ -125,7 +125,17 @@ public: { c = new Channel(ServerInstance, channel, ServerInstance->Time()); if (!topic.empty()) + { c->SetTopic(NULL, topic, true); + + /* + * Due to the way protocol works in 1.2, we need to hack the topic TS in such a way that this + * topic will always win over others. + * + * This is scheduled for (proper) fixing in a later release, and can be removed at a later date. + */ + c->topicset = 42; + } ServerInstance->Logs->Log("blah", DEBUG, "Added %s with topic %s", channel.c_str(), topic.c_str()); if (modes.empty())