|
@@ -471,10 +471,17 @@ func nsSetHandler(server *Server, client *Client, command string, params []strin
|
471
|
471
|
}
|
472
|
472
|
}
|
473
|
473
|
case "always-on":
|
474
|
|
- details := client.Details()
|
475
|
|
- if details.nick != details.accountName {
|
476
|
|
- err = errNickAccountMismatch
|
477
|
|
- } else {
|
|
474
|
+ // #821: it's problematic to alter the value of always-on if you're not
|
|
475
|
+ // the (actual or potential) always-on client yourself. make an exception
|
|
476
|
+ // for `saset` to give operators an escape hatch (any consistency problems
|
|
477
|
+ // can probably be fixed by restarting the server):
|
|
478
|
+ if command != "saset" {
|
|
479
|
+ details := client.Details()
|
|
480
|
+ if details.nick != details.accountName {
|
|
481
|
+ err = errNickAccountMismatch
|
|
482
|
+ }
|
|
483
|
+ }
|
|
484
|
+ if err == nil {
|
478
|
485
|
var newValue PersistentStatus
|
479
|
486
|
newValue, err = persistentStatusFromString(params[1])
|
480
|
487
|
// "opt-in" and "opt-out" don't make sense as user preferences
|