1
0
Fork 0
forked from External/ergo

Merge remote-tracking branch 'origin/master' into passhashing.2

This commit is contained in:
Shivaram Lingamneni 2018-08-15 13:02:05 -04:00
commit cbc2b07d35
14 changed files with 150 additions and 129 deletions

View file

@ -84,12 +84,8 @@ func parseCallback(spec string, config *AccountConfig) (callbackNamespace string
func accRegisterHandler(server *Server, client *Client, msg ircmsg.IrcMessage, rb *ResponseBuffer) bool {
// clients can't reg new accounts if they're already logged in
if client.LoggedIntoAccount() {
if server.AccountConfig().Registration.AllowMultiplePerConnection {
server.accounts.Logout(client)
} else {
rb.Add(nil, server.name, ERR_REG_UNSPECIFIED_ERROR, client.nick, "*", client.t("You're already logged into an account"))
return false
}
rb.Add(nil, server.name, ERR_REG_UNSPECIFIED_ERROR, client.nick, "*", client.t("You're already logged into an account"))
return false
}
// get and sanitise account name