fixed event_mode crash bug
authorpk910 <philipp@zoelle1.de>
Tue, 11 Oct 2011 12:45:47 +0000 (14:45 +0200)
committerpk910 <philipp@zoelle1.de>
Mon, 17 Oct 2011 14:06:47 +0000 (16:06 +0200)
src/event_neonserv_mode.c

index 505d70d1abe45b356fd90dcce8a2839f68ba6e7a..f6a48f37e7f4342d5a0a40f410a13600ede02ef2 100644 (file)
@@ -84,7 +84,7 @@ static void neonserv_event_mode_async1(struct ClientSocket *client, struct UserN
     modeBuf = initModeBuffer(client, chan);
     printf_mysql_query("SELECT `channel_canop`, `channel_canvoice`, `channel_canban`, `channel_enfmodes`, `channel_modes` FROM `channels` WHERE `channel_id` = '%d'", chan->channel_id);
     row = mysql_fetch_row(mysql_use());
-    if(row[0] == NULL || row[1] == NULL || row[2] == NULL || row[3] == NULL) {
+    if(row[0] == NULL || row[1] == NULL || row[2] == NULL || row[3] == NULL || row[4] == NULL) {
         printf_mysql_query("SELECT `channel_canop`, `channel_canvoice`, `channel_canban`, `channel_enfmodes`, `channel_modes` FROM `channels` WHERE `channel_name` = 'defaults'");
         defaults = mysql_fetch_row(mysql_use());
     }