forked from External/ergo
allow NS SESSIONS targeting yourself
This commit is contained in:
parent
3480f124cd
commit
b468baa959
1 changed files with 5 additions and 5 deletions
|
|
@ -802,16 +802,16 @@ func nsSessionsHandler(server *Server, client *Client, command string, params []
|
||||||
target := client
|
target := client
|
||||||
|
|
||||||
if 0 < len(params) {
|
if 0 < len(params) {
|
||||||
// same permissions check as RPL_WHOISACTUALLY for now:
|
|
||||||
if !client.HasMode(modes.Operator) {
|
|
||||||
nsNotice(rb, client.t("Command restricted"))
|
|
||||||
return
|
|
||||||
}
|
|
||||||
target = server.clients.Get(params[0])
|
target = server.clients.Get(params[0])
|
||||||
if target == nil {
|
if target == nil {
|
||||||
nsNotice(rb, client.t("No such nick"))
|
nsNotice(rb, client.t("No such nick"))
|
||||||
return
|
return
|
||||||
}
|
}
|
||||||
|
// same permissions check as RPL_WHOISACTUALLY for now:
|
||||||
|
if target != client && !client.HasMode(modes.Operator) {
|
||||||
|
nsNotice(rb, client.t("Command restricted"))
|
||||||
|
return
|
||||||
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
sessionData, currentIndex := target.AllSessionData(rb.session)
|
sessionData, currentIndex := target.AllSessionData(rb.session)
|
||||||
|
|
|
||||||
Loading…
Add table
Add a link
Reference in a new issue