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
[MOD] Truncate peers in AdminCP
Controls ·  Search New posts · Mark unread

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

Unknown User
2008-10-23 12:56:19
if you have a double o triple peers, or if you want reset ALL peer (seeder e leecher) for any reason, you can install this shortcut in your adminCP

in admincp-php find:

<td align="center"><a href=admincp.php?action=clearshoutbox><img src="images/admin/forums.gif" border=0 width=32 height=32><BR>Clear Shoutbox</a><BR></td>
add after:


<td align="center"><a href=admincp.php?action=delpeers><img src="images/admin/disabledaccounts.gif" border=0 width=32 height=32><BR>Truncate Peers</a><BR></td>





at the end of page, but first by:



?>





add:



#======================================================================#

# TRUNCATE TABLE 'peers'

#======================================================================#

if ($action=="delpeers"){

stdhead("RESET PEERS");

navmenu();

begin_frame("Reset peers", center);

  if ($yes == "yes") {

  mysql_query("TRUNCATE TABLE `peers`");

  print("<font size=2 color=red><center>Success, All peers as been reset!</b></center></font><br>\n");

  } else {

  echo "Are you sure you want to RESET ALL PEERS?<br>";

  echo "<a href='admincp.php?action=delpeers&yes=yes'><b>Yes</b></a>";

}



end_frame();

stdfoot();

}



i hope this can be usefull
Unknown User
2008-10-23 13:52:31
thank you, this is good to have for emergencys, but if you have thousands of peers then it could hurt the load on your tracker. it is better to use the code for cleanup which deletes dead peers after a certain time period.
Unknown User
2008-10-23 14:55:22
yes, an alternative is:

insert in cleanup.php

mysql_query("DELETE FROM peers WHERE ".gmtime()."-UNIX_TIMESTAMP(last_action) >= 10800");


code from: TorrentialStorm

personally i have set the time at 3600 seconds (1 hours)
Unknown User
2008-10-23 15:19:24
it may be best to set it to every 30 minutes because that is normally when clients update the tracker. it should then give a more accurate reading then every hour.
Unknown User
2008-12-17 22:30:19
What is the best time to use "cleaner of peers" to announce it is my 30 minutes. What is the ideal time to use?

Thank you!
Unknown User
2008-12-18 22:19:12
If im changed the " mysql_query("DELETE FROM peers WHERE ".gmtime()."-UNIX_TIMESTAMP(last_action) >= 10800"); " for 3600 i have a problem?
Unknown User
2008-12-18 22:58:16
you should not have any problems.
Unknown User
2020-03-13 03:51:26
Old topic, but what is the most effective autoclean and announce intervals? The default is 10 mins for autoclean.
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: 2
  • Members: 0
  • Guests online: 2
  • Comments: 3
  • Messages: 1,728