mirror of
https://github.com/ShadowNinja/LuaIRC.git
synced 2025-07-20 16:40:26 +02:00
Compare commits
1 Commits
isupport
...
motd_savin
Author | SHA1 | Date | |
---|---|---|---|
58dfd5043a |
23
handlers.lua
23
handlers.lua
@ -90,20 +90,15 @@ handlers["432"] = needNewNick
|
||||
-- ERR_NICKNAMEINUSE
|
||||
handlers["433"] = needNewNick
|
||||
|
||||
-- RPL_ISUPPORT
|
||||
handlers["005"] = function(o, prefix, nick, ...)
|
||||
local list = {...}
|
||||
local listlen = #list
|
||||
-- Skip last parameter (info)
|
||||
for i = 1, listlen - 1 do
|
||||
local item = list[i]
|
||||
local pos = item:find("=")
|
||||
if pos then
|
||||
o.supports[item:sub(1, pos - 1)] = item:sub(pos + 1)
|
||||
else
|
||||
o.supports[item] = true
|
||||
end
|
||||
end
|
||||
-- RPL_MOTDSTART
|
||||
handlers["375"] = function(o, prefix, info)
|
||||
o.motd = ""
|
||||
end
|
||||
|
||||
-- RPL_MOTD
|
||||
handlers["372"] = function(o, prefix, nick, line)
|
||||
-- MOTD lines have a "- " prefix, strip it.
|
||||
o.motd = o.motd..line:sub(3)..'\n'
|
||||
end
|
||||
|
||||
--NAMES list
|
||||
|
Reference in New Issue
Block a user