Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- proc dupe:mtop {nick uhost handle chan arg} {
- global db_handle mysql_ chan_ bopen bclose bdiv
- set days [expr 31 - [strftime %e]]
- set days2go [expr {$days==1?"1 day":"$days days"}]
- set quota_(amount) "20"
- set place 0
- set refine ""
- if {[llength $arg] >= 1} { set refine "WHERE `crew`.`user` = '[mysqlescape [string trim [lindex $arg 0]]]'" }
- putnow "PRIVMSG $chan_(kadd) :${bopen}\00303KNOWN \00311MP3 \00303RELEASE GROUP\003${bclose} ${bopen}\00303HONOR \00311TV \00303RELEASE GROUP\003${bclose} ${bopen}\00303KNiSO \00311APPS \00303RELEASE GROUP\003${bclose}"
- putnow "PRIVMSG $chan_(kadd) :This month has $days2go left to go! - Get Uploading if your failing the $quota_(amount) releases per month quota."
- if {![mysqlsel $db_handle "SELECT `crew`.`user`,IF(`count`,`count`,0) AS count FROM (SELECT DISTINCT `user` FROM `crew`) AS crew LEFT JOIN (SELECT `user`,COUNT(`user`) AS count FROM `info` WHERE `timestamp` >= UNIX_TIMESTAMP((LAST_DAY(NOW()) + INTERVAL 1 DAY) - INTERVAL 1 MONTH) GROUP BY `user`) AS info ON crew.user = info.user $refine ORDER BY `count` DESC"]} {
- putnow "PRIVMSG $chan_(kadd) :No results found\."
- return 0
- }
- mysqlmap $db_handle {user count} {
- if { $count >= $quota_(amount) } {
- putnow "PRIVMSG $chan_(kadd) : \[\00314[num [incr place]]\003\] \00314$user\003 is \0033PASSiNG\003 \00314>\003 \00303$count releases this month\003"
- } else {
- putnow "PRIVMSG $chan_(kadd) : \[\00314[num [incr place]]\003\] \00314$user\003 is \0034FAiLiNG\003 \00314>\003 \00304$count releases this month\003"
- }
- }
- }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement