[Résolu]caractere [ ] Non reconnus..
#1
Bonsoir,

Je post pour un soucis sur les [pseudo]..
Sujet bien aborder sur le forum..

J'ai regardez un peut les post et essayer de faire pareil.
Mais apparament sa ne veut pas avec moi.

Donc voici le soucis :
J'ai [test] en pseudo.
En pl je .+user [test]...

tout et Ok.
Lorsque je me auth j'ai ceci en message de l'eggdrop :

Citation :[21:09:16] -> *ShoW* auth [test] *******
[21:09:16] Notice ShoW ~¤~ Erreur ! Mot de pas incorrect veuillez tapez le bon mot de pass merci. ~¤~

En Pl le putlog :
Citation :[21:09:16] <ShoW> [21:09:26] [test]
[21:09:16] <ShoW> [21:09:26] [test]

sachant que le pass et le bon.. je penche sur un soucis niveau des [ ]
Voici le code tcl :

tcl
#************************************#
# Gestion.Bot V3.                    #
#                                    #
# Système de NameSpace.              #
# Message en msgcat.                 #
# Chan-Log.                          #
# Anti-Flood commandes.              #
# Si le salon de log et en +c le bot #
# annonce quand même sans couleurs.  #
# Nouveau système de blacklist.      #
# Gestion de fichier plus simple.    #
# Système d'auto-voice.              #
# Les TCL sont en plusieurs parties. #
# Système de welcome unique pour     #
# Chaque salon prédéfini.            #
# Plus de flag utilisation de level. #
# Version spécial que pour FaNaTiC.  #
#************************************#
 
namespace eval ::gestion {
 
    # Avant toutes configuration ci dessous veuillez lire le fichier : introduction.txt CECI ET TRES IMPORTANT.

    # A combien désire tu mettre l'anti-flood commandes.
    # Activé l'Auto-Voice si oui mettez 1 sinon 0.
    
    # Nous vérifions si ya le package requis pour le msgcat.
    package require msgcat
    
    # Nous mettons la langue de msgcat en français.
    ::msgcat::mclocale fr
    
    # Version du TCL.
    variable script_name "\037\0034Gestion.Bot V3.0\037\0034"
    # Commandes chars Exemple "." ou "!" Ce qui donnera par exemple : .op/!op.
    variable cmdschar "!"
    # Nom de l'admin du bot.
    variable admin "alias_angelius"
    # Nom du salon de log du Robot.
    variable chanlog "#back-geeks"
    # Port PL.
    variable port "3535"
    # Levels des accès.
    # /!\ Veuillez ne pas modifié ceci merci. /!\
    # Admin
    set level(admin) "1000"
    # Owner
    set level(owner) "500"
    # Master
    set level(master) "300"
    # Opérateur
    set level(operateur) "200"
    # Les Procédures.
    # Procédure XTRA.
    proc [namespace current]::isauth {hand} {
        if {[getuser $hand XTRA AUTH] eq "OFF"} {return 0}
            if {[getuser $hand XTRA AUTH] eq "ON"} {return 1}
    }
    # Système d'authentification.
    proc auth {nick host hand arg} {
 
    variable chanlog
    variable port
    set arg [gbfilter $arg]
    set args [split $arg]
    if {[llength $args] != 2} {
        putserv "notice $nick :[::msgcat::mc ErrorAuth $::botnick]"
        return 0
    }
    set pseudo [lindex $arg 0]
    putlog $pseudo
    set chan [lindex $args 2]
    set pass [lindex $args 1]
    if {[nick2hand $pseudo] eq "*"} {
        putserv "notice $nick :[::msgcat::mc NoAxx $nick]"
        putlog "$pseudo"
        return 0
    }
    if {[passwdok $pseudo $pass]} {
        putserv "notice $nick :[::msgcat::mc ErrorPass]"
        putlog "$pseudo"
        return 0
    }
    if {![string match -nocase [lindex [getuser $pseudo HOSTS] 0] "$nick!$host"]} {
        putserv "notice $nick :[::msgcat::mc ErrorHost]"
        putlog "$nick!$host"
        return 0
    }
    if {[getuser $pseudo XTRA AUTH] eq "ON"} {
        putserv "notice $nick :[::msgcat::mc ErrorDejaAuth]"
        return 0
    }
    if {[getuser $hand XTRA SUSPEND] eq "ON"} {
        putserv "notice $nick :[::msgcat::mc SuspendOn $nick]"
        return 0
    }
    puthelp "notice $nick :[::msgcat::mc Auth $nick]"
    puthelp "privmsg $chanlog :[::msgcat::mc AuthLog $hand]"
    puthelp "privmsg $chanlog :[::msgcat::mc ChanLog] [::msgcat::mc AxxPl $nick]"
    setuser $pseudo XTRA AUTH ON;
    setuser $hand XTRA SEEN [clock format [clock seconds] -format "le %d/%m/%Y à %Hh%M"]
    #chattr $hand +p
    save
    #listen $port users
    puthelp "privmsg $nick :\001DCC CHAT chat [myip] $port\001"
    return
    }
    # Procédure déauthentification.
    proc deauth { nick host hand arg } {
        variable chanlog
        set arg [gbfilter $arg]
        set args [split $arg]
        if {[llength $args] != 2} {
            putserv "notice $nick :[::msgcat::mc ErrorDeauth $::botnick]"
            return 0
        }
        set pseudo [gbfilter $arg]
        set pseudo [lindex $arg 0]
        set pass [lindex $args 1]
        if {[nick2hand $pseudo] eq "*"} {
            putserv "notice $nick :[::msgcat::mc NoAxx $nick]"
            return 0
        }
        if {![passwdok $pseudo $pass]} {
            putserv "notice $nick :[::msgcat::mc ErrorPass]"
            return 0
        }
        if {[getuser $hand XTRA auth] eq "ON"} {
            putserv "notice $nick :[::msgcat::mc AuthOff $nick]"
            putserv "privmsg $chanlog :[::msgcat::mc DeauthLog $hand]"
            setuser $pseudo XTRA AUTH OFF;
            #chattr $hand -p
            save
            #boot $hand "Vous êtes déauthentifié,vous ne pouvez rester en Party-Line."
            return
        }
    }
        
    # Procédure Filter.
    proc gbfilter {data} {
    regsub -all -- \\\\ $data \\\\\\\\ data
    regsub -all -- \\\[ $data \\\\\[ data
    regsub -all -- \\\] $data \\\\\] data
    regsub -all -- \\\} $data \\\\\} data
    regsub -all -- \\\{ $data \\\\\{ data
    regsub -all -- \\\" $data \\\\\" data
    regsub -all -- \\\' $data \\\\\' data
    return $data
    }
    # Procédure réinitialisation des accès du Bot.
    proc joindeauth {nick host hand chan} {
        variable chanlog
        if {$nick=="$::botnick"} {
            putserv "privmsg $chanlog :[::msgcat::mc DeauthJoin]"
            putserv "privmsg $chanlog :[::msgcat::mc DeauthJoin2]"
            foreach user [userlist * $chan] {
                setuser $user XTRA AUTH OFF
                #boot $user "Vous êtes déauthentifié,vous ne pouvez rester en Party-Line."
            }
        }
    }
    # Déauthentification au quit d'une personnes ayant un accès.
    proc quitdeauth { nick uhost hand chan {msg ""}} {
        variable chanlog
        if {[matchattr $hand o|o $chan] && [isauth $hand]} {
            setuser $hand XTRA AUTH OFF
            putserv "privmsg $chanlog :[::msgcat::mc DeauthQuit $hand]"
        }
    }
    # Listes des binds.
    bind msg - "auth" [namespace current]::auth
    bind msg - "deauth" [namespace current]::deauth
    bind join - "$::gestion::chanlog *" [namespace current]::joindeauth
    bind sign o|o "*" [namespace current]::quitdeauth
    # Désinstallation du Script.
    #if {[info commands ::gestion::uninstall] eq "::gestion::uninstall"} { ::gestion::uninstall }
    #proc uninstall {args} {
        #variable script_name
        #putlog "\0031Désallocation des ressources de\0031 $script_name"
        #foreach binding [lsearch -inline -all -regexp [binds *[set gestion [string range [namespace current] 2 end]]*] " \{?(::)?$gestion"] {
            #unbind [lindex $binding 0] [lindex $binding 1] [lindex $binding 2] [lindex $binding 4]
        #}
        #namespace delete [namespace current]
    #}
    putlog "\002Chargement\002 $script_name"
}



Répondre Avertir


Messages dans ce sujet
[Résolu]caractere [ ] Non reconnus.. - par aliasangelius - 02/10/2012, 21:11
RE: caractere [ ] Non reconnus.. - par CrazyCat - 02/10/2012, 21:57
RE: caractere [ ] Non reconnus.. - par CrazyCat - 02/10/2012, 22:26

Atteindre :


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