Adding handlers: RPL_UMODEIS and RPL_CHANNELMODEIS

This commit is contained in:
Joshua Simmons 2010-07-17 23:21:50 +10:00
parent 9977943966
commit ecafce9f0c
1 changed files with 25 additions and 13 deletions

View File

@ -262,24 +262,36 @@ handlers["366"] = function(o, prefix, me, channel, msg)
o:invoke("NameList", channel, msg)
end
end
--no topic
handlers["331"] = function(o, prefix, me, channel)
o:invoke("OnTopic", channel, nil)
end
--no topic
handlers["331"] = function(o, prefix, me, channel)
o:invoke("OnTopic", channel, nil)
end
--new topic
handlers["TOPIC"] = function(o, prefix, channel, topic)
o:invoke("OnTopic", channel, topic)
end
end
handlers["332"] = function(o, prefix, me, channel, topic)
o:invoke("OnTopic", channel, topic)
end
--topic creation info
handlers["333"] = function(o, prefix, me, channel, nick, time)
o:invoke("OnTopicInfo", channel, nick, tonumber(time))
end
--topic creation info
handlers["333"] = function(o, prefix, me, channel, nick, 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
handlers["ERROR"] = function(o, prefix, message)