################################ ## Custom Server Colors: (( standard mirc color codes )) ## Color settings for items below can be set in 2 ways: ## 1) one number: like "06" : for text in purple ## 2) no numbers: like "" : no color code for this item.. text will be user default colors. #------------------------------------------------------------------------------------# # 00=white 01=black 02=dkblue 03=green 04=red 05=brown 06=purple 07=orange 08=yellow # # 09=lightgreen 10=darkgreen 11=bluegreen 12=blue 13=pink 14=darkgrey 15=lightgrey # #------------------------------------------------------------------------------------# set c0 "12" ;# Logo color set c1 "02" ;# Text color set c2 "03" ;# Highlight set c3 "04" ;# Triggers set c4 "14" ;# Dividers set c5 "12" ;# Pack descriptions ############################### ## Set Directory Paths ## Example: set p0 "music/" ;# Music Directory set p0 "warez/music/" ;# Music Directory set p1 "warez/movies/" ;# Movies Directory set p2 "warez/apps/" ;# Apps Directory set p3 "warez/games/" ;# Games Directory set p4 "warez/porn/" ;# Porn Directory set p5 "warez/misc/" ;# Misc Directory ############################## ## Set Path To Database Files set d0 "db/music.ini" ;# Music DataBase set d1 "db/movies.ini" ;# Movies DataBase set d2 "db/apps.ini" ;# Apps DataBase set d3 "db/games.ini" ;# Games DataBase set d4 "db/porn.ini" ;# Porn DataBase set d5 "db/misc.ini" ;# Misc DataBase ############################# ## Set admins nick here ## Nick for contact reasons set admin "poppabear" ### Binds ### bind dcc n|n add add:proc bind dcc n|n del del:proc bind dcc n|n start start:proc bind dcc n|n stop stop:proc bind pub -|- !list list:proc bind pub -|- !getfile get:proc setudef flag servplus proc add:proc {hand idx text} { global p0 p1 p2 p3 p4 p5 d0 d1 d2 d3 d4 d5 c0 c1 c2 c3 c4 c5 set type [lindex [split $text] 0] set file [lindex [split $text] 1] set desc [lrange $text 2 end] switch -- $type { music { set a [open $d0 a+] puts $a "\003$c5$desc\003" puts $a "Trigger: \003$c3!getfile $p0$file\003" puts $a "Filename: \003$c2$file\003" puts $a " " close $a } movie { set a [open $d1 a+] puts $a "\003$c5$desc\003" puts $a "Trigger: \003$c3!getfile $p0$file\003" puts $a "Filename: \003$c2$file\003" puts $a " " close $a } app { set a [open $d2 a+] puts $a "\003$c5$desc\003" puts $a "Trigger: \003$c3!getfile $p0$file\003" puts $a "Filename: \003$c2$file\003" puts $a " " close $a } game { set a [open $d3 a+] puts $a "\003$c5$desc\003" puts $a "Trigger: \003$c3!getfile $p0$file\003" puts $a "Filename: \003$c2$file\003" puts $a " " close $a } porn { set a [open $d4 a+] puts $a "\003$c5$desc\003" puts $a "Trigger: \003$c3!getfile $p0$file\003" puts $a "Filename: \003$c2$file\003" puts $a " " close $a } misc { set a [open $d5 a+] puts $a "\003$c5$desc\003" puts $a "Trigger: \003$c3!getfile $p0$file\003" puts $a "Filename: \003$c2$file\003" puts $a " " close $a } default {putlog "Syntax is \002 .add \002"} } } proc utime:proc {nick host hand chan {arg}} { global c0 c1 c2 c3 c4 c5 d0 d1 d2 d3 d4 d5 set varlist [list d0 d1 d2 d3 d4 d5] foreach chan [channels] { if [channel get $chan servplus] { set list [set [lindex $varlist [rand [llength $varlist]]]] set fi [open $list r] set data [read $fi] foreach {c} [split $data \n] { utimer 1800 putserv "PRIVMSG $nick :\002$c\002" } } } close $fi } proc list:proc {nick host hand chan {arg}} { global c0 c1 c2 c3 c4 c5 d0 d1 d2 d3 d4 d5 foreach chan [channels] { if [channel get $chan servplus] { set list "$d0 $d1 $d2 $d3 $d4 $d5" foreach {c} $list { set spl [split $c] set fi [open $spl r] set data [read $fi] foreach {c} [split $data \n] { putserv "PRIVMSG $nick :\002$c\002" } } close $fi } } } proc get:proc {nick host hand chan arg} { global admin if {$arg == ""} { putserv "NOTICE $nick :Syntax is:\002 !getfile \002" putserv "NOTICE $nick :!list in channel for list of files and triggers" return } set a [dccsend $arg $nick] if {$a == "3"} { putserv "NOTICE $nick :File doesn't exist. Please report broken files to $admin" } elseif {$a == "1"} { putserv "NOTICE $nick :The dcc table is full (too many connections)" } elseif {$a == "2"} { putserv "NOTICE $nick :Can't open a socket for the transfer. Please report this to $admin" } elseif {$a == "4"} { putserv "NOTICE $nick :The file was queued for later transfer" } elseif {$a == "0"} { putserv "NOTICE $nick :Successfully sent $arg" } } putlog "servplus script loaded"