Guest User

Untitled

a guest
Mar 12th, 2018
140
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
TCL 1.87 KB | None | 0 0
  1. #LASTNUKE
  2. proc ms:lastnuke {nick uhost hand chan arg} {
  3.       global mysql_ db_ searchchan
  4.         set handle [mysqlconnect -host $mysql_(host) -user $mysql_(user) -pass $mysql_(password) -db $mysql_(db)];
  5.     set chan [string tolower $chan]
  6.     if {[channel get $chan search]} {
  7.               set splitz [split $arg " "]
  8.           set group [lrange $splitz 0 0]
  9.           set group [string trimleft $group "\\\{"]
  10.           set numrel [mysqlsel $handle "SELECT $db_(id) FROM $mysql_(table) WHERE $db_(group)= '$group'"]
  11.             if {$numrel == 0} {
  12.             putnow "PRIVMSG $chan :\[ \0037SEARCHING\003 \]"
  13.             putnow "PRIVMSG $chan :\[ \0034No results found\003 \]"
  14.             } else {
  15.             set query1 [mysqlsel $handle "SELECT $db_(rlsname),$db_(section),$db_(files),$db_(size),$db_(status),$db_(reason),$db_(network),$db_(time),$db_(genre) FROM $mysql_(table) WHERE $db_(status)= '1' ORDER BY time DESC LIMIT 1" -flatlist];
  16.             foreach { name type files mb nuke reason nukenetwork time genre} $query1 {
  17.             if { $genre == "" } { set genre "" } else { set genre " / $genre" }
  18.             if { ![string match $mb "0.00"] } { set mb "" } else { set mb " $mb $m / " }             
  19.              if { ![string match $files "0"] } { set files "" } else { set files " $files $f " }
  20. if {$nuke == "1"} {
  21.               set f "Files"
  22.               set m "MB"
  23.               putnow "PRIVMSG $chan :\[ \0037SEARCHING\003 \]"
  24.               putnow "PRIVMSG $chan :\[ \0034Nuked\003 \] $name \[ \00314PRED\003: [duration [expr [unixtime] - $time]] \] \[\00314DATE\003: [clock format $time -format "%d-%m-%Y"] \] \[\00314TIME\003: [clock format $time -format "%H:%M:%S"] \] \00314in\003 \[ [tr:text2color $type] $genre \] \[ \00314INFO\003: $mb $files \] \[ \00314Nuke reason:\003 \0034$reason\003 \00314by\003: \0034$nukenetwork\003 \]"
  25.               } else {
  26.         putlog "ERROR in (PRESEARCH)"
  27.     }
  28.   }
  29. }
  30.         mysqlclose $handle
  31.       }
  32.     }
  33. #END
Add Comment
Please, Sign In to add comment