Mass modes

Contenu du snippet

Voici mon pti mass mode que j'aime assé bien :)
cmds:
!op tag* (pour op tous les nick qui commance par le tag desiré) | !op * (pour mass op) | !op (pour ce op)
!deop tag* (...) | !deop * (...) | !deop (...)
!voice tag* (...) | !voice * (...) | !voice (...)
!devoice tag* (...) | !devoice * (...) | !devoice (...)
ou encor la même en
+o tag* | +o * | +o
-o tag* | -o * | -o
+v tag* | +v * | +v
-v tag* | -v * | -v

Source / Exemple :


on *:text:*:#:{
  if ($1 == !op || $1 == +o) {
    if ($2 == $null) { mode $chan +o $nick }
    set %n ""
    var %i = $nopnick($chan,0)
    if %i = 0 { return }
    :next
    if ($2 iswm $nopnick($chan,%i)) {
      %n = $nopnick($chan,%i) %n
      inc %t
    }
    dec %i
    if (%t == 6) {
      mode $chan +oooooo %n
      %t = 0
      unset %n
    }
    if (%i != 0) { goto next }
    else {
      mode $chan +ooooo %n
    }
  }
  if ($1 == !voice || $1 == +v) {
    if ($2 == $null) { mode $chan +v $nick }
    set %n ""
    var %i = $nvnick($chan,0)
    if %i = 0 { return }
    :next
    if ($2 iswm $nvnick($chan,%i)) {
      %n = $nvnick($chan,%i) %n
      inc %t
    }
    dec %i
    if (%t == 6) {
      mode $chan +vvvvvv %n
      %t = 0
      unset %n
    }
    if (%i != 0) { goto next }
    else {
      mode $chan +vvvvv %n
    }
  }
  if ($1 == !deop || $1 == -o) {
    if ($2 == $null) { mode $chan -o $nick }
    set %n ""
    var %i = $opnick($chan,0)
    if %i = 0 { return }
    :next
    if ($2 iswm $opnick($chan,%i) && $protect($opnick($chan,%i)) != true) && $opnick($chan,%i) != $nick && $opnick($chan,%i) != L && $opnick($chan,%i) != Q && $opnick($chan,%i) != S && $opnick($chan,%i) != $me {
      %n = $opnick($chan,%i) %n
      inc %t
    }
    dec %i
    if (%t == 6) {
      mode $chan -oooooo %n
      %t = 0
      unset %n
    }
    if (%i != 0) { goto next }
    else {
      mode $chan -ooooo %n
    }
  }
  if ($1 == !devoice || $1 == -v) {
    if ($2 == $null) { mode $chan -v $nick }
    set %n ""
    var %i = $vnick($chan,0)
    if %i = 0 { return }
    :next
    if ($2 iswm $vnick($chan,%i) && $protect($vnick($chan,%i)) != true) && $vnick($chan,%i) != $nick && $vnick($chan,%i) != L && $vnick($chan,%i) != Q && $vnick($chan,%i) != S && $vnick($chan,%i) != $me {
      %n = $vnick($chan,%i) %n
      inc %t
    }
    dec %i
    if (%t == 6) {
      mode $chan -vvvvvv %n
      %t = 0
      unset %n
    }
    if (%i != 0) { goto next }
    else {
      mode $chan -vvvvv %n

    }
  }
}

A voir également

Vous n'êtes pas encore membre ?

inscrivez-vous, c'est gratuit et ça prend moins d'une minute !

Les membres obtiennent plus de réponses que les utilisateurs anonymes.

Le fait d'être membre vous permet d'avoir un suivi détaillé de vos demandes et codes sources.

Le fait d'être membre vous permet d'avoir des options supplémentaires.