fixes for multi thread support
[NeonServV5.git] / src / cmd_neonserv_nicklist.c
index ff5564411b3e5fc243d78b97c4a7d1d8e82480eb..6178198598f07d5ef4b9395fc1b70aea17034d2e 100644 (file)
@@ -1,5 +1,5 @@
 /* cmd_neonserv_nicklist.c - NeonServ v5.3
- * Copyright (C) 2011  Philipp Kreil (pk910)
+ * Copyright (C) 2011-2012  Philipp Kreil (pk910)
  * 
  * This program is free software: you can redistribute it and/or modify
  * it under the terms of the GNU General Public License as published by
@@ -212,7 +212,7 @@ static void neonserv_cmd_nicklist_async1(struct ClientSocket *client, struct Cli
     table_free(table);
     if(synced_user) {
         if(!syncusers)
-            reply(textclient, user, "NS_NICKLIST_SYNC");
+            reply(textclient, user, "NS_NICKLIST_SYNC", db_enfops, db_enfvoice);
         else
             logEvent(event);
     }
@@ -229,7 +229,7 @@ static void neonserv_cmd_nicklist_synchronize_user(struct ChanNode *chan, struct
         userid = atoi(row[0]);
     } else {
         printf_mysql_query("INSERT INTO `users` (`user_user`) VALUES ('%s')", escape_string(user->auth));
-        userid = (int) mysql_insert_id(mysql_conn);
+        userid = (int) mysql_insert_id(get_mysql_conn());
     }
     //check if already added
     printf_mysql_query("SELECT `chanuser_access`, `chanuser_id`, `chanuser_seen` FROM `chanusers` WHERE `chanuser_cid` = '%d' AND `chanuser_uid` = '%d'", chan->channel_id, userid);