Sorry for the double post but can anyone help me with the reply on this?
I just wish to know why $nick is not replaced with the nick of the person who typed superm4n
set superm4nreply {
"Its a Bird, Its a Plane, No Its \0024Superm4n\002"
"\0024Superm4n\002 i think \002$nick\002 wants you"
"\002$nick\002 do you know why \0024Superm4n\002 wears his underwear on the outside ?"
"\002$nick\002 do you know why \0024Superm4n\002 wears \002red\002 underwear ?"
}
bind pub - superm4n pub_superm4n
proc pub_superm4n {nick u h chan t} {
global superm4nreply
if {$t == ""} {
set output [lindex $superm4nreply [rand [llength $superm4nreply]]]
putchan $chan "$output"
}
}
If your not interested in giving me the full help thats fine, clues are welcome
# Superm4n
set bigmanreply {
"Its a Bird, Its a Plane, No Its \0024Superm4n\002"
"\0024Superm4n\002 i think \002$nick\002 wants your attention"
"\002$nick\002 do you know why \0024Superm4n\002 wears his underwear on the outside ?"
"\002$nick\002 do you know why \0024Superm4n\002 wears red underwear ?"
}
bind pub - superm4n pub_bigman
proc pub_bigman {nick u h chan t} {
global bigmanreply
if {$t == ""} {
set output [lindex $bigmanreply [rand [llength $bigmanreply]]]
regsub -all {\$nick} $output $nick output
putchan $chan "$output"
}
}
This also let me allow $nick in bigmanreply
Thanks for all of your reply, and DragnLord i will look into rand and expr