I need help wit his script, it will read a vhost from list and say it on channel and then remove it from list too so it dont give the same reply again. I am able to made this to read random vhosts from list but how do I make it to delete that vhost from list so it is not repeated again. thanks in advance
Code: Select all
set vhostlist {
"vhost1.balabla.balabala"
"vhost2.balabla.balabala"
"vhost3.balabla.balabala"
"vhost4.balabla.balabala"
"vhost5.balabla.balabala"
"vhost6.balabla.balabala"
}
bind pub _ !vhost pub_vhost
proc pub_vhost {nick host hand channel args} {
putserv "PRIVMSG $channel : [randvhost $args]"
}
proc randvhost {nick} {
global vhostlist
return [lindex $vhostlist [expr int(rand()*[llength $vhostlist])]]
}