Old 05-14-2003, 11:40 AM   #1
Mouton
Posse Member
Ultimate Scripter
ioFTPD Administrator
 
Join Date: Dec 2002
Posts: 1,956
Default site pretime

Code:
[12:21:01] site pretime
[12:21:03] 200-*--[PRETiME]-----------------------------------------------------*
[12:21:03] 200-| SYNTAX: SITE PRETiME <lookup> [number]                         |
[12:21:03] 200-|       <lookup>: Either the complete release name, a type of    |
[12:21:03] 200-|                 release, a group name or a keyword to search   |
[12:21:03] 200-|                 the db for.                                    |
[12:21:03] 200-|       <number>: Number of results to show (default is used if  |
[12:21:03] 200-|                 none specified).                               |
[12:21:03] 200-|                 Default:                                       |
[12:21:03] 200-|                   Exact match returns 0-1 result               |
[12:21:03] 200-|                   Release type returns 0-10 result(s)          |
[12:21:03] 200-|                   Group name returns 0-10 result(s)            |
[12:21:03] 200-|                   Keyword match returns 0-25 result(s)         |
[12:21:03] 200-|       Valid types: 0-DAY DiVX DVD-R GAME-iSO GBA MP3 MUSiC-ViD PS SVCD TV VCD XBOX XViD XXX *
[12:21:03] 200---[/PRETiME]----------------------------------------------------*
[12:21:03] 200 Command Successful.
U need a mysql table that contains type, name and timestamp of all rls. And don't ask where to get such a thing.
timestamp field needs to be a unix timestamp (as int), NOT a mysql timestamp field.

Source included, just in case ur table doesn't use the default field names, etc.

Enjoy.

*file has been removed*
Please ppl, mirror it. It won't be avail. there for much more than a week.
Mouton is offline   Reply With Quote
Old 05-14-2003, 11:51 AM   #2
phoenixfr
Senior Member
 
Join Date: Nov 2001
Posts: 149
Default

wahoo mouton
this sounds nice to me
thx for sharing
i think you've worked a lot to make it work
phoenixfr is offline   Reply With Quote
Old 05-14-2003, 12:11 PM   #3
Mouton
Posse Member
Ultimate Scripter
ioFTPD Administrator
 
Join Date: Dec 2002
Posts: 1,956
Default

not that much...
once u get mysql++ working, it's an hour or two.
Mouton is offline   Reply With Quote
Old 05-14-2003, 12:14 PM   #4
dasOp
Member
 
Join Date: Jan 2003
Posts: 91
Default

in that case most of the work was probably getting mysql++ working at all.
dasOp is offline   Reply With Quote
Old 05-14-2003, 12:29 PM   #5
Mouton
Posse Member
Ultimate Scripter
ioFTPD Administrator
 
Join Date: Dec 2002
Posts: 1,956
Default

had to google a couple of minutes before I could find how to compile that thing on vs.net... had to comment gay functions and stuff...
Mouton is offline   Reply With Quote
Old 05-14-2003, 02:13 PM   #6
Flare2
Member
 
Join Date: Feb 2003
Posts: 91
Default

nice shit man, nice shit


any way to make a non-SQL version of this?
Flare2 is offline   Reply With Quote
Old 05-14-2003, 03:07 PM   #7
Mouton
Posse Member
Ultimate Scripter
ioFTPD Administrator
 
Join Date: Dec 2002
Posts: 1,956
Default

Where would u like it to fetch the info from ?
Mouton is offline   Reply With Quote
Old 05-14-2003, 03:21 PM   #8
ProlyX
Member
 
Join Date: Nov 2002
Posts: 39
Default

txt?

save it like
type name time
then you grep the the search string and output the results..
ProlyX is offline   Reply With Quote
Old 05-14-2003, 03:36 PM   #9
cez
Junior Member
 
Join Date: Jan 2003
Posts: 29
Default

not really on topic, but anyone know of a tcl-sqldriver to be used with windrop and dzsbot??
cez is offline   Reply With Quote
Old 05-17-2003, 07:09 PM   #10
iXi
Senior Member
ioFTPD Foundation User
 
Join Date: Nov 2002
Posts: 220
Default

moin,

realy nice script but thats only one part
is a secound part planed ?

that means a script for writing release name + pre time into a sql-db on pre ?

*g


cya
iXi is offline   Reply With Quote
Old 05-17-2003, 09:58 PM   #11
Flare2
Member
 
Join Date: Feb 2003
Posts: 91
Default

make it able to use a .mdb instead of SQL

would be good for us without SQL
Flare2 is offline   Reply With Quote
Old 05-18-2003, 11:00 AM   #12
Mouton
Posse Member
Ultimate Scripter
ioFTPD Administrator
 
Join Date: Dec 2002
Posts: 1,956
Default

I really don't think you can use ".mdb" and "good" in the same sentence and still make sense!

I won't support that, cause I don't intend to learn how to access an Access DB from a C++ program...
Just the tought of that gives me shivers!

Quick Q: Why don't u use MySQL or Postgres, or any other free sql-(almost-)compliant db ?
Mouton is offline   Reply With Quote
Old 05-18-2003, 11:05 AM   #13
Mouton
Posse Member
Ultimate Scripter
ioFTPD Administrator
 
Join Date: Dec 2002
Posts: 1,956
Default

pRoLuCkY:

.tcl:
Code:
bind msgm - [PRE]* procpre

proc procpre {nick uhost handle text} {
  set query [http::formatQuery "rls" $text]
  set url "http://your_ip/pretime.php?$query"
  putlog "url: $url"
  set result [http::data [http::geturl $url -timeout 5000]]
  putlog "$result"
}
pretime.php:
Code:
<?
mysql_connect("localhost", "user", "password");
mysql_select_db("pretimes_db");

ereg("\[PRE\] - ([a-zA-Z0-9\._-]*). in .([a-zA-Z0-9\._-]*)",$rls,$regs);
$release = $regs[1];
$type = $regs[2];

$time = time();

if ($type!="" && $release!="") {
  $sql = "INSERT INTO pretimes (timestamp, type, name) VALUES ('$time', '$type', '$release')"; 
  mysql_query($sql)
    or die($sql."<br>\n".mysql_error());
	
  echo "Release '$release' succesfully added as $type";
}
Mouton is offline   Reply With Quote
Old 05-18-2003, 01:42 PM   #14
iXi
Senior Member
ioFTPD Foundation User
 
Join Date: Nov 2002
Posts: 220
Default

thx man

but thats a write in via msg not via io*gg

i meaned a tcl or programm what is writing into the sql db .. when
a rls grp on the site makes a pre...

cya

*edit*

btw other question how can i make a idler kick job for ioFTPD with
sitekill.exe ?
iXi is offline   Reply With Quote
Old 05-20-2003, 05:50 AM   #15
Slayer
Junior Member
 
Join Date: Feb 2003
Posts: 17
Default

mouton nice tcl's
is there anyway to make the bot report pretime via a trigger to the channel?
Slayer is offline   Reply With Quote
Reply

Tags
200-|, results, returns, timestamp, [122103]

Thread Tools
Display Modes Rate This Thread
Rate This Thread:

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is Off
HTML code is Off

Forum Jump

Similar Threads
Thread Thread Starter Forum Replies Last Post
GuildFTPd command set (import) Jesper Custom Commands 4 07-29-2011 12:41 AM


All times are GMT -5. The time now is 02:10 PM.

Parts of this site powered by vBulletin Mods & Addons from DragonByte Technologies Ltd. (Details)