summaryrefslogtreecommitdiff
path: root/src/commands/cmd_part.cpp
diff options
context:
space:
mode:
authorattilamolnar <attilamolnar@hush.com>2012-11-28 02:37:49 +0100
committerattilamolnar <attilamolnar@hush.com>2012-11-28 19:28:52 +0100
commit2d2e0469b8ac7c64c9dc22f7074db8fc245e2f13 (patch)
tree6645e1002a23da05d3f651b1a341b75445c65992 /src/commands/cmd_part.cpp
parent790f8c35841ef7c9ec123242611613b540f14c2c (diff)
Change empty string assignments to .clear() or remove them entirely
Part 2 of ba5c0db795824c3fc1ad48ce332d7bdc440cb77f
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))