projects
/
NeonServV5.git
/ commitdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
| commitdiff |
tree
raw
|
patch
|
inline
| side by side (parent:
b6a3428
)
added rename (debug) message (alertchan)
author
pk910
<philipp@zoelle1.de>
Tue, 24 Jul 2012 09:03:07 +0000
(11:03 +0200)
committer
pk910
<philipp@zoelle1.de>
Tue, 24 Jul 2012 09:06:38 +0000
(11:06 +0200)
src/DBHelper.c
patch
|
blob
|
history
diff --git
a/src/DBHelper.c
b/src/DBHelper.c
index cfcdd20eab128d79fde135e7f3ec133e1ba182cf..787b336845451821833f9303eba792ae1b87ac18 100644
(file)
--- a/
src/DBHelper.c
+++ b/
src/DBHelper.c
@@
-25,6
+25,8
@@
#include "IRCEvents.h"
#include "HandleInfoHandler.h"
#include "ClientSocket.h"
#include "IRCEvents.h"
#include "HandleInfoHandler.h"
#include "ClientSocket.h"
+#include "bots.h"
+#include "ConfigParser.h"
void _loadUserSettings(struct UserNode *user) {
SYNCHRONIZE(cache_sync);
void _loadUserSettings(struct UserNode *user) {
SYNCHRONIZE(cache_sync);
@@
-244,6
+246,14
@@
int renameAccount(char *oldauth, char *newauth) {
//simply rename the account
printf_mysql_query("UPDATE `users` SET `user_user` = '%s' WHERE `user_id` = '%d'", escape_string(newauth), userid);
}
//simply rename the account
printf_mysql_query("UPDATE `users` SET `user_user` = '%s' WHERE `user_id` = '%d'", escape_string(newauth), userid);
}
+ char *alertchan = get_string_field("General.CheckAuths.alertchan");
+ if(alertchan) {
+ struct ChanNode *alertchan_chan = getChanByName(alertchan);
+ struct ClientSocket *alertclient;
+ if(alertchan_chan && (alertclient = getChannelBot(alertchan_chan, 0)) != NULL) {
+ putsock(alertclient, "PRIVMSG %s :Renamed User %s to %s", alertchan_chan->name, oldauth, newauth);
+ }
+ }
return 1;
}
return 0;
return 1;
}
return 0;