Code: Select all
proc inv_1 { nick uhost hand arg } {
global chan_1
set found 0
set arg [split $arg " "]
set user1 [lindex $arg 0]
set user1 [string range $user1 0 end]
set pass1 [lindex $arg 1]
set pass1 [string range $pass1 0 end]
set data [sql "SELECT * FROM tbl_member WHERE username = '$user1' password = '$pass'"]
if ( sql numrows($data) == 0) {
putserv "PRIVMSG $nick :Invalid password or username!"
putserv "PRIVMSG #ae-hc :\0034Invalid Login:\003 $nick (Username: $user1)"
putcmdlog "$nick has failed to log in using $user1 as a username"
} else {
putserv "PRIVMSG #ae-hc :\0039Successful Login:\003 $nick (Username: $user1)"
putquick "invite $nick $chan_1"
putcmdlog "$nick has successfully logged in using $user1 as a username"
}
}
Thanks
Almighty