Closed gdamjan closed 14 years ago
IRC RFC 2812: http://www.irchelp.org/irchelp/rfc/rfc2812.txt
Also, freenode denies JOIN-ing channels with anything but a # as first char.
The sollution used in commit 1b1708e6408cd168b49939aaacaee8922f0a039e is probably just ok.
A direct message has the parsed form of: {Sender, His_Name, "PRIVMSG", MyNickname, Msg} A channel message: {Sender, His_Name, "PRIVMSG", ChannelName, Msg}
Replies to channel messages should on the channel (4th parameter), replies to direct messages need to go in private (1st parameter).
There are two strategies to solve this, 1) rely on the fact that IRC channel names must begin with '#', '&', '+' or '!' (but ussually restricted to just '#'), or 2) keep track of our own nickname (this is not that easy or desired) and match it explicitly. But that will require unneed state keeping for the plugins.