Added SILC Thread Queue API
[crypto.git] / apps / irssi / scripts / examples / command.pl
1 # Example how to create your own /commands:
2
3 # /HELLO <nick> - sends a "Hello, world!" to given nick.
4
5 use Irssi;
6 use strict;
7 use vars qw($VERSION %IRSSI);
8
9 $VERSION = "1.00";
10 %IRSSI = (
11     authors     => 'Timo Sirainen',
12     name        => 'command',
13     description => 'Command example',
14     license     => 'Public Domain'
15 );
16
17 sub cmd_hello {
18         my ($data, $server, $channel) = @_;
19
20         $server->command("/msg $data Hello, world!");
21 }
22
23 Irssi::command_bind('hello', 'cmd_hello');