contact => '',\r
name => 'oops',\r
description =>\r
-'turns \'ls\' in the beginning of a sent line into the names or whois commands',\r
+'turns \'ll\' and \'ls\' in the beginning of a sent line into the names or whois commands',\r
license => 'Public Domain',\r
);\r
\r
sub send_text {\r
+ my $pattern = qr/(^ll |^ll$|^ls |^ls$)/;\r
\r
#"send text", char *line, SERVER_REC, WI_ITEM_REC\r
my ( $data, $server, $witem ) = @_;\r
if ( $witem\r
&& ( $witem->{type} eq "CHANNEL" )\r
- && ( $data =~ /(^ls |^ls$)/ ) )\r
+ && ( $data =~ $pattern ) )\r
{\r
$witem->command("names $witem->{name}");\r
Irssi::signal_stop();\r
}\r
- if ( $witem && ( $witem->{type} eq "QUERY" ) && ( $data =~ /(^ls |^ls$)/ ) )\r
+ if ( $witem && ( $witem->{type} eq "QUERY" ) && ( $data =~ $pattern ) )\r
{\r
$witem->command("whois $witem->{name}");\r
Irssi::signal_stop();\r