coleifer / irc

tinkering with a made-from-scratch irc library in python
http://irckit.readthedocs.org/
MIT License
179 stars 55 forks source link

add /privmsg to filter for privmsg #4

Closed wraithan closed 12 years ago

wraithan commented 12 years ago

This allows one to get only privmsg both channel and private without getting parts/joins/etc. Works the same way as parts/joins/etc

def command_patterns(self):
    return (
        ('/privmsg', self.do_privmsg),
        ('/part', self.do_part),
        ('/quit', self.do_quit),
    )
coleifer commented 12 years ago

Word - sorry for the delay, I crashed out (was 3am in kansas). I don't believe this will actually work as you intend -- won't the "/privmsg" pattern catch all messages, regardless of whether they occur in the channel or not?

wraithan commented 12 years ago

Yes it will, it should catch all messages of PRIVMSG type which is why I named it as such.