summary |
shortlog |
log |
commit | commitdiff |
tree
raw |
patch |
inline | side by side (from parent 1:
cf75ab8)
//get current trigger
MYSQL_RES *res;
MYSQL_ROW row;
//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);
res = mysql_use();
row = mysql_fetch_row(res);
+ trigger = (row[0] ? row[0] : row[1]);
if(argument) {
int uaccess = getChannelAccess(user, chan);
if(uaccess < 500) {
if(argument) {
int uaccess = getChannelAccess(user, chan);
if(uaccess < 500) {