egghelp.org community Forum Index
[ egghelp.org home | forum home ]
egghelp.org community
Discussion of eggdrop bots, shell accounts and tcl scripts.
 
 FAQFAQ   SearchSearch   MemberlistMemberlist   UsergroupsUsergroups   RegisterRegister 
 ProfileProfile   Log in to check your private messagesLog in to check your private messages   Log inLog in 

Tcl error [LoginChan]: invalid command name "strlwr&quo

 
Post new topic   Reply to topic    egghelp.org community Forum Index -> Scripting Help
View previous topic :: View next topic  
Author Message
Bio`
Voice


Joined: 07 Apr 2006
Posts: 4

PostPosted: Fri Apr 07, 2006 11:22 am    Post subject: Tcl error [LoginChan]: invalid command name "strlwr&quo Reply with quote

plzz help me to remove this from my eggdrop
Back to top
View user's profile Send private message
DragnLord
Owner


Joined: 24 Jan 2004
Posts: 711
Location: C'ville, Virginia, USA

PostPosted: Fri Apr 07, 2006 1:19 pm    Post subject: Reply with quote

READ "Help us to help you" (first sticky topic).

You need to give the error info (set errorInfo), not just the error.
since this seems to be a script issue, you should also post the script (using the "code" tag).
Back to top
View user's profile Send private message
Bio`
Voice


Joined: 07 Apr 2006
Posts: 4

PostPosted: Fri Apr 07, 2006 8:24 pm    Post subject: Reply with quote

The error is From The xlogin
Code :
Code:
set usernameX "hide"
set passeX "hide"
set LoginOnX 0

bind need - "% op" LoginChan
proc LoginChan { chan type } {
   global ChanAccess LoginOnX
   if {[info exists ChanAccess([strlwr $chan])] && [onchan X $chan] && $LoginOnX } { LoginOnChanX $chan }
   return 0
}

# lecture fichier

if {[file exists "${botnet-nick}.login.txt"]} {
   set f [open ${botnet-nick}.login.txt r]
   while {[gets $f line] >= 0} {   
      if {![string match #* [lindex $line 0]]} {
         set usernameX [lindex $line 0]
         set passeX [lindex $line 1]
      } {
         set ChanAccess([lindex $line 0]) 0
      }
   }
   close $f
}

# Connexion sur le serveur

bind raw - 001 connectX
proc connectX {server numeric servermsg} {
   global usernameX passeX LoginOnX
   set LoginOnX 0
   putlog "Connexion sur le serveur $server"
   if {$usernameX != ""} { utimer 30 LoginOnX }
}

# bind

bind dcc m +login +login
proc +login {hand idx text} {
   global ChanAccess usernameX passeX
   if {![string match #* [lindex $text 0]]} {
      if {[llength $text] != 2} {
         putdcc $idx "Usage : .+login <username> <passe>"
         return 0
      }
      if { $usernameX != "" } {
         putdcc $idx "Il y a déjà un username existant. Essayez .login"
         return 0
      }   
      set usernameX [lindex $text 0]
      set passeX [lindex $text 1]
      putlog "Le login et le username sur X ont été ajoutés par $hand"
   } else {
      if {[llength $text] != 1} {
         putdcc $idx "Usage : .+login <#chan>"
         return 0
      }
      set chan [strlwr [lindex $text 0]]
            if {[info exists ChanAccess($chan)]} {
         putdcc $idx "$chan est déjà valide. Essayez .login"
         return 0
      }
            putlog "Le login et l'auto-op sur X sur le chan $chan ont été ajoutés par $hand"
      set ChanAccess($chan) 0
   }
   SaveX
   return 1
}

bind dcc m -login -login
proc -login {hand idx text} {
   global ChanAccess usernameX passeX
   if {![string match #* [lindex $text 0]]} {
      if {[llength $text] < 1} {
         putdcc $idx "Usage : .-login <username>"
         return 0
      }
      if { $usernameX != [lindex $text 0] } {
         putdcc $idx "le username [lindex $text 0] n'est pas valide. Essayez .login"
         return 0
      }
      set usernameX ""
      putlog "Le login et le username sur X ont été enlevés par $hand"
   } else {
      if {[llength $text] != 1} {
         putdcc $idx "Usage : .-login <#chan>"
         return 0
      }
      set chan [strlwr [lindex $text 0]]
      if {![info exists ChanAccess($chan)]} {
         putdcc $idx "$chan n'est pas valide. Essayez .login"
         return 0
      }
      catch {unset ChanAccess($chan)}
            putlog "Le login et l'auto-op sur X sur le chan $chan ont été supprimés par $hand"
   }
      SaveX
   return 1
}

bind dcc m login login
proc login {hand idx text} {
   global ChanAccess usernameX passeX
   putlog "#$hand# login"
   putdcc $idx "      login sur X       "
   putdcc $idx "Usage : .+login <#chan> ou .+login <username> <passe> ou .-login <#chan> ou .-login <username>"
   putdcc $idx ""
   putdcc $idx "Liste des accès :"
   foreach a [array name ChanAccess] { putdcc $idx "chan : $a" }
   if { $usernameX != ""} { putdcc $idx "username : $usernameX - password : $passeX" }
   putdcc $idx ""
}

proc SaveX {} {
   global {botnet-nick} ChanAccess usernameX passeX LoginOnX
   set f [open ${botnet-nick}.login.txt w]
   foreach a [array name ChanAccess] { puts $f $a }
   if { $usernameX != ""} {   
      puts $f "$usernameX $passeX"
      if {!$LoginOnX} { LoginOnX }
   }
   close $f
}

# Procédure de login sur X

proc LoginOnX { } {
   global usernameX passeX LoginOnX ChanAccess
   foreach t [timers] {
      if {[lindex $t 1] == "LoginOnX"} {killtimer [lindex $t 2] }
   }
   if {[onchan X]} {
      if {!$LoginOnX } {   
         putlog "Xlogin.tcl : Lancement du login sur X"
               putserv "PRIVMSG X@channels.undernet.org :LOGIN $usernameX $passeX"
      }
   } {
      if {$LoginOnX} {
         set LoginOnX 0
             foreach chan [array name ChanAccess] {
            set ChanAccess($chan) 0
         }
      }
   }
   timer 1 LoginOnX
   return 0
}

proc LoginOnChanX { chan } {
   global ChanAccess
   if {![botisop $chan]} {   
      putlog "XLogin.tcl : lancement d'une requête op à X sur $chan"
         putserv "PRIVMSG X :OP $chan"            
   }
   set ChanAccess($chan) 1
   return 0
}

bind notc - "AUTHENTIFICATION RÉUSSIE pour*" LoginSuccessX
bind notc - "AUTHENTICATION SUCCESSFUL as*" LoginSuccessX
bind notc - "Sorry, You are already authenticated as*" LoginSuccessX
bind notc - "Désolé. Vous êtes déjà authentifié sous le nom d'utilisateur*" LoginSuccessX
proc LoginSuccessX {nick host hand texte dest} {
   global LoginOnX ChanAccess
   if {![validchan $dest]} {
      set LoginOnX 1
      foreach chan [array name ChanAccess] {
         if {[validchan $chan]} { LoginOnChanX $chan }
      }
   }
   return 0
}

bind notc - "Sorry, You must be logged in to use this command." NotLoginX
bind notc - "AUTHENTICATION FAILED*" NotLoginX
proc NotLoginX {nick host hand texte dest} {
   global LoginOnX
   if {![validchan $dest]} {set LoginOnX 0}
   return 0
}

bind splt - *cservice@undernet.org signoffX
bind sign - *cservice@undernet.org signoffX
proc signoffX {cserv uhost handl chan {reason "*split"}} {
   global LoginOnX
   set LoginOnX 0
   return 0
}

putlog "Xlogin.tcl v2.0 by Thor - Tapez .login pour l'aide - Date: 18-08-02"


The Error Is : Tcl error [LoginChan]: invalid command name "strlwr"

thanks for help
Back to top
View user's profile Send private message
Alchera
Revered One


Joined: 11 Aug 2003
Posts: 3344
Location: Ballarat Victoria, Australia

PostPosted: Fri Apr 07, 2006 8:29 pm    Post subject: Reply with quote

From eggdrop.conf:
Quote:
##### SCRIPTS #####

# This is a good place to load scripts to use with your bot.

# This line loads script.tcl from the scripts directory inside your Eggdrop's
# directory. All scripts should be put there, although you can place them where
# you like as long as you can supply a fully qualified path to them.
#
# source scripts/script.tcl

source scripts/alltools.tcl
source scripts/action.fix.tcl

Make sure alltools.tcl is in your ~scripts folder and that it is loaded. Your "error" will be fixed.
_________________
Add [SOLVED] to the thread title if your issue has been.
Search | FAQ | RTM
Back to top
View user's profile Send private message Visit poster's website
Bio`
Voice


Joined: 07 Apr 2006
Posts: 4

PostPosted: Fri Apr 07, 2006 10:33 pm    Post subject: Reply with quote

thank you Smile
Back to top
View user's profile Send private message
Display posts from previous:   
Post new topic   Reply to topic    egghelp.org community Forum Index -> Scripting Help All times are GMT - 4 Hours
Page 1 of 1

 
Jump to:  
You cannot post new topics in this forum
You cannot reply to topics in this forum
You cannot edit your posts in this forum
You cannot delete your posts in this forum
You cannot vote in polls in this forum


Forum hosting provided by Reverse.net

Powered by phpBB © 2001, 2005 phpBB Group
subGreen style by ktauber