-- 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 = {}
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