Bielie, this line of code doesn't make sense:> notice $nick $iif($read(slapreasons.txt),$v1,No slap reason found)How can a stored message not be found? $read(slapreasons.txt) will read any line at random if the text file exists. It should have been:
notice $nick $iif($isfile(slapreasons.txt),$read(slapreasons.txt),slapreasons.txt isn't found)
toclafane, you can do it like so, which will be more safer:
alias -l rgame {
goto $rand(1,5)
:1 | return slaps %2 around a bit with a large trout
:2 | return slaps %2 around the head with a ruler
:3 | return slaps %2 on the head with an eskimo
:4 | return %2 just go slapped muhahahaha
:5 | return slaps %2 $+ 's ass
}
on *:TEXT:$($iif(!slap * iswm $strip($1),$1)):#:{
if (!%fp) { inc -u3 %fp | set -u3 %2 $2 | msg # $rgame }
}