mirror of
https://github.com/ergochat/ergo.git
synced 2024-12-22 10:42:52 +01:00
make an exception for saset
This commit is contained in:
parent
521617559f
commit
42ccd81205
@ -471,10 +471,17 @@ func nsSetHandler(server *Server, client *Client, command string, params []strin
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
case "always-on":
|
case "always-on":
|
||||||
details := client.Details()
|
// #821: it's problematic to alter the value of always-on if you're not
|
||||||
if details.nick != details.accountName {
|
// the (actual or potential) always-on client yourself. make an exception
|
||||||
err = errNickAccountMismatch
|
// for `saset` to give operators an escape hatch (any consistency problems
|
||||||
} else {
|
// can probably be fixed by restarting the server):
|
||||||
|
if command != "saset" {
|
||||||
|
details := client.Details()
|
||||||
|
if details.nick != details.accountName {
|
||||||
|
err = errNickAccountMismatch
|
||||||
|
}
|
||||||
|
}
|
||||||
|
if err == nil {
|
||||||
var newValue PersistentStatus
|
var newValue PersistentStatus
|
||||||
newValue, err = persistentStatusFromString(params[1])
|
newValue, err = persistentStatusFromString(params[1])
|
||||||
// "opt-in" and "opt-out" don't make sense as user preferences
|
// "opt-in" and "opt-out" don't make sense as user preferences
|
||||||
|
Loading…
Reference in New Issue
Block a user