projects
/
NeonServV5.git
/ blobdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
|
commitdiff
|
tree
raw
|
inline
| side by side
added NeonBackup bot
[NeonServV5.git]
/
src
/
main.c
diff --git
a/src/main.c
b/src/main.c
index 1292a82c7c627c68e6241e80e3dab80fcaf18774..08193780344d6b59b4257ececd6c636b4342c824 100644
(file)
--- a/
src/main.c
+++ b/
src/main.c
@@
-40,6
+40,7
@@
#include "version.h"
#include "modules.h"
#include "module_commands.h"
#include "version.h"
#include "modules.h"
#include "module_commands.h"
+#include "ModuleFunctions.h"
time_t start_time;
static int running, hard_restart;
time_t start_time;
static int running, hard_restart;
@@
-295,6
+296,7
@@
main:
register_module_commands();
init_handleinfohandler();
init_tools();
register_module_commands();
init_handleinfohandler();
init_tools();
+ init_modulefunctions();
loadModules();
init_bots();
init_DBHelper();
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) {
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) {
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")) {
}
}
} else if(exists && !strcmp(row[1], "0")) {