mirror of
https://github.com/ShadowNinja/LuaIRC.git
synced 2025-01-25 01:10:20 +01:00
Adding handlers: RPL_UMODEIS and RPL_CHANNELMODEIS
This commit is contained in:
parent
9977943966
commit
ecafce9f0c
38
init.lua
38
init.lua
@ -262,24 +262,36 @@ handlers["366"] = function(o, prefix, me, channel, msg)
|
|||||||
o:invoke("NameList", channel, msg)
|
o:invoke("NameList", channel, msg)
|
||||||
end
|
end
|
||||||
end
|
end
|
||||||
|
|
||||||
--no topic
|
--no topic
|
||||||
handlers["331"] = function(o, prefix, me, channel)
|
handlers["331"] = function(o, prefix, me, channel)
|
||||||
o:invoke("OnTopic", channel, nil)
|
o:invoke("OnTopic", channel, nil)
|
||||||
end
|
end
|
||||||
|
|
||||||
--new topic
|
--new topic
|
||||||
handlers["TOPIC"] = function(o, prefix, channel, topic)
|
handlers["TOPIC"] = function(o, prefix, channel, topic)
|
||||||
o:invoke("OnTopic", channel, topic)
|
o:invoke("OnTopic", channel, topic)
|
||||||
end
|
end
|
||||||
|
|
||||||
handlers["332"] = function(o, prefix, me, channel, topic)
|
handlers["332"] = function(o, prefix, me, channel, topic)
|
||||||
o:invoke("OnTopic", channel, topic)
|
o:invoke("OnTopic", channel, topic)
|
||||||
end
|
end
|
||||||
|
|
||||||
--topic creation info
|
--topic creation info
|
||||||
handlers["333"] = function(o, prefix, me, channel, nick, time)
|
handlers["333"] = function(o, prefix, me, channel, nick, time)
|
||||||
o:invoke("OnTopicInfo", channel, nick, tonumber(time))
|
o:invoke("OnTopicInfo", channel, nick, tonumber(time))
|
||||||
|
end
|
||||||
|
|
||||||
|
--RPL_UMODEIS
|
||||||
|
--To answer a query about a client's own mode, RPL_UMODEIS is sent back
|
||||||
|
handlers["221"] = function(o, modes)
|
||||||
|
o:invoke("OnUserModeIs", modes)
|
||||||
|
end
|
||||||
|
|
||||||
|
--RPL_CHANNELMODEIS
|
||||||
|
--user seems to be just a repeat of the user's nick
|
||||||
|
handlers["324"] = function(o, user, channel, modes)
|
||||||
|
o.invoke("OnChannelModeIs", user, channel, modes)
|
||||||
end
|
end
|
||||||
|
|
||||||
handlers["ERROR"] = function(o, prefix, message)
|
handlers["ERROR"] = function(o, prefix, message)
|
||||||
|
Loading…
Reference in New Issue
Block a user