X-Git-Url: http://git.pk910.de/?a=blobdiff_plain;f=src%2Fmain.c;h=2e0e5f3da2d8d5b34bda5b7d629f05efcdfa39de;hb=78e040af3fcc36ab684611c0f98b4381ff420878;hp=1292a82c7c627c68e6241e80e3dab80fcaf18774;hpb=0d993c4b7d13b4ca8df1f3c10c39c4a9e5a16643;p=NeonServV5.git diff --git a/src/main.c b/src/main.c index 1292a82..2e0e5f3 100644 --- a/src/main.c +++ b/src/main.c @@ -1,4 +1,4 @@ -/* main.c - NeonServ v5.4 +/* main.c - NeonServ v5.5 * Copyright (C) 2011-2012 Philipp Kreil (pk910) * * This program is free software: you can redistribute it and/or modify @@ -40,6 +40,7 @@ #include "version.h" #include "modules.h" #include "module_commands.h" +#include "ModuleFunctions.h" time_t start_time; static int running, hard_restart; @@ -295,6 +296,7 @@ main: register_module_commands(); init_handleinfohandler(); init_tools(); + init_modulefunctions(); loadModules(); init_bots(); init_DBHelper(); @@ -437,10 +439,16 @@ static AUTHLOOKUP_CALLBACK(main_checkauths_callback) { deleteUser(atoi(row[0])); char *alertchan = get_string_field("General.CheckAuths.alertchan"); if(alertchan) { + char reason[MAXLEN]; + if(!exists) { + strcpy(reason, "USER_NOT_EXISTS"); + } else { + sprintf(reason, "USER_REGISTERED_MISSMATCH: %lu, expected %d (diff: %d)", (unsigned long) registered, atoi(row[1]), diff); + } struct ChanNode *alertchan_chan = getChanByName(alertchan); struct ClientSocket *alertclient; if(alertchan_chan && (alertclient = getChannelBot(alertchan_chan, 0)) != NULL) { - putsock(alertclient, "PRIVMSG %s :Deleted User %s", alertchan_chan->name, auth); + putsock(alertclient, "PRIVMSG %s :Deleted User %s (%s)", alertchan_chan->name, auth, reason); } } } else if(exists && !strcmp(row[1], "0")) {