mirror of
https://github.com/irssi/irssi.git
synced 2026-08-08 19:30:15 +02:00
added/removed some default scripts
git-svn-id: http://svn.irssi.org/repos/irssi/trunk@2569 dbcabf3a-b0e7-0310-adc4-f8d773084564
This commit is contained in:
parent
1855e6cc5c
commit
03c71116e0
14 changed files with 606 additions and 76 deletions
23
scripts/examples/command.pl
Normal file
23
scripts/examples/command.pl
Normal file
|
|
@ -0,0 +1,23 @@
|
|||
# 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');
|
||||
Loading…
Add table
Add a link
Reference in a new issue