Hi. Just discovered a bug. If you add more than one operators to the config file, and then try the OPER user pass command, the server will respond with :You are now an IRC operator followed by :Password Incorrect.
I fixed the issue. Code change in lib/commands.js
Original:
// TODO: Local ops
OPER: function(user, name, password) {
if (!name || !password) {
user.send(this.host, irc.errors.wasNoSuchNick, user.nick, ':OPER requires a nick and password');
} else {
var userConfig,
self = this;
Object.keys(this.config.opers).forEach(function(nick) {
// TODO: ERR_NOOPERHOST (noOperHost)
ircd.compareHash(password, self.config.opers[nick].password, function(err, res) {
if (res) {
user.send(self.host, irc.reply.youAreOper, user.nick, ':You are now an IRC operator');
user.oper();
} else {
user.send(self.host, irc.errors.passwordWrong, user.nick, ':Password incorrect');
}
});
});
}
},
Fixed:
// TODO: Local ops
OPER: function(user, name, password) {
if (!name || !password) {
user.send(this.host, irc.errors.wasNoSuchNick, user.nick, ':OPER requires a nick and password');
} else {
var userConfig,
self = this;
ircd.compareHash(password, self.config.opers[name].password, function(err, res) {
if (res) {
user.send(self.host, irc.reply.youAreOper, user.nick, ':You are now an IRC operator');
user.oper();
} else {
user.send(self.host, irc.errors.passwordWrong, user.nick, ':Password incorrect');
}
});
}
},
Hi. Just discovered a bug. If you add more than one operators to the config file, and then try the OPER user pass command, the server will respond with :You are now an IRC operator followed by :Password Incorrect.
I fixed the issue. Code change in lib/commands.js
Original:
Fixed: