From 6bd396f5a223495da750941722a0ca20c325a471 Mon Sep 17 00:00:00 2001 From: Shivaram Lingamneni Date: Thu, 21 Jan 2021 16:40:01 -0500 Subject: [PATCH 1/2] fix UBAN INFO considering the wrong IP --- irc/uban.go | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/irc/uban.go b/irc/uban.go index 2e9be18d..94aa174c 100644 --- a/irc/uban.go +++ b/irc/uban.go @@ -365,10 +365,10 @@ func ubanInfoNick(client *Client, target ubanTarget, rb *ResponseBuffer) { if mcl != nil { details := mcl.Details() if details.account == "" { - rb.Notice(fmt.Sprintf(client.t("Client %[1]s is unauthenticated and connected from %[2]s"), details.nick, client.IP().String())) + rb.Notice(fmt.Sprintf(client.t("Client %[1]s is unauthenticated and connected from %[2]s"), details.nick, mcl.IP().String())) } else { rb.Notice(fmt.Sprintf(client.t("Client %[1]s is logged into account %[2]s and has %[3]d active clients (see /NICKSERV CLIENTS LIST %[4]s for more info"), details.nick, details.accountName, len(mcl.Sessions()), details.nick)) - ip := client.IP() + ip := mcl.IP() if !ip.IsLoopback() { rb.Notice(fmt.Sprintf(client.t("Client %[1]s is associated with IP %[2]s; you can ban this IP with /UBAN ADD"), details.nick, ip.String())) } From a237ce428f9b449ac57843c5f9296d730ea58cdc Mon Sep 17 00:00:00 2001 From: Shivaram Lingamneni Date: Thu, 21 Jan 2021 16:48:57 -0500 Subject: [PATCH 2/2] fix permissions check in CS HOWTOBAN --- irc/chanserv.go | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/irc/chanserv.go b/irc/chanserv.go index 49c37c3a..3531e57c 100644 --- a/irc/chanserv.go +++ b/irc/chanserv.go @@ -860,7 +860,7 @@ func csHowToBanHandler(service *ircService, server *Server, client *Client, comm return } - if !channel.ClientIsAtLeast(client, modes.Operator) || client.HasRoleCapabs("samode") { + if !(channel.ClientIsAtLeast(client, modes.Operator) || client.HasRoleCapabs("samode")) { service.Notice(rb, client.t("Insufficient privileges")) return }