summaryrefslogtreecommitdiff
path: root/src/commands/cmd_gline.cpp
diff options
context:
space:
mode:
Diffstat (limited to 'src/commands/cmd_gline.cpp')
-rw-r--r--src/commands/cmd_gline.cpp4
1 files changed, 3 insertions, 1 deletions
diff --git a/src/commands/cmd_gline.cpp b/src/commands/cmd_gline.cpp
index 04b79a8cd..6a8c8f807 100644
--- a/src/commands/cmd_gline.cpp
+++ b/src/commands/cmd_gline.cpp
@@ -42,7 +42,8 @@ CmdResult CommandGline::Handle (const char** parameters, int pcnt, User *user)
}
long duration = ServerInstance->Duration(parameters[1]);
- if (ServerInstance->XLines->AddGLine(duration,user->nick,parameters[2],parameters[0]))
+ GLine* gl = new GLine(ServerInstance, ServerInstance->Time(), duration, user->nick, parameters[2], ih.first.c_str(), ih.second.c_str());
+ if (!ServerInstance->XLines->AddLine(gl))
{
FOREACH_MOD(I_OnAddGLine,OnAddGLine(duration, user, parameters[2], parameters[0]));
@@ -61,6 +62,7 @@ CmdResult CommandGline::Handle (const char** parameters, int pcnt, User *user)
}
else
{
+ delete gl;
user->WriteServ("NOTICE %s :*** G-Line for %s already exists",user->nick,parameters[0]);
}