diff options
| author | 2013-06-16 21:53:05 +0200 | |
|---|---|---|
| committer | 2013-06-16 21:53:05 +0200 | |
| commit | a85bc774f9c4acbb2dbc1d9ddd02a460c5555391 (patch) | |
| tree | 452977de6368f8e01e81d48f1484275be6f69fbe /src/modules | |
| parent | Add RE2 regex module. (diff) | |
| download | inspircd++-a85bc774f9c4acbb2dbc1d9ddd02a460c5555391.tar.gz inspircd++-a85bc774f9c4acbb2dbc1d9ddd02a460c5555391.tar.bz2 inspircd++-a85bc774f9c4acbb2dbc1d9ddd02a460c5555391.zip | |
Always set the topic in Channel::SetTopic(), move access checks into cmd_topic
Diffstat (limited to 'src/modules')
| -rw-r--r-- | src/modules/m_permchannels.cpp | 2 | ||||
| -rw-r--r-- | src/modules/m_satopic.cpp | 6 |
2 files changed, 3 insertions, 5 deletions
diff --git a/src/modules/m_permchannels.cpp b/src/modules/m_permchannels.cpp index ff1a35ba9..0b4d96c0f 100644 --- a/src/modules/m_permchannels.cpp +++ b/src/modules/m_permchannels.cpp @@ -197,7 +197,7 @@ public: c = new Channel(channel, ServerInstance->Time()); if (!topic.empty()) { - c->SetTopic(ServerInstance->FakeClient, topic, true); + c->SetTopic(ServerInstance->FakeClient, topic); /* * Due to the way protocol works in 1.2, we need to hack the topic TS in such a way that this diff --git a/src/modules/m_satopic.cpp b/src/modules/m_satopic.cpp index c15c9e91b..56098635b 100644 --- a/src/modules/m_satopic.cpp +++ b/src/modules/m_satopic.cpp @@ -40,10 +40,8 @@ class CommandSATopic : public Command if(target) { - std::string newTopic = parameters[1]; - - // 3rd parameter overrides access checks - target->SetTopic(user, newTopic, true); + const std::string& newTopic = parameters[1]; + target->SetTopic(user, newTopic); ServerInstance->SNO->WriteGlobalSno('a', user->nick + " used SATOPIC on " + target->name + ", new topic: " + newTopic); return CMD_SUCCESS; |
