diff options
| author | 2013-12-11 05:05:36 +0000 | |
|---|---|---|
| committer | 2014-01-21 00:43:12 +0100 | |
| commit | d0a472641b7c77fe5f40a6affb62de67be2ee888 (patch) | |
| tree | 66fd6a7d57d2ca63f4251fb245d3d214d4210d75 /src/channels.cpp | |
| parent | m_svshold Add config option to hide snotices (diff) | |
| download | inspircd++-d0a472641b7c77fe5f40a6affb62de67be2ee888.tar.gz inspircd++-d0a472641b7c77fe5f40a6affb62de67be2ee888.tar.bz2 inspircd++-d0a472641b7c77fe5f40a6affb62de67be2ee888.zip | |
Fix some logically dead code which was found by Coverity.
Diffstat (limited to 'src/channels.cpp')
| -rw-r--r-- | src/channels.cpp | 12 |
1 files changed, 2 insertions, 10 deletions
diff --git a/src/channels.cpp b/src/channels.cpp index b5132c8b3..c546e68db 100644 --- a/src/channels.cpp +++ b/src/channels.cpp @@ -116,16 +116,8 @@ int Channel::SetTopic(User *u, std::string &ntopic, bool forceset) } this->topic.assign(ntopic, 0, ServerInstance->Config->Limits.MaxTopic); - if (u) - { - this->setby.assign(ServerInstance->Config->FullHostInTopic ? u->GetFullHost() : u->nick, 0, 128); - this->WriteChannel(u, "TOPIC %s :%s", this->name.c_str(), this->topic.c_str()); - } - else - { - this->setby.assign(ServerInstance->Config->ServerName); - this->WriteChannelWithServ(ServerInstance->Config->ServerName, "TOPIC %s :%s", this->name.c_str(), this->topic.c_str()); - } + this->setby.assign(ServerInstance->Config->FullHostInTopic ? u->GetFullHost() : u->nick, 0, 128); + this->WriteChannel(u, "TOPIC %s :%s", this->name.c_str(), this->topic.c_str()); this->topicset = ServerInstance->Time(); |
