X-Git-Url: http://git.pk910.de/?a=blobdiff_plain;f=src%2Fmodules%2Fglobal.mod%2Fcmd_global_move.c;h=3e87d4551b8800e4944cc7a6a7fa7f8b2c48bc15;hb=78e040af3fcc36ab684611c0f98b4381ff420878;hp=3a1d50f425b885e49d54db178bf9cffa7dc48af8;hpb=306fdbcd56cfdb2fd97e37ef7cb4bc2d806669ca;p=NeonServV5.git diff --git a/src/modules/global.mod/cmd_global_move.c b/src/modules/global.mod/cmd_global_move.c index 3a1d50f..3e87d45 100644 --- a/src/modules/global.mod/cmd_global_move.c +++ b/src/modules/global.mod/cmd_global_move.c @@ -1,4 +1,4 @@ -/* cmd_global_move.c - NeonServ v5.4 +/* cmd_global_move.c - NeonServ v5.5 * Copyright (C) 2011-2012 Philipp Kreil (pk910) * * This program is free software: you can redistribute it and/or modify @@ -27,17 +27,17 @@ CMD_BIND(global_cmd_move) { char *channel = argv[0]; char *new_channel = argv[1]; if(!is_valid_chan(new_channel)) { - reply(getTextBot(), user, "NS_INVALID_CHANNEL_NAME", new_channel); + reply(textclient, user, "NS_INVALID_CHANNEL_NAME", new_channel); return; } if(!stricmp(channel, new_channel)) { - reply(getTextBot(), user, "NS_MOVE_SELF"); + reply(textclient, user, "NS_MOVE_SELF"); return; } printf_mysql_query("SELECT `channel_id` FROM `bot_channels` LEFT JOIN `channels` ON `channel_id` = `chanid` WHERE `channel_name` = '%s'", escape_string(new_channel)); res = mysql_use(); if ((row = mysql_fetch_row(res)) != NULL) { - reply(getTextBot(), user, "NS_REGISTER_ALREADY", new_channel, client->user->nick); + reply(textclient, user, "NS_REGISTER_ALREADY", new_channel, client->user->nick); return; } int chanid; @@ -46,17 +46,17 @@ CMD_BIND(global_cmd_move) { if ((row = mysql_fetch_row(res)) != NULL) { chanid = atoi(row[0]); } else { - reply(getTextBot(), user, "NS_UNREGISTER_NOT_REGISTERED", argv[0], client->user->nick); + reply(textclient, user, "NS_UNREGISTER_NOT_REGISTERED", argv[0], client->user->nick); return; } printf_mysql_query("SELECT `botid`, `bot_channels`.`id`, `suspended` FROM `bot_channels` LEFT JOIN `bots` ON `bot_channels`.`botid` = `bots`.`id` WHERE `chanid` = '%d' AND `botclass` = '%d'", chanid, client->botid); res = mysql_use(); if ((row = mysql_fetch_row(res)) == NULL) { - reply(getTextBot(), user, "NS_UNREGISTER_NOT_REGISTERED", argv[0], client->user->nick); + reply(textclient, user, "NS_UNREGISTER_NOT_REGISTERED", argv[0], client->user->nick); return; } if(!strcmp(row[2], "1")) { - reply(getTextBot(), user, "NS_MOVE_SUSPENDED"); + reply(textclient, user, "NS_MOVE_SUSPENDED"); return; } int botid = atoi(row[0]); @@ -92,6 +92,6 @@ CMD_BIND(global_cmd_move) { channode->flags &= ~CHANFLAG_CHAN_REGISTERED; channode->channel_id = 0; } - reply(getTextBot(), user, "NS_MOVE_DONE", channel, new_channel); + reply(textclient, user, "NS_MOVE_DONE", channel, new_channel); logEvent(event); }