POE::Component::IRC::Service::Hybrid

POE::Component::IRC::Service::Hybrid is a Perl module with fully event-driven IRC services module for Hybrid networks.
Download

POE::Component::IRC::Service::Hybrid Ranking & Summary

Advertisement

  • Rating:
  • License:
  • Perl Artistic License
  • Price:
  • FREE
  • Publisher Name:
  • Chris Williams
  • Publisher web site:
  • http://search.cpan.org/~bingos/

POE::Component::IRC::Service::Hybrid Tags


POE::Component::IRC::Service::Hybrid Description

POE::Component::IRC::Service::Hybrid is a Perl module with fully event-driven IRC services module for Hybrid networks. POE::Component::IRC::Service::Hybrid is a Perl module with fully event-driven IRC services module for Hybrid networks.SYNOPSIS use POE::Component::IRC::Service::Hybrid; # Do this when you create your sessions. 'IRC-Service' is just a # kernel alias to christen the new IRC connection with. (Returns # only a true or false success flag, not an object.) POE::Component::IRC::Service::Hybrid->new('IRC-Service') or die "Oh noooo! $!"; # Do stuff like this from within your sessions. This line tells the # connection named "IRC-Service" to send your session the following # events when they happen. $kernel->post('IRC-Service', 'register', qw(connected msg public nick server)); # You can guess what this line does. $kernel->post('IRC-Service', 'connect', { ServerName => 'services.lamenet.org', ServerDesc => 'Services for LameNET', RemoteServer => 'hub.lamenet.org', ServerPort => 7666, Password => 'password', } ); # Add a services identity to the network $kernel->post('IRC-Service' => 'addnick', { NickName => 'Lame', Umode => '+o', Description => 'Lame Services Bot', } );POE::Component::IRC::Service::Hybrid is a POE component which acts as an easily controllable IRC Services client for your other POE components and sessions. You create an IRC Services component and tell it what events your session cares about and where to connect to, and it sends back interesting IRC events when they happen. You make the client do things by sending it events.[Note that this module requires a lot of familiarity with the details of the IRC protocol. I'd advise you to read up on the gory details of RFC 1459 before starting. Some knowledge of the Hybrid's IRC Server-to-Server protocol would also be advisable, most importantly with TSora. Check out the documents that come with the Hybrid IRCd package.So you want to write a POE program with POE::Component::IRC::Service::Hybrid? Listen up. The short version is as follows: Create your session(s) and an alias for a new POE::Component::IRC::Service::Hybrid client. (Conceptually, it helps if you think of them as little IRC servers.) In your session's _start handler, send the IRC service a 'register' event to tell it which IRC events you want to receive from it. Send it a 'connect' event at some point to tell it to join the IRC network, and it should start sending you interesting events every once in a while. Use the 'addnick' event to add an IRC client to your "server". The IRC Service accepts two different sets of events, server and client. Server events are commands that are issued by (heh) the server and client events are commands issued by clients. # Example of a client command: $kernel->post( 'IRC-Service', 'join', 'Lame' , '#LameNET' ); # Example of a server command: $kernel->post( 'IRC-Service', 'sl_server', "MODE #LameNET +o Lame" );Basically, client commands require a source nickname for the command, eg. it doesn't make sense for a server to "join" a channel.Requirements:· Perl Requirements: · Perl


POE::Component::IRC::Service::Hybrid Related Software