diff options
Diffstat (limited to 'src/commands/cmd_eline.cpp')
-rw-r--r-- | src/commands/cmd_eline.cpp | 5 |
1 files changed, 4 insertions, 1 deletions
diff --git a/src/commands/cmd_eline.cpp b/src/commands/cmd_eline.cpp index a0b35bd64..176eef99d 100644 --- a/src/commands/cmd_eline.cpp +++ b/src/commands/cmd_eline.cpp @@ -37,7 +37,9 @@ CmdResult CommandEline::Handle (const char** parameters, int pcnt, User *user) } long duration = ServerInstance->Duration(parameters[1]); - if (ServerInstance->XLines->AddELine(duration,user->nick,parameters[2],parameters[0])) + + ELine* el = new ELine(ServerInstance, ServerInstance->Time(), duration, user->nick, parameters[2], ih.first.c_str(), ih.second.c_str()); + if (!ServerInstance->XLines->AddLine(el)) { FOREACH_MOD(I_OnAddELine,OnAddELine(duration, user, parameters[2], parameters[0])); @@ -54,6 +56,7 @@ CmdResult CommandEline::Handle (const char** parameters, int pcnt, User *user) } else { + delete el; user->WriteServ("NOTICE %s :*** E-Line for %s already exists",user->nick,parameters[0]); } } |