From 8273a6adc124a10d248c19e69ac8a2431e2aef77 Mon Sep 17 00:00:00 2001 From: Maw-Fox Date: Sun, 12 Jun 2016 16:16:36 -0600 Subject: [PATCH 1/4] Addition of debug to PCR, check fails on isChanOp to send to Kali/Kira in SYS. --- script/main.lua | 19 +++++++++++++++++-- 1 file changed, 17 insertions(+), 2 deletions(-) diff --git a/script/main.lua b/script/main.lua index 0a98cd1..5880694 100644 --- a/script/main.lua +++ b/script/main.lua @@ -1079,8 +1079,24 @@ end event.PCR = function (con, args) if (u.isAdmin(con) ~= true) and (u.isGlobMod(con) ~= true) and (s.isChanOp(con) ~= true) then + if s.isChanOp(con) == false + -- Debugging: check existing name -- + local debugmsg = "[DBG] PCR: isChanOp returned false for: "..u.getName(con) + + local found, conKira = u.getConnection("kira") + if found == true + u.send(conKira, "SYS", {message=debugmsg}) + end + + local found, conKali = u.getConnection("kali") + if found == true + u.send(conKali, "SYS", {message=debugmsg}) + end + end + return const.FERR_NOT_OP - end + else + s.sendStaffCalls(con) u.send(con, "SYS", {message="Pending chat reports sent."}) return const.FERR_OK @@ -1721,7 +1737,6 @@ function (con, args) c.invite(chan, con) joinChannel(chan, con) end - end return const.FERR_OK end From 2b023a713150ee90668257ca284a312ea5efbdb6 Mon Sep 17 00:00:00 2001 From: Maw-Fox Date: Sun, 12 Jun 2016 16:18:03 -0600 Subject: [PATCH 2/4] Minor fix? --- script/main.lua | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/script/main.lua b/script/main.lua index 5880694..f97ae29 100644 --- a/script/main.lua +++ b/script/main.lua @@ -1737,7 +1737,8 @@ function (con, args) c.invite(chan, con) joinChannel(chan, con) end - + end + return const.FERR_OK end From d5b1451fec4951b293d8b7401a697820866a9568 Mon Sep 17 00:00:00 2001 From: Maw-Fox Date: Sun, 12 Jun 2016 16:18:22 -0600 Subject: [PATCH 3/4] Whitespace --- script/main.lua | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/script/main.lua b/script/main.lua index f97ae29..13a610e 100644 --- a/script/main.lua +++ b/script/main.lua @@ -1738,7 +1738,7 @@ function (con, args) joinChannel(chan, con) end end - + return const.FERR_OK end From def1f39834c8a38c686e47e6a66e85b456e171ec Mon Sep 17 00:00:00 2001 From: Maw-Fox Date: Sun, 12 Jun 2016 16:18:49 -0600 Subject: [PATCH 4/4] Fix closure. --- script/main.lua | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/script/main.lua b/script/main.lua index 13a610e..53dbd82 100644 --- a/script/main.lua +++ b/script/main.lua @@ -1095,7 +1095,7 @@ function (con, args) end return const.FERR_NOT_OP - else + end s.sendStaffCalls(con) u.send(con, "SYS", {message="Pending chat reports sent."})