On Sun, Feb 06, 2005 at 11:30:04PM -0600, David Nicol wrote:
> there's an IRC top-level namespace, with IRC::Bot in it.
> 
> On Sun, 6 Feb 2005 17:56:01 -0500, Rocco Caputo <[EMAIL PROTECTED]> wrote:
> > I've written a module that threads chat messages, but I don't know
> > what to name it.  Chat::Threader comes to mind.
> > http://cpan.org/modules/by-module/ doesn't list a top-level Chat
> > namespace, though, and I'm loath to start one.

Thanks for the reply.

I think it would be misleading to imply that this code only works with
IRC.  True, I've been testing it in an IRC bot, but the module doesn't
care where its information comes from.  It's happy as long as you
provide a user ID and some text.

Here's the important line from my original post:

  my ($this_id, $referent_id) = $threader->observe($nick, $msg);

$nick isn't required to be an IRC nickname.  It might just as easily
be an AIM or MSN ID.  It could be a telephone number if you're
threading SMS messages.  It can even be an e-mail address, in which
case $msg would probably be the message body.  To be honest, I've only
tested the module with relatively short messages.

I've also considered the Chatbot:: namespace.  The module doesn't
actually say anything, and it's not designed for exclusive use by
bots.  The enigma of where to place this module remains.

-- 
Rocco Caputo - http://poe.perl.org/

Reply via email to