- add ctcp handling (using POE::Component::IRC::Plugin::CTCP)
authorAndreas Scherbaum <andreas@scherbaum.biz>
Thu, 2 Feb 2012 00:08:59 +0000 (01:08 +0100)
committerAndreas Scherbaum <andreas@scherbaum.biz>
Thu, 2 Feb 2012 00:08:59 +0000 (01:08 +0100)
docbot.pl

index cbb3375fb9de6185dd7096a3511a7d735a1248d1..2d16b9ff8162df5b82d01b5d9a789f6d7781440f 100755 (executable)
--- a/docbot.pl
+++ b/docbot.pl
@@ -26,7 +26,7 @@ use warnings;
 #sub POE::Kernel::TRACE_EVENTS  () { 1 }
 #sub POE::Kernel::TRACE_SIGNALS  () { 1 }
 use POE;
-use POE qw(Component::IRC Component::IRC::Plugin::Connector);
+use POE qw(Component::IRC Component::IRC::Plugin::Connector Component::IRC Component::IRC::Plugin::CTCP);
 use POE::Component::IRC;
 use Getopt::Mixed "nextOption";
 use FileHandle;
@@ -1496,6 +1496,13 @@ sub on_start {
     $heap->{connector} = POE::Component::IRC::Plugin::Connector->new(delay => 60);
     $irc->plugin_add( 'Connector' => $heap->{connector} );
 
+    $irc->plugin_add( 'CTCP' => POE::Component::IRC::Plugin::CTCP->new(
+        version => '2.0',
+        userinfo => 'PostgreSQL docbot - session: ' . $session,
+        clientinfo => 'http://pgfoundry.org/projects/docbot/',
+        source => 'http://git.postgresql.org/gitweb/?p=docbot.git;a=summary',
+    ));
+
     $irc->yield( connect => { Debug => $main::debug_traffic } );
 
     # enable tracing