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.

Need help: extra characters after close-quote

Help for those learning Tcl or writing their own scripts.
Post Reply
g
garfwen
Halfop
Posts: 61
Joined: Wed Mar 12, 2008 5:16 pm

Need help: extra characters after close-quote

Post by garfwen »

Tcl error [addbnc]: extra characters after close-quote

Code: Select all


proc addbnc {nick host hand chan arg} {
global db
set ident [lindex [split $arg] 0]

        if {[string match *.users.quakenet.org* $host]} {
                set auth [lindex [split [lindex [split $host @] 1] .] 0]
                 set getauth [::mysql::sel $db "SELECT id FROM users WHERE auth='$auth'" -list]

		if { $getauth != "" } {
		              putserv "PRIVMSG $chan : You already asked for a bnc! "
                         	 } else {
                    set getident [::mysql::sel $db "SELECT id FROM users WHERE ident='$ident'" -list]

		       if { $getident != "" } {
		              putserv "PRIVMSG $chan : Theres already a bouncer with that ident, please choose another."

                         	 } else {
                                    if {[string length $ident] > 6} {
                                          putquick "privmsg $chan "Error. The ident is longer as 6 vars."
                                     } else {
                                    set time "Date"
                                    putquick "privmsg $chan :OK, your request has been send. You'll have to wait to know your result(this can take 30 seconds or 30mins). DO NOT RENAME NOW!"
                                    set result [::mysql::exec $db "INSERT INTO users (nick,auth,ident,time,standing,level) VALUES('$nick','$auth','$ident','$time','Waiting','1')"]
                                    set getid [::mysql::sel $db "SELECT id FROM users WHERE auth='$auth'" -list]
                                    putquick "privmsg $chan :New bouncer requested. (ID: $getid). /msg q whois #$auth : to accept: .accept $getid ; to decline .decline $getid"
                   	       }
                   	   }
                    }

         } else {
            putserv "privmsg $chan : You are not \002authed\002 (on Q bot), or have not set \002mode +x\002. (\002//mode \$me +x\002)"
   }
}

What is wrong :?: :(
t
tsukeh
Voice
Posts: 31
Joined: Thu Jan 20, 2005 6:22 am

Post by tsukeh »

check this line...

Code: Select all

putquick "privmsg $chan "Error. The ident is longer as 6 vars."
g
garfwen
Halfop
Posts: 61
Joined: Wed Mar 12, 2008 5:16 pm

Post by garfwen »

Yeah... :roll:

Code: Select all

putquick "privmsg $chan :Error. The ident is longer as 6 vars."
Ty.
Post Reply