hi guys,
I have a stuped problem I'm using Net::IRC and i'm trying to write a IRC bot. I want to store some data in a file from web form and then read this data from bot script in IRC. the problem is that when I have the variable $nick in the text file it has no value but have just $nick ( as a string ) here are my files ( part of them )
its my text file ( test.irc )
##########
!beer|give to $nick one beer|cheers $nick
#############
its part of my bot file
##########
open(INF,"test.irc"); @ary=<INF>; close(INF); foreach $line (@ary) { chomp($line); ($txt_cmd,$txt_me,$txt_chan)=split(/\|/,$line); if ($text eq $txt_cmd){ $conn->me($conn->{channel},"$txt_me"); $conn->privmsg($conn->{channel}, "$txt_chan"); } }
###############
here is my output in IRC
[00:13] <boilera> !beer [00:13] * Curolina give to $nick one beer [00:13] <Curolina> cheers $nick
but I want this to be like this :
[00:13] <boilera> !beer [00:13] * Curolina give to boilera one beer [00:13] <Curolina> cheers boilera
thanx to all that will reply
boilera
In reply to Problems with Net::IRC by boilera
| For: | Use: | ||
| & | & | ||
| < | < | ||
| > | > | ||
| [ | [ | ||
| ] | ] |