]> jfr.im git - irc/quakenet/newserv.git/commitdiff
LUALIB: ontlz now checks that the user is opered.
authorChris Porter <redacted>
Sun, 22 Sep 2013 19:56:06 +0000 (20:56 +0100)
committerChris Porter <redacted>
Sun, 22 Sep 2013 19:56:06 +0000 (20:56 +0100)
lua/lib/quakenet/access.lua

index 9ead23bf61ae81c83573730e9973bdb52f3f1272..3619013c6236a912af705c9e7f5317b640dc1b28 100644 (file)
@@ -3,7 +3,13 @@ function onstaff(nick)
 end
 
 function ontlz(nick)
-  return irc_nickonchan(nick, "#twilightzone")
-end
-
+  if not irc_nickonchan(nick, "#twilightzone") then
+    return false
+  end
 
+  local umodes = irc_getusermodes(nick)
+  if not umodes or not string.find(umodes, "o") then
+    return false
+  end
+  return true
+end