Login
Username: Password:
Remember me

[Sign Up] / [Recover Password]

Theme / Language

Popular
New Torrents
new name
Size: 18.40 MB
Most active
new name
S: 74 L: 3
New Posters
IRC Stats
Controls ·  Search New posts · Mark unread

You are in: Forum / Forum / v2.08 / v2 Only Mods Complete

Unknown User
2010-10-23 20:19:43
took this from v1 forums incase ppl dont look there works perfect on v2.05

create a new file ircstats.php copy the code below and upload to root web directory

<?

// IRC Stats v1.2 by TorrentialStorm

// DO NOT remove the credits.

// If you want to change the output, fine. Just don't come to me if you can't read my code.

require "backend/functions.php";

dbconn(false);



$search = sqlesc(trim($_GET['search']));



$b = chr(2);

$c = chr(3);



$res = @mysql_query("SELECT users.id, users.class, users.downloaded, users.uploaded, users.username, count(distinct torrents.id) as 'torrents', count(distinct comments.id) as comments, count(distinct forum_posts.id) as forumposts, count(distinct peers.id) as transfers FROM users LEFT JOIN torrents ON users.id = torrents.owner LEFT JOIN comments ON users.id = comments.user LEFT JOIN forum_posts ON users.id = forum_posts.userid LEFT JOIN peers ON users.id = peers.userid WHERE users.username = $search AND users.status = 'confirmed' GROUP by users.id") or die("Database error");

$num = @mysql_num_rows($res);



if($num < 1) {

echo $search." - No such user, please try again.";

die;

}



$arr = @mysql_fetch_assoc($res);



$seeders = get_row_count("peers", "WHERE userid={$arr['id']} AND seeder='yes'");

$leechers = get_row_count("peers", "WHERE userid={$arr['id']} AND seeder='no'");



if($arr[uploaded] == 0 && $arr[downloaded] == 0)

$ratio = "N/A";

elseif ($arr[downloaded] > 0)

$ratio = $arr[uploaded]/$arr[downloaded];

else

$ratio = 0.00;



if (is_numeric($ratio)) $ratio = number_format($ratio, 2);



$arr['downloaded'] = mksize($arr['downloaded']);

$arr['uploaded'] = mksize($arr['uploaded']);

$arr['class'] = get_user_class_name($arr['class']);



$out .= "$b{$c}09$arr[username]$b{$c}10 - {$c}13Downloaded: {$c}10({$c}04$arr[downloaded]{$c}10) - {$c}13Uploaded: {$c}10({$c}04$arr[uploaded]{$c}10)";

$out .= " - {$c}13Ratio: {$c}10({$c}04$ratio{$c}10) - {$c}13Class: {$c}04($arr[class]{$c}10)";

$out .= " - {$c}13Torrents Posted: {$c}10({$c}04$arr[torrents]{$c}10) - {$c}13Comments: {$c}10({$c}04$arr[comments]{$c}10)";

$out .= " - {$c}13Forum Posts: {$c}10({$c}04$arr[forumposts]{$c}10) - {$c}13Active Transfers: {$c}10({$c}04$arr[transfers]{$c}10)";

$out .= " - {$c}13Seeding: {$c}10({$c}04$seeders{$c}10) - {$c}13Leeching: {$c}10({$c}04$leechers{$c}10)";

print $out;

?>
mIRC Script



now open the remotes window in mIRC with ctrl+r

go to file new

and paste this into the window

also change localhost for your site url


on !*:join:#your.channel.here:$hello(#,$nick)  

on $*:text:/^!stats\s(\S+)$/iS:#your.channel.here:$hello(#,$regml(1))

alias -l hello {

 if (!$sock(hello)) {

sockopen hello localhost 80

sockmark hello msg $1 $+(/ircstats.php?search=,$2)

 }

}

on *:sockopen:hello:{

 sockwrite -n $sockname GET $gettok($sock(hello).mark,3,32) HTTP/1.1

 sockwrite -n $sockname Host: $+($sock(hello).addr,$str($crlf,2))

}

on *:sockread:hello:{

 var %hello | sockread %hello

 if ($regex(%hello,/(.+ $+ $gettok($sock(hello).mark,2,61) $+ .+)/)) {

$gettok($sock(hello).mark,1-2,32) $regml(1)

sockclose hello

 }

}



Unknown User
2010-10-23 21:26:50
i quickly tried this and it never posted any info in my irc server ( channel) so took code out for now nice mod tho  :D  will watch for updates on this
Unknown User
2010-10-23 22:03:21
"sonicvip, post: 66560":
i quickly tried this and it never posted any info in my irc server ( channel) so took code out for now nice mod tho  :D  will watch for updates on this

did you load the mIRC script into a seperate mirc client you cannnot put the script into the mirc client that you are using you must have two seprate mirc clients running

and there should have been an error in the status window of your mirc client should kinda point to the problem
Unknown User
2010-10-24 10:39:11
ive updated the first post the mIRC script now runs a lot faster also added when a member of your site joins your channel it displays there stats automatic
Unknown User
2012-08-02 19:50:59
hello I did everything you said but I'll fuck type the command does not work can see my code to see if ta and

on !*:join:#osamigos:$hello(#,$nick)

on $*:text:/^!statss(S+)$/iS:#osamigos:$hello(#,$regml(1))

alias -l hello {

if (!$sock(hello)) {

sockopen hello http://osamigos.com 80

sockmark hello msg $1 $+(/ircstats.php?search=)

}

}

on *:sockopen:hello:{

sockwrite -n $sockname GET $gettok($sock(hello).mark,3,32) HTTP/1.1

sockwrite -n $sockname Host: $+($sock(hello).addr,$str($crlf,2))

}

on *:sockread:hello:{

var %hello | sockread %hello

if ($regex(%hello,/(.+ $+ $gettok($sock(hello).mark,2,61) $+ .+)/)) {

$gettok($sock(hello).mark,1-2,32) $regml(1)

sockclose hello

}

}
Users online

No users online

Search



Statistics

    Torrents

  • Tracking: 3
  • Todays torrents: 0
  • Seeders: 0
  • Leechers: 0
  • Peers: 0
  • Downloaded: 89.96 GB
  • Uploaded: 9.86 GB

  • Members

  • We have: 838
  • New today: 0
  • Guest today: 9

  • Online

  • Total online: 8
  • Members: 0
  • Guests online: 8
  • Comments: 3
  • Messages: 1,728