Antipub :-)

Soyez le premier à donner votre avis sur cette source.

Vue 9 211 fois - Téléchargée 248 fois

Description

ben.; un antipub, basé sur les classiques #, http, www, .com, .fr et // prononcés sur chan qui est modéré ;-)
ce code n'est opérationnel que si vous êtes op sur un chan - et que vous avez les access pour kick/ban, bien sur :-)
comment l'addon réagit =>
1ere fois. notice a celui qui a prononcé la pub
2eme fois : kické
3eme kicke+ban pour 1 jour
4e et plus (si vous avez effacé une des variables : kick + ban definitif

Source / Exemple :


on *:TEXT:*:#:{
  set %active $chan
  if (%stop == $null) { set %stop oui }
  set %i 1
  while (%i => 8) {
    if (%active == %chan.antipub $+ %i && %chan.antipub.stop $+ %i == oui) { set %stop oui | set %i 9 }
    inc %i
  }
  if (%stop == non) {
    if (( www isin $1- ) && ( $me isop $chan )) { .set %Nick.Ban $nick | inc %Pub. [ $+ [ %Nick.Ban ] ]
      if ( %Pub. [ $+ [ %Nick.Ban ] ] == $null ) { .set %Pub. [ $+ [ %Nick.Ban ] ] 0 }
      elseif ( %Pub. [ $+ [ %Nick.Ban ] ] == 1 ) { .notice $nick Cela constitue une régle violée des lois de ce chan, ceci est ton %Pub. [ $+ [ %Nick.Ban ] ] er avertiseemnt, au 2em tu es kické, au 3eme banni... la pub se fait en PV merci }
      elseif ( %Pub. [ $+ [ %Nick.Ban ] ] == 2 ) { .kick $chan $nick ceci est ton [ %Pub. [ $+ [ %Nick.Ban ] ] eme avertissement }
      elseif ( %Pub. [ $+ [ %Nick.Ban ] ] == 3 ) { .ban -u86400 $chan $nick | .kick $chan $nick ceci etait ton %Pub. [ $+ [ %Nick.Ban ] ] eme avertissement .. tu est banni pour 1 jour }
      elseif ( %Pub. [ $+ [ %Nick.Ban ] ] >= 4 ) { .ban $chan $nick ton ban est définitif | .kick $chan $nick | unset %pub. [ $+ [ %Nick.Ban ] ] | unset %Nick.Ban }
      else { .msg $chan commande inconnue anti-insultes carpediem.mrc }
    haltdef }

    elseif (( http isin $1- ) && ( $me isop $chan )) { .set %Nick.Ban $nick | inc %Pub. [ $+ [ %Nick.Ban ] ]
      if ( %Pub. [ $+ [ %Nick.Ban ] ] == $null ) { .set %Pub. [ $+ [ %Nick.Ban ] ] 0 }
      elseif ( %Pub. [ $+ [ %Nick.Ban ] ] == 1 ) { .notice $nick Cela constitue une régle violée des lois de ce chan, ceci est ton %Pub. [ $+ [ %Nick.Ban ] ] er avertiseemnt, au 2em tu es kické, au 3eme banni... la pub se fait en PV merci }
      elseif ( %Pub. [ $+ [ %Nick.Ban ] ] == 2 ) { .kick $chan $nick ceci est ton [ %Pub. [ $+ [ %Nick.Ban ] ] eme avertissement }
      elseif ( %Pub. [ $+ [ %Nick.Ban ] ] == 3 ) { .ban -u86400 $chan $nick | .kick $chan $nick ceci etait ton %Pub. [ $+ [ %Nick.Ban ] ] eme avertissement .. tu est banni pour 1 jour }
      elseif ( %Pub. [ $+ [ %Nick.Ban ] ] >= 4 ) { .ban $chan $nick ton ban est définitif | .kick $chan $nick | unset %pub. [ $+ [ %Nick.Ban ] ] | unset %Nick.Ban }
      else { .msg $chan commande inconnue anti-insultes carpediem.mrc }
    haltdef }

    elseif (( # isin $1- ) && ( $me isop $chan )) { .set %Nick.Ban $nick | inc %Pub. [ $+ [ %Nick.Ban ] ]
      if ( %Pub. [ $+ [ %Nick.Ban ] ] == $null ) { .set %Pub. [ $+ [ %Nick.Ban ] ] 0 }
      elseif ( %Pub. [ $+ [ %Nick.Ban ] ] == 1 ) { .notice $nick Cela constitue une régle violée des lois de ce chan, ceci est ton %Pub. [ $+ [ %Nick.Ban ] ] er avertiseemnt, au 2em tu es kické, au 3eme banni... la pub se fait en PV merci }
      elseif ( %Pub. [ $+ [ %Nick.Ban ] ] == 2 ) { .kick $chan $nick ceci est ton [ %Pub. [ $+ [ %Nick.Ban ] ] eme avertissement }
      elseif ( %Pub. [ $+ [ %Nick.Ban ] ] == 3 ) { .ban -u86400 $chan $nick | .kick $chan $nick ceci etait ton %Pub. [ $+ [ %Nick.Ban ] ] eme avertissement .. tu est banni pour 1 jour }
      elseif ( %Pub. [ $+ [ %Nick.Ban ] ] >= 4 ) { .ban $chan $nick ton ban est définitif | .kick $chan $nick | unset %pub. [ $+ [ %Nick.Ban ] ] | unset %Nick.Ban }
      else { .msg $chan commande inconnue anti-insultes carpediem.mrc }
    haltdef }
    elseif (( // isin $1- ) && ( $me isop $chan )) { .set %Nick.Ban $nick | inc %Pub. [ $+ [ %Nick.Ban ] ]
      if ( %Pub. [ $+ [ %Nick.Ban ] ] == $null ) { .set %Pub. [ $+ [ %Nick.Ban ] ] 0 }
      elseif ( %Pub. [ $+ [ %Nick.Ban ] ] == 1 ) { .notice $nick Cela constitue une régle violée des lois de ce chan, ceci est ton %Pub. [ $+ [ %Nick.Ban ] ] er avertiseemnt, au 2em tu es kické, au 3eme banni... la pub se fait en PV merci }
      elseif ( %Pub. [ $+ [ %Nick.Ban ] ] == 2 ) { .kick $chan $nick ceci est ton [ %Pub. [ $+ [ %Nick.Ban ] ] eme avertissement }
      elseif ( %Pub. [ $+ [ %Nick.Ban ] ] == 3 ) { .ban -u86400 $chan $nick | .kick $chan $nick ceci etait ton %Pub. [ $+ [ %Nick.Ban ] ] eme avertissement .. tu est banni pour 1 jour }
      elseif ( %Pub. [ $+ [ %Nick.Ban ] ] >= 4 ) { .ban $chan $nick ton ban est définitif | .kick $chan $nick | unset %pub. [ $+ [ %Nick.Ban ] ] | unset %Nick.Ban }
      else { .msg $chan commande inconnue anti-insultes nom du script }
    haltdef }

    elseif (( .com isin $1- ) && ( $me isop $chan )) { .set %Nick.Ban $nick | inc %Pub. [ $+ [ %Nick.Ban ] ]
      if ( %Pub. [ $+ [ %Nick.Ban ] ] == $null ) { .set %Pub. [ $+ [ %Nick.Ban ] ] 0 }
      elseif ( %Pub. [ $+ [ %Nick.Ban ] ] == 1 ) { .notice $nick Cela constitue une régle violée des lois de ce chan, ceci est ton %Pub. [ $+ [ %Nick.Ban ] ] er avertiseemnt, au 2em tu es kické, au 3eme banni... la pub se fait en PV merci }
      elseif ( %Pub. [ $+ [ %Nick.Ban ] ] == 2 ) { .kick $chan $nick ceci est ton [ %Pub. [ $+ [ %Nick.Ban ] ] eme avertissement }
      elseif ( %Pub. [ $+ [ %Nick.Ban ] ] == 3 ) { .ban -u86400 $chan $nick | .kick $chan $nick ceci etait ton %Pub. [ $+ [ %Nick.Ban ] ] eme avertissement .. tu est banni pour 1 jour }
      elseif ( %Pub. [ $+ [ %Nick.Ban ] ] >= 4 ) { .ban $chan $nick ton ban est définitif | .kick $chan $nick | unset %pub. [ $+ [ %Nick.Ban ] ] | unset %Nick.Ban }
      else { .msg $chan commande inconnue anti-insultes nom du script }
    haltdef }

    elseif (( .fr isin $1- ) && ( $me isop $chan )) { .set %Nick.Ban $nick | inc %Pub. [ $+ [ %Nick.Ban ] ]
      if ( %Pub. [ $+ [ %Nick.Ban ] ] == $null ) { .set %Pub. [ $+ [ %Nick.Ban ] ] 0 }
      elseif ( %Pub. [ $+ [ %Nick.Ban ] ] == 1 ) { .notice $nick Cela constitue une régle violée des lois de ce chan, ceci est ton %Pub. [ $+ [ %Nick.Ban ] ] er avertiseemnt, au 2em tu es kické, au 3eme banni... la pub se fait en PV merci }
      elseif ( %Pub. [ $+ [ %Nick.Ban ] ] == 2 ) { .kick $chan $nick ceci est ton [ %Pub. [ $+ [ %Nick.Ban ] ] eme avertissement }
      elseif ( %Pub. [ $+ [ %Nick.Ban ] ] == 3 ) { .ban -u86400 $chan $nick | .kick $chan $nick ceci etait ton %Pub. [ $+ [ %Nick.Ban ] ] eme avertissement .. tu est banni pour 1 jour }
      elseif ( %Pub. [ $+ [ %Nick.Ban ] ] >= 4 ) { .ban $chan $nick ton ban est définitif | .kick $chan $nick | unset %pub. [ $+ [ %Nick.Ban ] ] | unset %Nick.Ban }
      else { .msg $chan commande inconnue anti-insultes nom du script }
    haltdef }
  }
}

dialog antipub_canaux {
  title "Canaux autorisés pour l'antipub :-) Made By Carpediem666fr"
  size -1 -1 192 74
  option dbu

  text "Canaux où autoriser la publicité:", 3, 24 3 132 8, center
  button "&OK", 5, 126 58 37 12, ok cancel

  edit "", 1, 35 14 50 10
  edit "", 7, 35 24 50 10
  edit "", 2, 35 34 50 10
  edit "", 8, 35 44 50 10
  edit "", 12, 132 14 50 10
  edit "", 11, 132 24 50 10
  edit "", 10, 132 34 50 10
  edit "", 9, 132 44 50 10

  check "Canal 1", 6, 3 15 32 10
  check "Canal 2", 13, 3 25 32 10
  check "Canal 3", 14, 3 35 32 10
  check "Canal 4", 15, 3 45 32 10
  check "Canal 5", 16, 99 15 32 10
  check "Canal 6", 17, 99 25 32 10
  check "Canal 7", 18, 99 35 32 10
  check "Canal 8", 19, 99 45 32 10
  icon 4, 2 56 15 15
  link "http://www.onlyu.fr.st", 20, 22 60 60 8
}

on *:dialog:antipub_canaux:*:*:{
  if ($devent == init) {
  }
  if ($devent == sclick) {
    if ($did == 20) { run http://www.onlyu.fr.st }
    if ($did == 6) {
      if ($did(6).state == 1) { set %chan.antipub.stop1 oui | did -rea antipub_canaux 1 %chan.antipub1 }
      if ($did(6).state == 0) { set %chan.antipub.stop1 non | did -rba antipub_canaux 1 }
    }
    if ($did == 13) {
      if ($did(13).state == 1) { set %chan.antipub.stop2 oui | did -rea antipub_canaux 7 %chan.antipub2 }
      if ($did(13).state == 0) { set %chan.antipub.stop2 non | did -rba antipub_canaux 7 }
    }
    if ($did == 14) {
      if ($did(14).state == 1) { set %chan.antipub.stop3 oui | did -rea antipub_canaux 2 %chan.antipub3 }
      if ($did(14).state == 0) { set %chan.antipub.stop3 non | did -rba antipub_canaux 2 }
    }
    if ($did == 15 ) {
      if ($did(15).state == 1) { set %chan.antipub.stop4 oui | did -rea antipub_canaux 8 %chan.antipub4 }
      if ($did(15).state == 0) { set %chan.antipub.stop4 non | did -rba antipub_canaux 8 }
    }
    if ($did == 16) {
      if ($did(16).state == 1) { set %chan.antipub.stop5 oui | did -rea antipub_canaux 12 %chan.antipub5 }
      if ($did(16).state == 0) { set %chan.antipub.stop5 non | did -rba antipub_canaux 12 }
    }
    if ($did == 17) {
      if ($did(17).state == 1) { set %chan.antipub.stop6 oui | did -rea antipub_canaux 11 %chan.antipub6 }
      if ($did(17).state == 0) { set %chan.antipub.stop6 non | did -rba antipub_canaux 11  }
    }
    if ($did == 18 ) {
      if ($did(18).state == 1) { set %chan.antipub.stop7 oui | did -rea antipub_canaux 10 %chan.antipub7 }
      if ($did(18).state == 0) { set %chan.antipub.stop7 non | did -rba antipub_canaux 10 }
    }
    if ($did == 19) {
      if ($did(19).state == 1) { set %chan.antipub.stop8 oui | did -rea antipub_canaux 9 %chan.antipub8 }
      if ($did(19).state == 0) { set %chan.antipub.stop8 non | did -rba antipub_canaux 9 }
    }
  }
  if ($devent == edit) {
    if ($did == 1) { set %chan.antipub1 $did(1) }
    if ($did == 7) { set %chan.antipub2 $did(7) }
    if ($did == 2) { set %chan.antipub3 $did(2) }
    if ($did == 8) { set %chan.antipub4 $did(8) }
    if ($did == 12) { set %chan.antipub5 $did(12) }
    if ($did == 11) { set %chan.antipub6 $did(11) }
    if ($did == 10 ) { set %chan.antipub7 $did(10) }
    if ($did == 9) { set %chan.antipub8 $did(9) }
  }
}

menu * { 
  [=-antipub-=]:dialog -m antipub_canaux antipub_canaux
}

Conclusion :


mise à jour : un ti dialogue permettant de gérer les chans ou la pub est autorisée :-) Merci à Steve !

tous ces addons seront bientot dispo sur http://www.onlyu.fr.st -

Codes Sources

Ajouter un commentaire Commentaires
Grosval Messages postés 21 Date d'inscription dimanche 6 avril 2003 Statut Membre Dernière intervention 11 février 2004
1 mai 2003 à 17:29
Tout d'abord je le trouve pas mal du tout mais un peu long !! J'aimerais juste savoir comment faudrait faire pour que le message,kick,kickban,... Ne se fasse pas au op du chan. Merci ++
cs_surfman Messages postés 46 Date d'inscription samedi 1 mars 2003 Statut Membre Dernière intervention 16 septembre 2008
30 juin 2003 à 19:25
je comprend pas trop ta question ...
t0nt0n Messages postés 133 Date d'inscription vendredi 3 janvier 2003 Statut Membre Dernière intervention 16 mars 2004
25 déc. 2003 à 12:25
if ($nick isop $chan) {
halt
}
Nort0n Messages postés 41 Date d'inscription jeudi 27 novembre 2003 Statut Membre Dernière intervention 18 octobre 2010
27 avril 2004 à 19:55
Ouai c'est pas mal, mais t'as du bien passer du temps a a la faire!
Et tu t'es compliqué la tache niveaux scripting, y'a beaucoup plus simple.
Et comme ils l'ont dit plus haut, faut mettre un if ( $nick isop $chan ) sinon tu vas te faire des copains ;)
many73 Messages postés 1 Date d'inscription jeudi 1 juin 2006 Statut Membre Dernière intervention 20 juin 2006
20 juin 2006 à 23:38
j'ai pas su le faire marcher :/ quand je coche sur la case pour le salon il me fait rien du tout.
est-ce que qlq'1 peut aidér un nb



merci :-)

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.