OverlordQ has asked for the wisdom of the Perl Monks concerning the following question:

Ok, to help better myself in perl, I've been undertaking the project of writing an IRC-bot in perl. One of the 'featues' I am planning, is the ability to send messages from a input-box on a webpage, to a cgi, and then have the bot display this text on IRC. This is where I've hit the snag, the bot will be running 24/7, and through the Net::IRC module I haven't found an easy way to do this, so I looked through the perlipc docs, but a good solution hasn't appeared to me through there either. Am I missing something in the perlipc doc's, or is there another way to accomplish this?

Replies are listed 'Best First'.
Re: perl IPC question
by rcaputo (Chaplain) on Mar 04, 2003 at 03:37 UTC

    Good morning.

    I've written two bots that include web interfaces. They're both on SourceForge, although only one of them has released code.

    http://sourceforge.net/projects/memephage
    http://sourceforge.net/projects/pastebot

    I'm betting that the pastebot project is the one you're interested in. Paradoxically, it's probably exactly like what you want and so totally different than what you expected as to be virtually useless for you.

    Pastebot presents a web form where people can "paste" large blocks of text. When the form is submitted, it announces a URL to retrieve the text on an IRC channel. So far, so good.

    Perhaps unfortunately, though, it implements both the IRC client and web server in the same program. This single-process solution avoids the need for inter-process communication. When the server sees a form submit, it immediately triggers the IRC client to announce the fact.

    -- Rocco Caputo - troc@pobox.com - poe.perl.org

      pastebot might be what I'm looking for, I'll have to give it a look-see and see if I understand anyt of it :)