summaryrefslogtreecommitdiff
path: root/src/commands/cmd_part.cpp
diff options
context:
space:
mode:
Diffstat (limited to 'src/commands/cmd_part.cpp')
-rw-r--r--src/commands/cmd_part.cpp12
1 files changed, 4 insertions, 8 deletions
diff --git a/src/commands/cmd_part.cpp b/src/commands/cmd_part.cpp
index 32cc26757..aadb42d90 100644
--- a/src/commands/cmd_part.cpp
+++ b/src/commands/cmd_part.cpp
@@ -48,17 +48,13 @@ CmdResult CommandPart::Handle (const std::vector<std::string>& parameters, User
{
if (!ServerInstance->Config->FixedPart.empty())
reason = ServerInstance->Config->FixedPart;
- else
- {
- if (parameters.size() > 1)
- reason = ServerInstance->Config->PrefixPart + parameters[1] + ServerInstance->Config->SuffixPart;
- else
- reason = "";
- }
+ else if (parameters.size() > 1)
+ reason = ServerInstance->Config->PrefixPart + parameters[1] + ServerInstance->Config->SuffixPart;
}
else
{
- reason = parameters.size() > 1 ? parameters[1] : "";
+ if (parameters.size() > 1)
+ reason = parameters[1];
}
if (ServerInstance->Parser->LoopCall(user, this, parameters, 0))