[XASECO] Sector Records

Discuss everything about Xymph's Aseco flavoured server control scripts for TM Forever / classic TMN and for TM² Canyon.

Moderators: Xymph, TM-Patrol

User avatar
L3cKy
happy cruiser
happy cruiser
Posts: 159
Joined: 05 Sep 2007 13:55
Owned TM-games: TMUF
Location: Berlin
Contact:

Re: [XASECO] Sector Records

Post by L3cKy » 17 Jun 2018 08:23

Just in case this could/should be also included inside function chat_secrecs_cleanupdb (like if u deleted a player with /removelogin at dbtools before)

Code: Select all

mysql_query("DELETE FROM secrecs_all WHERE PlayerNick NOT IN (SELECT Login FROM players);");
mysql_query("DELETE FROM secrecs_own WHERE PlayerNick NOT IN (SELECT Login FROM players);");
Greetings

amgreborn
pedestrian
pedestrian
Posts: 9
Joined: 05 Jun 2018 15:38
Owned TM-games: TMU

Re: [XASECO] Sector Records

Post by amgreborn » 01 Jul 2018 12:13

Players who are not in the players table couldn't have driven any secrecs though. So there shouldn't be any secrecs of players that are not in the players table, or am I getting something wrong here?

User avatar
L3cKy
happy cruiser
happy cruiser
Posts: 159
Joined: 05 Sep 2007 13:55
Owned TM-games: TMUF
Location: Berlin
Contact:

Re: [XASECO] Sector Records

Post by L3cKy » 07 Jul 2018 14:26

If a player have driven some secrecs and you delete the player (with /removelogin at dbtools) the secrecs are still there.

amgreborn
pedestrian
pedestrian
Posts: 9
Joined: 05 Jun 2018 15:38
Owned TM-games: TMU

Re: [XASECO] Sector Records

Post by amgreborn » 22 Sep 2018 04:17

I updated dbtools a bit to also delete secrecs

dbtools 1.0.7.1

Changes in code

Code: Select all

/* wipedb */
Line 909/910
dbtools_sql('TRUNCATE TABLE secrecs_all');
dbtools_sql('TRUNCATE TABLE secrecs_own');

/* optimize */
Line 927/928
dbtools_sql('OPTIMIZE TABLE secrecs_all');
dbtools_sql('OPTIMIZE TABLE secrecs_own');

/* repair */
Line 945/946
dbtools_sql('REPAIR TABLE secrecs_all');
dbtools_sql('REPAIR TABLE secrecs_own');

/* removethis */
Line 1357/1358
dbtools_sql('DELETE FROM secrecs_all WHERE ChallengeID="'.mysql_real_escape_string($challengeinfo['UId']).'"');
dbtools_sql('DELETE FROM secrecs_own WHERE ChallengeID="'.mysql_real_escape_string($challengeinfo['UId']).'"');

/* removelogin */
Line 1394/1395
dbtools_sql('DELETE FROM secrecs_own WHERE PlayerNick="'.mysql_real_escape_string($param[1]).'"');
dbtools_sql('DELETE FROM secrecs_all WHERE PlayerNick="'.mysql_real_escape_string($param[1]).'"');
Also changed some strings, but I'm not listing those now :lol:

Post Reply