mirror of https://github.com/calzoneman/sync.git
Log aliases when someone logs in
This commit is contained in:
parent
5a95bacee4
commit
bbd03e4e0f
|
@ -375,10 +375,6 @@ Channel.prototype.acceptUser = function (user) {
|
|||
this.logger.log("[login] Accepted connection from " + user.displayip);
|
||||
}
|
||||
|
||||
if (user.is(Flags.U_LOGGED_IN)) {
|
||||
this.logger.log("[login] " + user.displayip + " authenticated as " + user.getName());
|
||||
}
|
||||
|
||||
var self = this;
|
||||
user.waitFlag(Flags.U_LOGGED_IN, function () {
|
||||
for (var i = 0; i < self.users.length; i++) {
|
||||
|
@ -387,6 +383,12 @@ Channel.prototype.acceptUser = function (user) {
|
|||
self.users[i].kick("Duplicate login");
|
||||
}
|
||||
}
|
||||
|
||||
var loginStr = "[login] " + user.displayip + " logged in as " + user.getName();
|
||||
if (user.account.globalRank === 0) loginStr += " (guest)";
|
||||
loginStr += " (aliases: " + user.account.aliases.join(",") + ")";
|
||||
self.logger.log(loginStr);
|
||||
|
||||
self.sendUserJoin(self.users, user);
|
||||
});
|
||||
|
||||
|
|
|
@ -288,9 +288,6 @@ User.prototype.login = function (name, pw) {
|
|||
db.recordVisit(self.realip, self.getName());
|
||||
self.socket.emit("rank", self.account.effectiveRank);
|
||||
Logger.syslog.log(self.realip + " logged in as " + user.name);
|
||||
if (self.inChannel()) {
|
||||
self.channel.logger.log(self.displayip + " logged in as " + user.name);
|
||||
}
|
||||
self.setFlag(Flags.U_LOGGED_IN);
|
||||
self.clearFlag(Flags.U_LOGGING_IN);
|
||||
self.emit("login", self.account);
|
||||
|
@ -378,9 +375,6 @@ User.prototype.guestLogin = function (name) {
|
|||
db.recordVisit(self.realip, self.getName());
|
||||
self.socket.emit("rank", 0);
|
||||
Logger.syslog.log(self.realip + " signed in as " + name);
|
||||
if (self.inChannel()) {
|
||||
self.channel.logger.log(self.displayip + " signed in as " + name);
|
||||
}
|
||||
self.setFlag(Flags.U_LOGGED_IN);
|
||||
self.emit("login", self.account);
|
||||
});
|
||||
|
|
Loading…
Reference in New Issue