Mode +l (multi chan et server)

Contenu du snippet

Salut, voila cette petite remote permet de gérer le mode +l sur plusieur salon et server, avec un control dans le menu chanel
Ps: C une de mes premiere snipets :)

Source / Exemple :


alias limitous { enable #limitous | if ($nick != $me) { var %a = 1 | while ($comchan($me,%a)) { if ($me isop $chan(%a)) { mode $comchan($me,%a) +l $calc($nick($comchan($me,%a),0) + 5) | inc %a } } } }
alias stoplimitous { disable #limitous |  if ($nick != $me) { var %a = 1 | while ($comchan($me,%a)) { if ($me isop $chan(%a)) { mode $comchan($me,%a) -l  } |  inc %a } } } }
#limitous off
on @!*:mode:#:{ if (-l isin $1-) { .timerM  $+ [ $chan ] $+ [ * ] $+ [  $network ] 1 1 mode $chan +l $calc($nick($chan,0) + 5) } | if (+l isin $1-) { .timer  $+ [ $chan ] $+ [ * ] $+ [  $network ] 1 1 mode $chan +l $calc($nick($chan,0) + 5) } }
on @!*:KICK:#:{ .timerK  $+ [ $chan ] $+ [ * ] $+ [  $network ] 1 1 mode $chan +l $calc($nick($chan,0) + 4) } 
on @!*:JOIN:#:{ .timerJ  $+ [ $chan ] $+ [ * ] $+ [  $network ] 1 12 mode $chan +l $calc($nick($chan,0) + 5) } 
on @!*:PART:#:{ .timerP  $+ [ $chan ] $+ [ * ] $+ [  $network ]  1 5 mode $chan +l $calc($nick($chan,0) + 4) } 
on *:OP:#:{ if ($opnick == $me) { .timerO  $+ [ $chan ] $+ [ * ] $+ [  $network ]  1 2 mode $chan +l $calc($nick($chan,0) + 5) } }
on @*:quit:{ var %a = 1 | while ($comchan($nick,%a)) { if ($comchan($me,%a).op) { mode $comchan($nick,%a) +l $calc($nick($comchan($nick,%a),0) + 4) | inc %a } } }  
#limitous end

menu channel {
  Mode +l
  .Tout #chans présent
  ..$iif($group(#limitous) == on,Désactiver):stoplimitous
  ..$iif($group(#limitous) == off,Activer):limitous
}

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.

Du même auteur (noman_tao)