!bseen ou !seen amélioré
#1
Bonjour à toutes et à tous.

Je rencontre un petit souci actuellement, j'essai de faire un script, une commande !bseen qui ferai une sorte de seen amélioré.
Le code est un peu brouillion, mais je me heurte à un souci.

TCL
bind pub - !bseen wi_pub
set winick ""
set activechan ""
 
proc wi_pub {nick host hand chan text} {
set ::activechan $chan
set ::winick [lindex $text 0]
set ::idwhois [lindex $text 0]
set ::idchan $chan
 
bind notc - "*" view:wi
bind pubm - "*" chan:seen
    putfast "PRIVMSG NickServ : info $::winick all"
	putfast "PRIVMSG #ch@os :!seen $::winick"
 
}
 
proc chan:seen {nick host hand text dest} {
if {[string match -nocase $nick "Gardien"]} {
if {[regexp -nocase "tait" $text]} {
		putfast "PRIVMSG $::activechan : $::winick était en ligne [lrange $text 4 end]"
		unbind pubm - "*" chan:seen
}
if {[regexp -nocase "est" $text]} {
		putfast "PRIVMSG $::activechan : $::winick est connecté actuellement."
		unbind pubm - "*" chan:seen
}
}
}
 
proc view:wi {nick host hand text dest} {
if {[string match -nocase $nick "NickServ"]} {
if {![string match -nocase [lrange $text 0 1] "Dernière présence:"]} { return 0 }
		putfast "PRIVMSG $::activechan : $::winick s'est connecté pour la dernière fois le [lindex $text 2] [lindex $text 3] [lindex $text 4] à [lindex $text 5]"
unbind notc - "*" view:wi
return 0
}
}



Résultat:

Code :
-18:23:53- 4‹~likorn4› !bseen BlackNight
-18:23:53- 4‹~Atlantis14› BlackNight s'est connecté pour la dernière fois le 20 Sep 2009 à 14:44:15
Voici donc ce qui se passe sur le backchan #ch@os:
Code :
-18:23:53- 4‹~Atlantis4› !seen BlackNight
-18:23:53- 4‹&Gardien4› BlackNight tait en ligne il y a 3 heures, 39 minutes.

le souci, il ne réagit pas aux pubm.
Je ne vois pas d'où peux venir le problème ni comment le régler.
Je n'ai aucune erreur en party-line.
Répondre Avertir


Atteindre :


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