X-Git-Url: http://git.pk910.de/?p=NeonServV5.git;a=blobdiff_plain;f=src%2Fmodules%2Fglobal.mod%2Fcmd_global_move.c;h=aeac792a99d35f68f543f0f929ac4fb17ae76eac;hp=3a1d50f425b885e49d54db178bf9cffa7dc48af8;hb=de5f0224c8b119f1be15457262bd6e66f160657f;hpb=9f5af1bc8ff4e8fc9c28433c76a890a990dd0ae5 diff --git a/src/modules/global.mod/cmd_global_move.c b/src/modules/global.mod/cmd_global_move.c index 3a1d50f..aeac792 100644 --- a/src/modules/global.mod/cmd_global_move.c +++ b/src/modules/global.mod/cmd_global_move.c @@ -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); }