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:
imaginos
2005-06-20 00:05:46 +00:00
parent cc81e52203
commit 30a1efb161
3 changed files with 167 additions and 0 deletions
+31
View File
@@ -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;