Open numberoverzero opened 8 years ago
(first proposed in #29)
Following the rfc2812 spec leaves some particular warts, especially when it comes to the historical command names like RPL_WHOREPLY and RPL_NAMREPLY.
RPL_WHOREPLY
RPL_NAMREPLY
There should be an easy way to specify a set of aliases when hooking into the rfc commands, so that reading the code is more natural.
This isn't the intended implementation, just a quick example of how the bot.on would hook up for some alias:
bot.on
@bot.on("who_response") def handle(...): ... bot.aliases["RPL_WHOREPLY"].add("who_response")
I don't know if there's a risk of confusing a custom event for an irc command, but I think that's always been possible since there's no restriction on what the client can trigger. Worth considering but probably not an issue.
(first proposed in #29)
Following the rfc2812 spec leaves some particular warts, especially when it comes to the historical command names like
RPL_WHOREPLY
andRPL_NAMREPLY
.There should be an easy way to specify a set of aliases when hooking into the rfc commands, so that reading the code is more natural.
This isn't the intended implementation, just a quick example of how the
bot.on
would hook up for some alias:I don't know if there's a risk of confusing a custom event for an irc command, but I think that's always been possible since there's no restriction on what the client can trigger. Worth considering but probably not an issue.