mirror of
https://github.com/jeremyd/ergo.git
synced 2026-06-17 09:59:45 -07:00
allow NS SESSIONS targeting yourself
This commit is contained in:
+5
-5
@@ -802,16 +802,16 @@ func nsSessionsHandler(server *Server, client *Client, command string, params []
|
||||
target := client
|
||||
|
||||
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])
|
||||
if target == nil {
|
||||
nsNotice(rb, client.t("No such nick"))
|
||||
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)
|
||||
|
||||
Reference in New Issue
Block a user