fixes for multi thread support
[NeonServV5.git] / src / bot_NeonHelp.c
index ab241c15cbbb68bd85552f5f0ae7b938d9cc2e16..5e0e605076c9e3409f240ea6ef65536c7e9de80b 100644 (file)
@@ -263,7 +263,7 @@ static void neonhelp_event_privmsg_async(struct ClientSocket *client, struct Use
         }
     }
     printf_mysql_query("INSERT INTO `helpserv_requests` (`botid`, `host`, `hand`, `nick`, `status`, `supporter`, `time`, `text`) VALUES ('%d', '%s@%s', '%s', '%s', '0', '-1', UNIX_TIMESTAMP(), '%s')", client->clientid, escape_string(user->ident), escape_string(user->host), ((user->flags & USERFLAG_ISAUTHED) ? escape_string(user->auth) : "*"), escape_string(user->nick), escape_string(message));
-    helpnode->suppid = (int) mysql_insert_id(mysql_conn);
+    helpnode->suppid = (int) mysql_insert_id(get_mysql_conn());
     helpnode->log = NULL;
     helpnode->next = ((client->flags & SOCKET_HAVE_HELPNODE) ? client->botclass_helpnode : NULL);
     client->botclass_helpnode = helpnode;