| View previous topic :: View next topic |
| Author |
Message |
Fire-Fox Master

Joined: 23 Sep 2006 Posts: 270 Location: /dev/null
|
Posted: Mon Feb 24, 2014 5:04 pm Post subject: can't read class |
|
|
I have this code and i get can't read class all the time
| Code: | set userChan "#dev.null"
set accesschan "#dev.null"
bind join - * joins
proc joins {nick host hand chan} {
global userChan mysql_ db_
if {$chan == $userChan } {
#mysqluse $mysql_(handle) $mysql_(database)
set sql [mysqlsel $mysql_(handle) "SELECT * FROM $mysql_(table) WHERE username='[mysqlescape $nick]' AND db_(accessclass) = '$class' "]
set result [mysqlsel $mysql_(handle) $sql -list]
if {$result > 0 } {
set result [mysqlsel $mysql_(handle) $sql -list]
putserv "NOTICE $userChan Welcome $nick $class"
}
} else {
putserv "kick $userChan $nick :You are not welcome!"
mysqlendquery $mysql_(handle)
mysqlendquery $mysql_(handle)
}
}
putlog "Access.tcl - Loaded" |
_________________ GreatZ
Fire-Fox | Denmark
Scripts: Relay | Store Text | TvMaze |
|
| Back to top |
|
 |
caesar Mint Rubber

Joined: 14 Oct 2001 Posts: 3741 Location: Mint Factory
|
Posted: Tue Feb 25, 2014 2:19 am Post subject: |
|
|
The $class variable isn't defined before using it, no wonder it's not working. _________________ Once the game is over, the king and the pawn go back in the same box. |
|
| Back to top |
|
 |
|