mirror of
https://github.com/znc/znc.git
synced 2026-05-07 13:54:47 +02:00
quick modperl tutorial and examples
git-svn-id: https://znc.svn.sourceforge.net/svnroot/znc/trunk@389 726aef4b-f618-498e-8847-2d620e286838
This commit is contained in:
@@ -0,0 +1,31 @@
|
||||
package Example;
|
||||
use strict;
|
||||
|
||||
#
|
||||
# Create a constructor for the module
|
||||
sub new
|
||||
{
|
||||
my ( $classname ) = @_;
|
||||
my $self = {};
|
||||
|
||||
bless( $self, $classname );
|
||||
|
||||
return( $self );
|
||||
}
|
||||
|
||||
#
|
||||
# we're going to hook this call back
|
||||
sub OnChanMsg
|
||||
{
|
||||
my ( $me, $nick, $chan, $msg ) = @_;
|
||||
ZNC::PutTarget( $chan, "WTF!?, you said [$msg]\n" );
|
||||
return( ZNC::CONTINUE );
|
||||
}
|
||||
|
||||
sub OnShutdown
|
||||
{
|
||||
my ( $me ) = @_;
|
||||
}
|
||||
|
||||
1;
|
||||
|
||||
Reference in New Issue
Block a user