]> PatchyGit - patchyircd.git/commitdiff
irccloud.lua: minor fixes
authorEgor <egor@patchysicp.xyz>
Wed, 24 Jan 2024 07:06:43 +0000 (09:06 +0200)
committerEgor <egor@patchysicp.xyz>
Wed, 24 Jan 2024 07:06:43 +0000 (09:06 +0200)
lua/irccloud.lua

index e2cd4cf..35dd918 100644 (file)
@@ -1,6 +1,6 @@
 -- irccloud authentication support
 local function parseipv6(s)
-       if not s:match("^[0-9a-fA-F:]*") then
+       if not s:match("^[0-9a-fA-F:]*$") then
                return nil
        end
        local part1 = {}
@@ -44,7 +44,6 @@ local uidmap = {
 
 hook_add("newuser", "irccloud_auth", function(hook, cl1, cl2, chan, txt)
        local netid, ifaceid = parseipv6(cl1.peername)
-       print(netid, ifaceid)
        if netid and isirccloudnetwork(netid) and uidmap[ifaceid] then
                client_chghost(cl1, uidmap[ifaceid], cl1.hostname)
        end