-/* event_neonspam_join.c - NeonServ v5.2
- * Copyright (C) 2011 Philipp Kreil (pk910)
+/* event_neonspam_join.c - NeonServ v5.3
+ * 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
banmask = generate_banmask(chanuser->user, banmaskBuf);
printf_mysql_query("INSERT INTO `bans` (`ban_channel`, `ban_mask`, `ban_triggered`, `ban_timeout`, `ban_owner`, `ban_reason`) VALUES ('%d', '%s', UNIX_TIMESTAMP(), '%lu', '%d', '%s')", chanuser->chan->channel_id, escape_string(banmask), (unsigned long) (duration ? (time(0) + duration) : 0), 0, escape_string(reason));
if(duration) {
- int banid = (int) mysql_insert_id(mysql_conn);
+ int banid = (int) mysql_insert_id(get_mysql_conn());
char nameBuf[MAXLEN];
char banidBuf[20];
sprintf(nameBuf, "ban_%d", banid);