Code: Select all
bind msg - login inv_1
load /home/almighty/eggdrop/scripts/sql/fbsql.so
proc inv_1 { nick uhost hand arg } {
global chan_1
set arg [split $arg]
set user [lindex $arg 0]
set pass [lindex $arg 1]
sql startquery "SELECT * FROM tbl_member WHERE username = '$user' AND password = '$pass'"
sql endquery
sql startquery
if {[sql numrows] == 0} {
sql endquery
putserv "PRIVMSG $nick :Invalid password or username!"
putserv "PRIVMSG #ae-hc :\0034Invalid Login:\003 $nick (Username: $user)"
putcmdlog "$nick has failed to log in using $user as a username"
} else {
sql endquery
putserv "PRIVMSG #ae-hc :\0039Successful Login:\003 $nick (Username: $user)"
putquick "invite $nick $chan_1"
putcmdlog "$nick has successfully logged in using $user as a username"
sql disconnect
}
}
Code: Select all
[23:01] Tcl error [inv_1]: Another query cannot be made until the current query has been finished with "sql endquery".