On Fri, 2004-04-23 at 07:15, Dennis Taylor wrote: > On Fri, Apr 23, 2004 at 06:55:20AM -0700, Shaun Guth wrote: > > > I can put together some patches after the weekend if it seems > > worthwhile to do so. My thanks to Henri Vilminko for noticing the > > problem. > > Patches would be most welcome. Mr. Vilminko emailed me too, but > I've been terribly lazy about email recently, as I'm in the middle of > final exams. Apologies to anyone I've been ignoring. :-\
http://files.l8nite.net/POE-Component-IRC.uncollideable-channels.patch http://files.l8nite.net/POE-Filter-IRC.uncollideable-channels.patch Here's a set of patches to implement support for and transparent caching of the associated channel IDs for !channels. I've tested for the commands 'invite', 'join', 'part', 'notice', 'privmsg', 'ctcp', 'ctcpreply', 'who', 'mode', 'names', and 'list'... maybe a few more I'm forgetting about. I also tested on both '#channels' and '!channels' and everything seems to be working. The only caveat is that the bot will have to have joined the !channel in order to get the right ID for it (otherwise the server will just return a 'No such channel' for some of the events). They're generated against PoCo::IRC 2.9 using diff -burNP... if you want or need some other format then let me know... if the code isn't up to snuff tell me and I'll rewrite it. Technically it just stores a hash %c_lookup with keys as the channel names it knows about (without the prefixes), and values of the actual channel it should be using to send messages/request info/etc about. When the bot parses and receives a JOIN message, it will first update the lookup table before sending out the irc_join event to registered sessions. Afaik, I haven't broken any compatibility with these updates - but I'd double-check the way I've handled 'mode' to be sure. (The documentation says that the user should pass the modestring as the first argument, but the MODE command itself takes a target as the first argument). I assumed here that the code was correct and the documentation was wrong. Cheers, Shaun Guth [EMAIL PROTECTED]