proc pub:reqdel {nick host hand chan arg} { global mysql_host mysql_user mysql_pass mysql_db mysql_port set mysql [mysql::connect -user $mysql_user -db $mysql_db -port $mysql_port -host $mysql_host -password $mysql_pass ] set req [lindex $arg 0] set dir "/glftpd/site/REQUESTS/REQ-" set row [mysqlsel $mysql "SELECT * FROM reqs WHERE `req` = '$req' " -list] if {[llength $row] < 1} {putquick "PRIVMSG $chan :\002\[\00304ERROR\003\]\002 No Match's found for $req " ; return 0} mysqlexec $mysql "DELETE FROM reqs WHERE req = '$req'" if {[file exists $dir$req]} {catch [exec rm -rf $dir$req]} set chans "#infinity #infinity-chat #infinity-spam #infinity-pre #infinity-staff" foreach post $chans { putquick "PRIVMSG $post :\002\[ REQUEST DELETED\] $who deleted $req" } mysqlclose $mysql }