//get current trigger
MYSQL_RES *res;
MYSQL_ROW row;
- printf_mysql_query("SELECT `trigger` FROM `bot_channels` WHERE `chanid` = '%d' AND `botid` = '%d'", chan->channel_id, client->clientid);
+ printf_mysql_query("SELECT `trigger`, `defaulttrigger` FROM `bot_channels` LEFT JOIN `bots` ON `botid` = `bots`.`id` WHERE `chanid` = '%d' AND `botid` = '%d'", chan->channel_id, client->clientid);
res = mysql_use();
row = mysql_fetch_row(res);
- trigger = row[0];
+ trigger = (row[0] ? row[0] : row[1]);
if(argument) {
int uaccess = getChannelAccess(user, chan);
if(uaccess < 500) {