mirror of
https://github.com/ShadowNinja/LuaIRC.git
synced 2025-01-10 10:00:28 +01:00
Fixed access parsing
This commit is contained in:
parent
b104df15cc
commit
a8211a7678
3
init.lua
3
init.lua
@ -177,7 +177,8 @@ handlers["353"] = function(o, prefix, me, chanType, channel, names)
|
|||||||
|
|
||||||
local users = o.channels[channel].users
|
local users = o.channels[channel].users
|
||||||
for nick in names:gmatch("(%S+)") do
|
for nick in names:gmatch("(%S+)") do
|
||||||
users[nick] = {}
|
local access, name = parseNick(nick)
|
||||||
|
users[name] = {type = access}
|
||||||
end
|
end
|
||||||
end
|
end
|
||||||
end
|
end
|
||||||
|
4
util.lua
4
util.lua
@ -36,6 +36,10 @@ function parse(line)
|
|||||||
return prefix, cmd, params
|
return prefix, cmd, params
|
||||||
end
|
end
|
||||||
|
|
||||||
|
function parseNick(nick)
|
||||||
|
return nick:match("^([%+@]?)(.+)$")
|
||||||
|
end
|
||||||
|
|
||||||
function parsePrefix(prefix)
|
function parsePrefix(prefix)
|
||||||
local user = {}
|
local user = {}
|
||||||
if prefix then
|
if prefix then
|
||||||
|
Loading…
Reference in New Issue
Block a user