Browse Source

remove allow-multiple-per-connection

tags/v0.12.0
Shivaram Lingamneni 5 years ago
parent
commit
6eda236eab
4 changed files with 4 additions and 17 deletions
  1. 0
    1
      irc/config.go
  2. 2
    6
      irc/handlers.go
  3. 2
    6
      irc/nickserv.go
  4. 0
    4
      oragono.yaml

+ 0
- 1
irc/config.go View File

@@ -81,7 +81,6 @@ type AccountRegistrationConfig struct {
81 81
 			VerifyMessage        string `yaml:"verify-message"`
82 82
 		}
83 83
 	}
84
-	AllowMultiplePerConnection bool `yaml:"allow-multiple-per-connection"`
85 84
 }
86 85
 
87 86
 type VHostConfig struct {

+ 2
- 6
irc/handlers.go View File

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

+ 2
- 6
irc/nickserv.go View File

@@ -264,12 +264,8 @@ func nsRegisterHandler(server *Server, client *Client, command, params string, r
264 264
 	}
265 265
 
266 266
 	if client.LoggedIntoAccount() {
267
-		if server.AccountConfig().Registration.AllowMultiplePerConnection {
268
-			server.accounts.Logout(client)
269
-		} else {
270
-			nsNotice(rb, client.t("You're already logged into an account"))
271
-			return
272
-		}
267
+		nsNotice(rb, client.t("You're already logged into an account"))
268
+		return
273 269
 	}
274 270
 
275 271
 	config := server.AccountConfig()

+ 0
- 4
oragono.yaml View File

@@ -163,10 +163,6 @@ accounts:
163 163
         #         password: ""
164 164
         #         sender: "admin@my.network"
165 165
 
166
-        # allow multiple account registrations per connection
167
-        # this is for testing purposes and shouldn't be allowed on real networks
168
-        allow-multiple-per-connection: false
169
-
170 166
     # is account authentication enabled?
171 167
     authentication-enabled: true
172 168
 

Loading…
Cancel
Save