X-Git-Url: http://git.pk910.de/?a=blobdiff_plain;f=src%2Fmodules%2Fglobal.mod%2Fcmd_global_reconnect.c;h=1ac409a160b09218940691dcb87597039f0dbe6b;hb=fc61be208ca6dbf2fd915591c8dc7e5ef5779891;hp=254fa471f3c3561670b28c2874d7d7607720df15;hpb=689da1db7e2517c187ce76c6c553e20d630a7f36;p=NeonServV5.git diff --git a/src/modules/global.mod/cmd_global_reconnect.c b/src/modules/global.mod/cmd_global_reconnect.c index 254fa47..1ac409a 100644 --- a/src/modules/global.mod/cmd_global_reconnect.c +++ b/src/modules/global.mod/cmd_global_reconnect.c @@ -1,4 +1,4 @@ -/* cmd_global_reconnect.c - NeonServ v5.4 +/* cmd_global_reconnect.c - NeonServ v5.6 * Copyright (C) 2011-2012 Philipp Kreil (pk910) * * This program is free software: you can redistribute it and/or modify @@ -29,21 +29,21 @@ CMD_BIND(global_cmd_reconnect) { printf_mysql_query("SELECT `id` FROM `bots` WHERE `nick` = '%s' OR `id` = '%s'", escape_string(argv[0]), escape_string(argv[0])); res = mysql_use(); if((row = mysql_fetch_row(res)) == NULL) { - reply(getTextBot(), user, "NS_DELBOT_NOT_FOUND", argv[0]); + reply(textclient, user, "NS_DELBOT_NOT_FOUND", argv[0]); return; } botid = atoi(row[0]); for(client = getBots(0, NULL); client; client = getBots(0, client)) { if(client->clientid == botid) { - disconnect_socket(client); - client->flags |= SOCKET_FLAG_FAST_JUMP; + close_socket(client); + connect_socket(client); break; } } } else { - disconnect_socket(client); + close_socket(client); connect_socket(client); } - reply(getTextBot(), user, "NS_RECONNECT_DONE"); + reply(textclient, user, "NS_RECONNECT_DONE"); logEvent(event); }