HackingGibsons/clubot — Issue #4: Direct messages to the bot should be subscribably without chasing the bot's nick
Author: sshirokov
Created: 2011-12-31 18:29:42+00:00
State: open

Right now the PRIVMSG event broadcasts out the target of the message directly in the subscription portion of the message. To subscribe to only direct messages to the bot one would have to subscribe to a pattern similar to: `:PRIVMSG :MENTION` and then preform a logic operation to determine if the target of the message matches the `self` parameter of the message.

Instead, we could transform the subscription component of the message to replace any target matching the bot's nick with a sentinel value so that a subscription to just private messages would look like `ZMQ_SUBSCRIBE, ":PRIVMSG :MENTION :DIRECT"` and any messages passing by with a channel mentioned should pass by the filter.

Codes will be attached soonish.