/* bots.c - NeonServ v5.3
- * Copyright (C) 2011 Philipp Kreil (pk910)
+ * Copyright (C) 2011-2012 Philipp Kreil (pk910)
*
* This program is free software: you can redistribute it and/or modify
* it under the terms of the GNU General Public License as published by
}
printf_mysql_query("SELECT `trigger`, `defaulttrigger` FROM `bot_channels` LEFT JOIN `bots` ON `botid` = `bots`.`id` WHERE `chanid` = '%d' AND `botclass` = '0' AND `botid` = '%d'", chan->channel_id, clientid);
res = mysql_use();
- row = mysql_fetch_row(res);
+ if(!(row = mysql_fetch_row(res))) {
+ strcpy(trigger, "");
+ return;
+ }
if(row[0] && *row[0])
strcpy(trigger, row[0]);
else