fixed last commit
authorpk910 <philipp@zoelle1.de>
Sat, 20 Aug 2011 06:38:48 +0000 (08:38 +0200)
committerpk910 <philipp@zoelle1.de>
Sat, 20 Aug 2011 06:38:48 +0000 (08:38 +0200)
DBHelper.c

index f0897d25f03e4a657b534374f58b194e67ad46e6..1c7a66718378fda7843a1bbddfad999a5eefa841 100644 (file)
@@ -73,7 +73,7 @@ int checkChannelAccess(struct UserNode *user, struct ChanNode *chan, char *chann
     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;