summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--src/modules/m_sakick.cpp10
1 files changed, 1 insertions, 9 deletions
diff --git a/src/modules/m_sakick.cpp b/src/modules/m_sakick.cpp
index 3dd7ed3d1..0e37acc3f 100644
--- a/src/modules/m_sakick.cpp
+++ b/src/modules/m_sakick.cpp
@@ -35,18 +35,10 @@ class CommandSakick : public Command
{
User* dest = ServerInstance->FindNick(parameters[1]);
Channel* channel = ServerInstance->FindChan(parameters[0]);
- const char* reason = "";
if ((dest) && (dest->registered == REG_ALL) && (channel))
{
- if (parameters.size() > 2)
- {
- reason = parameters[2].c_str();
- }
- else
- {
- reason = dest->nick.c_str();
- }
+ const std::string& reason = (parameters.size() > 2) ? parameters[2] : dest->nick;
if (ServerInstance->ULine(dest->server))
{