removed getTextBot() function and added textbot parameter to the CMD_BIND header...
[NeonServV5.git] / src / modules / NeonServ.mod / cmd_neonserv_cunsuspend.c
index b9c6a368968050b3a32b4be7e5d4d8cb253ed789..6d02b6a1f0fa458d0e7044b26181bef2b7f24848 100644 (file)
@@ -25,7 +25,7 @@ CMD_BIND(neonserv_cmd_cunsuspend) {
     MYSQL_ROW row;
     char *channel = argv[0];
     if(!is_valid_chan(channel)) {
-        reply(getTextBot(), user, "NS_INVALID_CHANNEL_NAME", argv[0]);
+        reply(textclient, user, "NS_INVALID_CHANNEL_NAME", argv[0]);
         return;
     }
     int chanid;
@@ -34,17 +34,17 @@ CMD_BIND(neonserv_cmd_cunsuspend) {
     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], "0")) {
-        reply(getTextBot(), user, "NS_CUNSUSPEND_NOT", channel);
+        reply(textclient, user, "NS_CUNSUSPEND_NOT", channel);
         return;
     }
     int botid = atoi(row[0]);
@@ -63,6 +63,6 @@ CMD_BIND(neonserv_cmd_cunsuspend) {
             module_global_cmd_register_neonbackup(channel);
     }
     printf_mysql_query("UPDATE `bot_channels` SET `suspended` = '0' WHERE `id` = '%s'", row[1]);
-    reply(getTextBot(), user, "NS_CUNSUSPEND_DONE", channel);
+    reply(textclient, user, "NS_CUNSUSPEND_DONE", channel);
     logEvent(event);
 }