}
static void neonserv_trigger_callback(struct ChanNode *chan, char *trigger) {
- strcpy(trigger, "+");
+ MYSQL_RES *res;
+ MYSQL_ROW row;
+ loadChannelSettings(chan);
+ printf_mysql_query("SELECT `trigger` FROM `bot_channels` LEFT JOIN `bots` ON `botid` = `bots`.`id` WHERE `chanid` = '%d' AND `botclass` = '%d'", chan->channel_id, BOTID);
+ res = mysql_use();
+ row = mysql_fetch_row(res);
+ strcpy(trigger, (strlen(row[0]) ? row[0] : "+"));
}
static void start_bots() {