This is the new home of the egghelp.org community forum.
All data has been migrated (including user logins/passwords) to a new phpBB version.


For more information, see this announcement post. Click the X in the top right-corner of this box to dismiss this message.

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

Help for those learning Tcl or writing their own scripts.
Post Reply
B
Bio`
Voice
Posts: 4
Joined: Fri Apr 07, 2006 11:20 am

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

Post by Bio` »

plzz help me to remove this from my eggdrop
User avatar
DragnLord
Owner
Posts: 711
Joined: Sat Jan 24, 2004 4:58 pm
Location: C'ville, Virginia, USA

Post by DragnLord »

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).
B
Bio`
Voice
Posts: 4
Joined: Fri Apr 07, 2006 11:20 am

Post by Bio` »

The error is From The xlogin
Code :

Code: Select all

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
User avatar
Alchera
Revered One
Posts: 3344
Joined: Mon Aug 11, 2003 12:42 pm
Location: Ballarat Victoria, Australia
Contact:

Post by Alchera »

From eggdrop.conf:
##### 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
B
Bio`
Voice
Posts: 4
Joined: Fri Apr 07, 2006 11:20 am

Post by Bio` »

thank you :)
Post Reply