Mass Mode

By RameN on Jan 30, 2006

a snippet to change several modes on a channel



;mass-mode - RameN

;usage: //mass +o/-o/+v/-v ($active channel)

alias mass {
  var %t = 1
  while (%t <= $nick($active,0)) {
    var %p = %p $nick($active,%t)
    inc %t
  }
  m $active $1 %p
}

alias m {
  var %nicks = $numtok($3-,32),%mode = $str($2,$modespl),%info,%sort
  while (%nicks) {
    %sort = $gettok($3-,%nicks,32)
    if ((%sort != $me) && (%sort != L) && (%sort != Q)) {
      %info = $addtok(%info,%sort,32)
      if ($numtok(%info,32) == $modespl) { !mode $1 %mode %info | %info = "" }
    }
    dec %nicks
  }
  if (%info) { !mode $1 %mode %info }
}

Comments

Sign in to comment.
`Kazuma   -  Feb 03, 2006

It is true though, a 3 means Not Usefull. This is usefull.

 Respond  
bearruler   -  Feb 03, 2006

Maybe the scorer just thought it deserved a 3?
You can look through all the snippets
You\'ll see how much time people have spent on snippets with 7\'s and 9\'s

It annoys me when scripts get 6s for something that would take all of 3 minutes to code, and its poorly written. This script is ok, but it has been done before. Its also a bit long for the job.

You could look at the $nick identifier. I think that could help improve this abit.

Bear

 Respond  
RameN   -  Jan 31, 2006

After coming here for awhile before I signed up, I saw almost every new snippet got a 3.0. I\'m curious to why almost all new snippets get a 3.0.

 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.