While developing my twisted.im bot (new this week! database access and an infobot-style plugin!) I've come up against two seperate annoyances. This patch fixes both of them. Number 1: the IRC protocol defines (among other things) two message types - privmsg and notice. They are identical in every respect except that a notice must not be automatically replied to. Currently, twisted.protocol.irc.IRCClient maps notice onto privmsg, which is dangerous but acceptible, because you're supposed to subclass IRCClient anyway. However, twisted.im.ircsupport subclasses IRCClient and does not override the 'noticed' method, so all twisted.im clients cannot tell the difference between a privmsg and a notice. This is really not a good thing, especially for an IM bot like mine. The attached patch fixes this in a brute force manner by making twisted.im.ircsupport drop all notices on the floor. Number 2: The IRC protocol defines a certain bunch of commands that the server can send the client. twisted.protocol.irc.IRCClient calls self.irc_COMMAND to handle an incoming command 'COMMAND', and if no such method exists, it calles self.irc_unknown. twisted.im.ircsupport by default prints an error message for each unknown command it recieves. Slashnet in particular seems to like to send a lot of them, and it clutters up my screen. This patch simply comments out the print statement and adds a 'pass'. -- ___________ ____________________________ | Screwtape | Reply-To: munged on Usenet |________ ______ ____ __ _ _ _ | | "I've got this brilliant idea but I don't know where it is." -- Beth Allen |