From 6eda236eab01792cdf777a1a3c74515c8067d318 Mon Sep 17 00:00:00 2001 From: Shivaram Lingamneni Date: Tue, 14 Aug 2018 22:50:20 -0400 Subject: [PATCH] remove allow-multiple-per-connection --- irc/config.go | 1 - irc/handlers.go | 8 ++------ irc/nickserv.go | 8 ++------ oragono.yaml | 4 ---- 4 files changed, 4 insertions(+), 17 deletions(-) diff --git a/irc/config.go b/irc/config.go index b27891b6..be216aad 100644 --- a/irc/config.go +++ b/irc/config.go @@ -81,7 +81,6 @@ type AccountRegistrationConfig struct { VerifyMessage string `yaml:"verify-message"` } } - AllowMultiplePerConnection bool `yaml:"allow-multiple-per-connection"` } type VHostConfig struct { diff --git a/irc/handlers.go b/irc/handlers.go index 789cbdf8..643a6649 100644 --- a/irc/handlers.go +++ b/irc/handlers.go @@ -85,12 +85,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 diff --git a/irc/nickserv.go b/irc/nickserv.go index 57c982d2..cfd2ed5e 100644 --- a/irc/nickserv.go +++ b/irc/nickserv.go @@ -264,12 +264,8 @@ func nsRegisterHandler(server *Server, client *Client, command, params string, r } if client.LoggedIntoAccount() { - if server.AccountConfig().Registration.AllowMultiplePerConnection { - server.accounts.Logout(client) - } else { - nsNotice(rb, client.t("You're already logged into an account")) - return - } + nsNotice(rb, client.t("You're already logged into an account")) + return } config := server.AccountConfig() diff --git a/oragono.yaml b/oragono.yaml index 5ea4ffdd..628b0d3c 100644 --- a/oragono.yaml +++ b/oragono.yaml @@ -163,10 +163,6 @@ accounts: # password: "" # sender: "admin@my.network" - # allow multiple account registrations per connection - # this is for testing purposes and shouldn't be allowed on real networks - allow-multiple-per-connection: false - # is account authentication enabled? authentication-enabled: true