1
0
mirror of https://github.com/irssi/irssi.git synced 2024-10-27 05:20:20 -04:00
irssi/scripts/examples/command.pl
Timo Sirainen 03c71116e0 added/removed some default scripts
git-svn-id: http://svn.irssi.org/repos/irssi/trunk@2569 dbcabf3a-b0e7-0310-adc4-f8d773084564
2002-03-10 21:28:38 +00:00

24 lines
477 B
Perl

# Example how to create your own /commands:
# /HELLO <nick> - sends a "Hello, world!" to given nick.
use Irssi;
use strict;
use vars qw($VERSION %IRSSI);
$VERSION = "1.00";
%IRSSI = (
authors => 'Timo Sirainen',
name => 'command',
description => 'Command example',
license => 'Public Domain'
);
sub cmd_hello {
my ($data, $server, $channel) = @_;
$server->command("/msg $data Hello, world!");
}
Irssi::command_bind('hello', 'cmd_hello');