#include "bot_NeonHelp.h"
#include "modcmd.h"
#include "cmd_neonhelp.h"
+#include "lang.h"
#include "mysqlConn.h"
#include "ClientSocket.h"
#include "UserNode.h"
#include "IRCParser.h"
#include "bots.h"
#include "DBHelper.h"
+#include "WHOHandler.h"
#define BOTID 4
#define BOTALIAS "NeonHelp"
{"NH_REQUEST_OTHERS_0", "There are no other unhandled requests."},
{"NH_REQUEST_OTHERS_1", "There is 1 other unhandled request."},
{"NH_REQUEST_OTHERS_2", "There are %d other unhandled requests."}, /* {ARGS: 1337} */
- {"NH_REQUEST_FOOTER_1", "Everything you tell me until you are helped (or you leave %s) will be recorded. If you part %s, your request will be lost."}, /* {ARGS: "#test"} */
- {"NH_REQUEST_FOOTER_2", "Everything you tell me until you are helped (or you leave %s or %s) will be recorded. If you part %s or %s, your request will be lost."}, /* {ARGS: "#test", "#test-support"} */
+ {"NH_REQUEST_FOOTER_1", "Everything you tell me until you are helped (or you leave %1$s) will be recorded. If you part %1$s, your request will be lost."}, /* {ARGS: "#test"} */
+ {"NH_REQUEST_FOOTER_2", "Everything you tell me until you are helped (or you leave %1$s or %2$s) will be recorded. If you part %1$s or %2$s, your request will be lost."}, /* {ARGS: "#test", "#test-support"} */
{"NH_NEW_REQUEST", "New request #%d by %s: %s"}, /* {ARGS: 5, "pk910", "Help, I've fallen and I can't get up!"} */
{"NH_NEXT_NONE", "No more requests."},
{"NH_NEXT_NOT_FOUND", "No request found."},
}
}
-static void destroy_support_request(struct ClientSocket *client, struct NeonHelpNode *helpnode, int reply) {
+static void destroy_support_request(struct ClientSocket *client, struct NeonHelpNode *helpnode, int do_reply) {
printf_mysql_query("UPDATE `helpserv_requests` SET `status` = '2' WHERE `id` = %d", helpnode->suppid);
- if(reply) {
+ if(do_reply) {
reply(client, helpnode->user, "NH_DELETED", helpnode->suppid);
}
free(helpnode);
static void neonhelp_event_quit(struct UserNode *target, char *reason) {
struct ClientSocket *client;
- MYSQL_RES *res;
- MYSQL_ROW row;
- struct ChanNode *support, *public;
int userHasRequest;
for(client = getBots(SOCKET_FLAG_READY, NULL); client; client = getBots(SOCKET_FLAG_READY, client)) {
if(client->botid == BOTID) {