Search code examples
perlcommandcmdirc

i want display result from CMD to IRC


i want display result from CMD to IRC with Perl

Example (input command from IRC) :

!cmd dir C:\

Result (Display to IRC) :

Volume in drive C has no label.
11/11/2011  00:00 AM    <DIR>   Program file
11/11/2011  00:00 AM    <DIR>   aaa.txt
11/11/2011  00:00 AM    <DIR>   bbb.exe

Solution

  • You can do this this using AnyEvent::IRC, POE::Component::IRC or their subclasses/descadents.

    Both packages are pretty documented, but prepare to implement basic actions and events:

    1. Connect to server
    2. Join a channel
    3. Handle all messages in channel (or private messages) and respond with your result.