summaryrefslogtreecommitdiff
path: root/src/channels.cpp
diff options
context:
space:
mode:
authorPeter Powell <petpow@saberuk.com>2013-12-11 05:05:36 +0000
committerAttila Molnar <attilamolnar@hush.com>2014-01-21 00:43:12 +0100
commitd0a472641b7c77fe5f40a6affb62de67be2ee888 (patch)
tree66fd6a7d57d2ca63f4251fb245d3d214d4210d75 /src/channels.cpp
parentb8f0e349ce8891d6236fc026c47139af1f05912c (diff)
Fix some logically dead code which was found by Coverity.
Diffstat (limited to 'src/channels.cpp')
-rw-r--r--src/channels.cpp12
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();