Hi i`ve come across a TCL script that allows you to do a !pre search on [url="http://pre.scnsrc.net/"]http://pre.scnsrc.net/[/url]
The person who runs the database is a gr8 chap and wants to share the love for his bot.
Now this bot does not announce to be clear and nor does he want you to use a script to constantly query his database to get a announce.
I've been trying to get this bot to work on [url="http://www.torrenttrader.org/index.php?showtopic=7410&hl=eggdrop"]http://www.torrenttrader.org/index.php?sho...&hl=eggdrop[/url] And for the life in me cant get it to work, even read up on the tbdev post.
If you just need a !pre command and no feed, (or add this to a relayed channel with a modified relay bot which has !pre command)
Download [url="http://pre.scnsrc.net/scripts/tcl/pretimes-scnsrc-v0.6.4.tcl"]http://pre.scnsrc.net/scripts/tcl/pretimes-scnsrc-v0.6.4.tcl[/url] for eggdrop tcl
Download [url="http://pre.scnsrc.net/scripts/mrc/pretimes-scnsrc-mirc-v1.0.mrc"]http://pre.scnsrc.net/scripts/mrc/pretimes...c-mirc-v1.0.mrc[/url] for mirc (less advaned than the eggdrop tcl)
In order for this script to work you need a username and password which you can get by PM'ing shiny on the scnsrcIRC channel in irc.link-net.org
6667 (or ssl 7000). Without a username and password this script is useless! (you can try the script there as whist you wait)
BTW shiny is sleeping when yanks are awake so if you PM him and he doesnt respond its cause she's sleeping... or eating... again what a fat bast...
Dont ask anyone else for a username and password. That includes other scnsrc staffers. Asking others and annoying them will just mean you wont get one. period.
Commands for the script are simple !pre search.title gives the last result or !pre [-n=x] search.title replace x with a number from 2 to 20 to give you x amount of results.
I`ve edited my own script so it outputs like this if you want to have it look like mine then feel free to use this eggdrop tcl.
The person who runs the database is a gr8 chap and wants to share the love for his bot.
Now this bot does not announce to be clear and nor does he want you to use a script to constantly query his database to get a announce.
I've been trying to get this bot to work on [url="http://www.torrenttrader.org/index.php?showtopic=7410&hl=eggdrop"]http://www.torrenttrader.org/index.php?sho...&hl=eggdrop[/url] And for the life in me cant get it to work, even read up on the tbdev post.
If you just need a !pre command and no feed, (or add this to a relayed channel with a modified relay bot which has !pre command)
Download [url="http://pre.scnsrc.net/scripts/tcl/pretimes-scnsrc-v0.6.4.tcl"]http://pre.scnsrc.net/scripts/tcl/pretimes-scnsrc-v0.6.4.tcl[/url] for eggdrop tcl
Download [url="http://pre.scnsrc.net/scripts/mrc/pretimes-scnsrc-mirc-v1.0.mrc"]http://pre.scnsrc.net/scripts/mrc/pretimes...c-mirc-v1.0.mrc[/url] for mirc (less advaned than the eggdrop tcl)
In order for this script to work you need a username and password which you can get by PM'ing shiny on the scnsrcIRC channel in irc.link-net.org
6667 (or ssl 7000). Without a username and password this script is useless! (you can try the script there as whist you wait)
BTW shiny is sleeping when yanks are awake so if you PM him and he doesnt respond its cause she's sleeping... or eating... again what a fat bast...
Dont ask anyone else for a username and password. That includes other scnsrc staffers. Asking others and annoying them will just mean you wont get one. period.
Commands for the script are simple !pre search.title gives the last result or !pre [-n=x] search.title replace x with a number from 2 to 20 to give you x amount of results.
I`ve edited my own script so it outputs like this if you want to have it look like mine then feel free to use this eggdrop tcl.
[23:51:44] [~TheDoctorUK] !pre [-n=7] Stargate.Atlantis
[23:51:48] [&TorrentServ] [PRED] [ TV ] [ Stargate.Atlantis.S05E20.German.Custom.Subbed.720p.HDTV.x264.iNTERNAL-BaCKToRG ] [ released 1d 7h 53m 19s ago. ]
[23:51:50] [&TorrentServ] [PRED] [ TV ] [ Stargate.Atlantis.S05E20.HDTV.XVID-aAF ] [ released 5d 18h 32m 10s ago. ]
[23:51:50] [&TorrentServ] [PRED] [ TV ] [ Stargate.Atlantis.S05E20.720p.HDTV.x264-CTU ] [ released 5d 20h 0m 22s ago. ]
[23:51:50] [&TorrentServ] [PRED] [ TV ] [ Stargate.Atlantis.S05E19.German.Custom.Subbed.720p.HDTV.x264.iNTERNAL-BaCKToRG ] [ released 1w 4d 9h 24m 12s ago. ]
[23:51:50] [&TorrentServ] [PRED] [ TV ] [ Stargate.Atlantis.S05E19.720p.HDTV.x264-aAF ] [ released 1w 5d 14h 42m 22s ago. ]
[23:52:41] [&TorrentServ] [PRED] [ TV ] [ Stargate.Atlantis.S05E17.German.Custom.Subbed.WS.HDTV.XViD.iNTERNAL-BaCKToRG ] [ released 5w 4d 13h 6m 17s ago. ] [ NUKED: out.of.sync_get.repack ]
[23:52:43] [&TorrentServ] [PRED] [ TV ] [ Stargate.Atlantis.S05E17.Infection.PROPER.HDTV.XviD-FQM ] [ released 5w 4d 14h 27m 42s ago. ] [ It was UNNUKED: fine_aAF.release.is.out.of.sync ]# INFORMATION:
# scnsrc pretimes script
# written by dlx on a cold saturday
# bugfixes in v0.6.3 by dr0pknutz
# predb accounts are being maintained by the scnsrc staff (pre.scnsrc.net)
# if your account gets revoked, youre out of luck.
# i cannot be held responsible for any damage this script causes to your lovelife.
#
# tested on eggdrop v1.6.7+. Windrops wont work, its the devs fault not ours.
#
# future releases should include the !dupe command, and the abilty to add a switch to
# enable PM
#
# VERSIONS:
# v0.1 initial release
# v0.2 added usage option
# v0.3 added nukes/unnukes
# v0.4 dalys added available chans/silent chans. nice work! thx!
# v0.5 added -n= option
# v0.5.1 fixed some types + lots of descriptions and other stuff
# v0.6 auto update checks on rehashes! woohoo
# v0.6.1 added color codes and bold as default
# v0.6.2 adjusted script to fit new tcl location
# v0.6.3 dr0pknutz fixed -n= option only searching first search parameter & fixed url not being encoded bug
# v0.6.4 ImYourVirus added option to change command prefix/suffix
package require http
set scnsrc_pre_version "0.6.4"
# CONFIGURATION
# Put the username you got from shiny here
set pre(username) "username"
# Put the password you got from shiny here
set pre(password) "password"
# By default the bot will respond to the !pre command by prefixing [PRE] to the begining of printed lines. You can remove this or change it to another word or colour etc.
set pre(prefix) "\[PRED\]"
# The channels you wish the bot to listen for the !pre command and then print the results in that channel. You can add as many channels as you want. You can have "" for the bot not to post in public channels at all.
set pre(availchans) "#pre #pre2"
# The channels you wish the bot to listen for the !pre command and then PM the results to the user. You can have "" for the bot not to PM result to users at all.
set pre(quietchans) "#pre3"
# The prefix goes before like '!' or '.'
set pre(cmdprefix) "!"
# The suffix comes after like 'pre'
set pre(cmdsuffix) "pre"
# END CONFIG
bind pub - $pre(cmdprefix)$pre(cmdsuffix) dlx:pretimes:scnsrc
# SCRIPT START
proc dlx:pretimes:scnsrc { nick host hand chan arg } {
global pre
set got_custom_number [regexp {\-n=([0-9]+)} $arg gothit custom_number]
if {$got_custom_number} { set arg [lrange $arg 1 end] }
set arg [string map { " " "%" } $arg]
set arg [string map { "*" "%" } $arg]
set urlEncodeArg [http::formatQuery search $arg]
if {([lsearch -exact $pre(availchans) $chan] == -1) && ($chan != "privmsg")} {return}
if {([lsearch -exact $pre(quietchans) $chan] != -1) || ($chan == "privmsg")} {set chan $nick}
if {$got_custom_number} {
set url "http://scnsrc.net/pre/bots.php?user=$pre(username)&pass=$pre(password)&$urlEncodeArg&results=$custom_number"
} else {
set url "http://scnsrc.net/pre/bots.php?user=$pre(username)&pass=$pre(password)&$urlEncodeArg"
}
set page [http::data [http::geturl $url]]
if { $arg == "" } {
putquick "PRIVMSG $chan :Usage: !pre \[-n=number\]<keywords or releasename>"
} else {
if { $page == "Stay out." } {
putquick "PRIVMSG $chan :PREDB: Your account got revoked. Tough luck fool! This script is now useless!"
} else {
if { $page == "" } { putquick "PRIVMSG $chan :$pre(prefix) Got 0 hits to your query." } else {
foreach release [split $page "\n"] {
if { [string first "^" $release] != -1 } {
set item [split $release "^"]
set releasename [lindex $item 1]
set section [lindex $item 2]
set time [lindex $item 0]
set nuked [lindex $item 3]
set reason [lindex $item 4]
if { $nuked == "" } {
putquick "PRIVMSG $chan :\002 $pre(prefix) \002 \[ $section \] \[ $releasename \] \[ released $time ago. \]"
} elseif { $nuked == "nuked" } {
putquick "PRIVMSG $chan :\002 $pre(prefix) \002 \[ $section \] \[ $releasename \] \[ released $time ago. \] \[\0034 NUKED: $reason \003\]"
} elseif { $nuked == "unnuked" } {
putquick "PRIVMSG $chan :\002 $pre(prefix) \002 \[ $section \] \[ $releasename \] \[ released $time ago. \] \[\0033 It was UNNUKED: $reason \003\]"
}
}
}
}
}
}
}
# UPDATE CHECK
set url "http://www.scnsrc.net/pre/script_version.nfo"
set page [http::data [http::geturl $url]]
regexp {Latest@([0-9\.a-z]+)} $page gotlatest latest
regexp {URI@(.*)} $page goturi uri
regexp {Changelog@(.*)} $page gotlog changelog
if {$latest > $scnsrc_pre_version} {
putlog "scnsrc-pre New version out: v$latest (you have v$scnsrc_pre_version)"
putlog "scnsrc-pre Get it while its hot: $uri"
putlog "scnsrc-pre Changelog: $changelog"
} else {
putlog "scnsrc-pre loaded.. you just got pwned by dlx. and youre up to date (v$scnsrc_pre_version)"
}
# Change the putlog message and the world will end