From b468baa959501150246e0711fb0bac302e7c6934 Mon Sep 17 00:00:00 2001 From: Shivaram Lingamneni Date: Tue, 17 Dec 2019 19:15:26 -0500 Subject: [PATCH] allow NS SESSIONS targeting yourself --- irc/nickserv.go | 10 +++++----- 1 file changed, 5 insertions(+), 5 deletions(-) diff --git a/irc/nickserv.go b/irc/nickserv.go index f0bd0037..fa3880dc 100644 --- a/irc/nickserv.go +++ b/irc/nickserv.go @@ -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)