jaytea commented on a Page, Snippet to Slap, Giggle, Poke, Spank, ,Nudge, etc.  -  Nov 12, 2010

just something to consider: when you embed data in a function like that, mIRC has to go through the trouble of interpreting the whole series of selections even though you only end up choosing just one. while this is merely a low-level consideration in this case (few choices that only inclue simple identifiers such as $1), you can probably see how it can become more significant as your set of data increases and starts to include more complex code. a solution to this might be to store data elsewhere in the client, or even use the /goto approach one typically sees to replicate switch/case in mIRC:

  goto $r(1, 6)
  :1
  describe # slaps $$1 around a bit with a large trout
  return
  :2
  describe # slaps $1 with a television
  return
  :3
  etc.

also, when wrestling with the question of which character to use as delimiter to separate a list of items, try to first consider those that can never appear as part of a msg on IRC (if applicable), such as $cr or $lf. that, or try to re-work the code in question so it need not use such a list:

  var %1 = slaps $$1 around a bit with a large trout, $&
      %2 = slaps $1 with a television, $&
      %3 = etc.
      ...
      describe # $eval(% $+ $r(1, 6), 2)
 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.