Rehash & Restart
#10
Reprend tout les astuces que CrazyCat t'as donner...
Lis bien tout ce qui est écrie et tu va y arriver !

De mon côté tout fonctionne parfaitement !

-------------------------------------------------

On reprend !

Ton code
tcl
bind pub - !rehash rehash 
proc rehash {nick host hand chan} {
    global vhost3 
    foreach vhost $vhost3 {
        if {[string match -nocase $vhost $uhost]}  { 
   rehash
            putquick "PRIVMSG #Admin \00307$nick \00312à utiliser la commande \00306!rehash"
              } 
   }
}
 
 
bind pub - !restart restart
proc restart {nick host hand chan} {
    global vhost3
    foreach vhost $vhost3 { 
        if {[string match -nocase $vhost $host]}  {
   restart
            putquick "PRIVMSG #Admin \00307$nick \00312à utiliser la commande \00306!restart"
              } 
   }
}



Ton deuxième code
tcl
bind pub - !apub apub
proc apub { nick host hand chan arg } {
global vhost3
  foreach vhost $vhost3 {
if ![string compare -nocase $chan "#Admin"] {
  if [string match -nocase $vhost $host]  {
putquick "SAJOIN YoShi [lindex $arg 0 end]"
putquick "MODE [lindex $arg 0 end] +qo YoShi YoShi"
putquick "PRIVMSG [lindex $arg 0 end] \037\00304\002AVERTISSEMENT\037\002 :\00312 Toute plublicité pour un salon est strictement interdit, si vous continuer de faire de la publicité pour ce salon, ils risquent d'être fermer. Merci de votre compréhension."
    return 0
      }
    }  
  }
}



-------------

Les corrections pour le 1er code

tcl
bind pub - !restart
proc restart {nick host hand chan arg} {
set ad "#Admin"
global $vhost3
if {$host eq $vhost3} {
restart
putquick "PRIVMSG $ad :$nick à utiliser la commande !restart"
} else { return 0 }
}



tcl
bind pub - !rehash
proc rehash {nick host hand chan arg} {
set ad "#Admin"
global $vhost3
if {$host eq $vhost3} {
rehash
putquick "PRIVMSG $ad :$nick à utiliser la commande !rehash"
} else { return 0 }
}



----------------------------------
Corrections pour le deuxième code

tcl
set ahost [lindex [split $vhost "@"] 1]
set uhost [lindex [split $host "@"] 1]
if { $uhost eq $ahost } {



------------------------------------------------------------------------------

Tout les corrections ici présente fonctionne parfaitement !
Il suffi seulement d'y aller avec sa logique et de savoir coder le TCL.....

Si vous ne savez pas coder, apprenez!!!
Répondre Avertir


Messages dans ce sujet
Rehash & Restart - par Babytigrou16 - 01/06/2010, 07:04
RE: Rehash & Restart - par Babytigrou16 - 01/06/2010, 07:41
RE: Rehash & Restart - par djdu32 - 01/06/2010, 10:24
RE: Rehash & Restart - par heretoc - 01/06/2010, 11:10
RE: Rehash & Restart - par djdu32 - 01/06/2010, 11:38
RE: Rehash & Restart - par Babytigrou16 - 01/06/2010, 16:50
RE: Rehash & Restart - par CrazyCat - 01/06/2010, 13:09
RE: Rehash & Restart - par CrazyCat - 01/06/2010, 17:06
RE: Rehash & Restart - par Babytigrou16 - 01/06/2010, 18:13
RE: Rehash & Restart - par Marc - 01/06/2010, 18:26
RE: Rehash & Restart - par MenzAgitat - 02/06/2010, 03:33
RE: Rehash & Restart - par Babytigrou16 - 01/06/2010, 18:52
RE: Rehash & Restart - par CrazyCat - 02/06/2010, 09:20
RE: Rehash & Restart - par Marc - 02/06/2010, 15:11

Atteindre :


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