Correction d'un codage tcl d'avertissement de comportement
#1
Bonjour,

j'aimerais savoir si mon codage est juste svp

TCL
set host {
    *@*
} 
set vhostniv0 {
*@IRCop.VOTRE SITE
 
}
set vhostniv1 {
*@IRCop.VOTRE SITE
 
	}
 
bind pub - !averto dop:averto
proc dop:averto {nick host hand chan arg} {
if {$arg == ""} {
global vhostniv0 vhostniv1
if {[string match -nocase "*" $host]}  { 
	putspeed "notice $nick :"
	putspeed "notice $nick :  99 Voici les commandes d'avertissements"
	foreach vhost0 $vhostniv0 || foreach vhost1 $vhostniv1 || 
	putspeed "notice $nick : 9Avertissement:Premier degres:93 !comp 7|6 !poli 7|93 !pub 7|6 !repet 7|93 !flood 7|6 !pseudo 7|93 !sex 7|6 !abus2 7|93 !fr 7|6 !raciste"
	putspeed "notice $nick : 9Avertissement:Second degres:6 !comp2 7|93 !pub2 7|6 !repet2 7|93 !flood2 7|6 !pseudo2 7|93 !sex2 7|6 !abus2 7|6 !fr2 7|93 !raciste2"
	putspeed "notice $nick :  2 Troisème avertissement vous kickez"
	putspeed "notice $nick :  3 Quatrième vous bannissez"
	}


Répondre Avertir
#2
Teste le, tu verras bien s'il a des erreurs.
Mais j'ai un gros doute sur:
TCL
foreach vhost0 $vhostniv0 || foreach vhost1 $vhostniv1 ||



Et merci d'utiliser les balises TCL plutôt que QUOTE
Répondre
#3
Je ferais plutot sous cette forme:
TCL
if {[string match -nocase "*" $host]}  { 
   putspeed "notice $nick :"
   putspeed "notice $nick : Voici mes commandes toute vhost"
   }
   foreach vhost0 $vhostniv0 || foreach vhost1 $vhostniv1 {
   if {[string match -nocase $vhost0 $host]}  { 
   putspeed "notice $nick : J'ouvre les commandes qui seront visible aux vhost 0"
   }
   if {[string match -nocase $vhost1 $host]}  { 
   putspeed "notice $nick : J'ouvre les commandes qui seront visible aux vhost 1"
  }
}


Répondre
#4
oui,CrazyCat j'ai un gros soucis pour mettre les vhost --' et la seule erreur de mon tcl c'est a cet endroit :s

Merci heretor je vais tester ça desuite !
Répondre Avertir
#5
J'ai un soucis heretor

j'ai mis ça :

TCL
bind pub - !averto dop:averto
proc dop:averto {nick host hand chan arg} {
if {[string match -nocase "*" $host]}  { 
   putspeed "notice $nick :"
   putspeed "notice $nick : Voici mes commandes toute vhost"
   	putspeed "notice $nick :"
	putspeed "notice $nick :  99 Voici les commandes d'avertissements"
	putspeed "notice $nick : 9Avertissement:Premier degres:93 !comp 7|6 !poli 7|93 !pub 7|6 !repet 7|93 !flood 7|6 !pseudo 7|93 !sex 7|6 !abus2 7|93 !fr 7|6 !raciste"
	putspeed "notice $nick : 9Avertissement:Second degres:6 !comp2 7|93 !pub2 7|6 !repet2 7|93 !flood2 7|6 !pseudo2 7|93 !sex2 7|6 !abus2 7|6 !fr2 7|93 !raciste2"
	putspeed "notice $nick :  2 Troisème avertissement vous kickez"
	putspeed "notice $nick :  3 Quatrième vous bannissez"
	} 
   }
   foreach vhost0 $vhostniv0 || foreach vhost1 $vhostniv1 {
 
   if {[string match -nocase $vhost0 $host]}  { 
   putspeed "notice $nick : J'ouvre les commandes qui seront visible aux vhost 0"
   }
   if {[string match -nocase $vhost1 $host]}  { 
   putspeed "notice $nick : J'ouvre les commandes qui seront visible aux vhost 1"
  }
}



Sa fonctionne niquel mais en revanche les vhost :s

j'ai mis sa comme ça
TCL
set host {
    *@*
} 
set vhostniv0 {
*@IRCop.VOTRE SITE
 
}
set vhostniv1 {
*@IRCop.VOTRE SITE
 
	}


Mais tout le monde arrive a voir les commandes... Est ce normal ? :s

Merci
Répondre Avertir


Atteindre :


Utilisateur(s) parcourant ce sujet : 1 visiteur(s)
Tchat 100% gratuit -Discutez en toute liberté