Browse Source

remove allow-multiple-per-connection

tags/v0.12.0
Shivaram Lingamneni 6 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
 			VerifyMessage        string `yaml:"verify-message"`
81
 			VerifyMessage        string `yaml:"verify-message"`
82
 		}
82
 		}
83
 	}
83
 	}
84
-	AllowMultiplePerConnection bool `yaml:"allow-multiple-per-connection"`
85
 }
84
 }
86
 
85
 
87
 type VHostConfig struct {
86
 type VHostConfig struct {

+ 2
- 6
irc/handlers.go View File

85
 func accRegisterHandler(server *Server, client *Client, msg ircmsg.IrcMessage, rb *ResponseBuffer) bool {
85
 func accRegisterHandler(server *Server, client *Client, msg ircmsg.IrcMessage, rb *ResponseBuffer) bool {
86
 	// clients can't reg new accounts if they're already logged in
86
 	// clients can't reg new accounts if they're already logged in
87
 	if client.LoggedIntoAccount() {
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
 	// get and sanitise account name
92
 	// get and sanitise account name

+ 2
- 6
irc/nickserv.go View File

264
 	}
264
 	}
265
 
265
 
266
 	if client.LoggedIntoAccount() {
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
 	config := server.AccountConfig()
271
 	config := server.AccountConfig()

+ 0
- 4
oragono.yaml View File

163
         #         password: ""
163
         #         password: ""
164
         #         sender: "admin@my.network"
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
     # is account authentication enabled?
166
     # is account authentication enabled?
171
     authentication-enabled: true
167
     authentication-enabled: true
172
 
168
 

Loading…
Cancel
Save