Alternative Masswave Alias

By knoeki on Jul 15, 2009

Seeing as I have no life at all, I decided to make this upon seeing another version posted here yesterday... this is my take on it.

masswave will wave at everyone in a single line. May there be enough people to exceed 200 chars for all the nicks, it will put the others on a new line, and so on.

alias masswave {
   var %count 1
   var %tok.count 1
   var %total $nick($chan, 0)
   while (%count <= %total) {
      if ($len(%nicks. [ $+ [ %tok.count ]) < 200) {
         var %nicks. [ $+ [ %tok.count ] ] $addtok(%nicks. [ $+ [ %tok.count ] ], $nick($chan, %count), 32)
      }
      else {
         inc %tok.count
         var %nicks. [ $+ [ %tok.count ] ] $addtok(%nicks. [ $+ [ %tok.count ] ], $nick($chan, %count), 32)
      }
      inc %count
   }
   var %count 1
   while (%count <= %tok.count) {
      .timer 1 2 describe $chan waves at %nicks. [ $+ [ %count ] ]
      inc %count
   }
}

Comments

Sign in to comment.
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.