- if ((row = mysql_fetch_row(res)) == NULL) {
- return;
- }
- botid = atoi(row[0]);
- for(bot = getBots(SOCKET_FLAG_READY, NULL); bot; bot = getBots(SOCKET_FLAG_READY, bot)) {
- if(bot->clientid == botid)
- break;
- }
- printf_mysql_query("DELETE FROM `bot_channels` WHERE `id` = '%s'", row[1]);
- if(bot && strcmp(row[2], "1")) {
- putsock(bot, "PART %s :Channel unregistered.", channel);
+ if ((row = mysql_fetch_row(res))) {
+ botid = atoi(row[0]);
+ for(bot = getBots(SOCKET_FLAG_READY, NULL); bot; bot = getBots(SOCKET_FLAG_READY, bot)) {
+ if(bot->clientid == botid)
+ break;
+ }
+ printf_mysql_query("DELETE FROM `bot_channels` WHERE `id` = '%s'", row[1]);
+ if(bot && strcmp(row[2], "1"))
+ putsock(bot, "PART %s :Channel unregistered.", channel);