Jethro commented on a Page, random slap  -  Apr 08, 2011

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 }
}
 Respond  
Are you sure you want to unfollow this person?
Are you sure you want to delete this?
Click "Unsubscribe" to stop receiving notices pertaining to this post.
Click "Subscribe" to resume notices pertaining to this post.