diff options
Diffstat (limited to 'src/commands/cmd_kline.cpp')
-rw-r--r-- | src/commands/cmd_kline.cpp | 4 |
1 files changed, 3 insertions, 1 deletions
diff --git a/src/commands/cmd_kline.cpp b/src/commands/cmd_kline.cpp index 5bdc9dc96..324c92c13 100644 --- a/src/commands/cmd_kline.cpp +++ b/src/commands/cmd_kline.cpp @@ -42,7 +42,8 @@ CmdResult CommandKline::Handle (const char** parameters, int pcnt, User *user) } long duration = ServerInstance->Duration(parameters[1]); - if (ServerInstance->XLines->AddKLine(duration,user->nick,parameters[2],parameters[0])) + KLine* kl = new KLine(ServerInstance, ServerInstance->Time(), duration, user->nick, parameters[2], ih.first.c_str(), ih.second.c_str()); + if (!ServerInstance->XLines->AddLine(kl)) { FOREACH_MOD(I_OnAddKLine,OnAddKLine(duration, user, parameters[2], parameters[0])); @@ -61,6 +62,7 @@ CmdResult CommandKline::Handle (const char** parameters, int pcnt, User *user) } else { + delete kl; user->WriteServ("NOTICE %s :*** K-Line for %s already exists",user->nick,parameters[0]); } } |