printf_mysql_query("SELECT `%s` FROM `channels` WHERE `channel_id` = '%d'", channel_setting, chan->channel_id);
res = mysql_use();
if ((row = mysql_fetch_row(res)) == NULL) return 0;
- int require_access = (row[0] ? atoi(row[0]) : getChanDefault(channel_setting));
+ int require_access = atoi((row[0] ? row[0] : getChanDefault(channel_setting)));
if(require_access == 0) return 1;
if(!(user->flags & USERFLAG_ISAUTHED)) return 0;
int caccess = 0;