Hi, im totally new to perl and started to write a little script for irssi. All i want to do first is when someone on a irc channel writes "!sometext nick", the "scriptbot" gives out a text line something like this: "blablabla-nick". I have done this far:
elsif ($text =~ /^!blabla$/i ) {
$server->command ( "msg $target texttexttext-$nick" );
Example: <nick1> !blabla
<bot> texttexttext-nick1
and it works. But now i want it like this:
Example: <nick1> !blabla nick2
<bot> texttexttext-nick2
I cant seem to get the nick2 saved in a variable to begin with, please help.
/Peter
elsif ($text =~ /^!blabla$/i ) {
$server->command ( "msg $target texttexttext-$nick" );
Example: <nick1> !blabla
<bot> texttexttext-nick1
and it works. But now i want it like this:
Example: <nick1> !blabla nick2
<bot> texttexttext-nick2
I cant seem to get the nick2 saved in a variable to begin with, please help.
/Peter
Comment