ASECO 2.2.2 and stuff

This forum is dedicated to the Aseco/Rasp 2 server records and control script by Flo and Assembler Maniac. Announcements and issues can be discussed in this forum.

Moderators: Flo, f*ckfish, Assembler Maniac, TM-Patrol

Post Reply
Assembler Maniac
Pit Crew
Pit Crew
Posts: 1493
Joined: 03 Jun 2006 13:24
Owned TM-games: TMU
Contact:

ASECO 2.2.2 and stuff

Post by Assembler Maniac » 09 Jun 2009 22:57

Ok everyone, I'm back.

I'm in the process of editing the dedimania files for format, completeness and removing extra (unused) vars.

This may take me a few days, but I'm also going to shrink the DM zip file so it only contains the needed files. W1lla, I'll send you a link to it so you can compare to your copy before I release 2.2.2).

In the process I'll be editing ASECO itself for some open items.

I'm not likely to be able to keep track of every single thing I change, but they should all be for the better.

Questions? Comments? Ideas? Changes you've made? ---- Post 'em here. I'll delete any posts that aren't related directly to a problem or suggestion or change.

Have at it.

nocturne
solid chaser
solid chaser
Posts: 1390
Joined: 08 Jun 2007 18:48
Owned TM-games: all
Contact:

Re: ASECO 2.2.2 and stuff

Post by nocturne » 10 Jun 2009 01:07

Welcome back, AM!!! :1

Hmm... got a list around here somewhere, hehe :lol:

Can wait till tomorrow, though... Go Orlando! :3

Edit: Here's a start... been sitting around on my desktop for awhile now...

Code: Select all

// ===============================================================================================================

// Hack to change position of PB/Rec window to bottom right,
//	and display player's rec number if any
	
// plugin.rasp.php

// Line 307-316 (replacement)  -- Widens the content boxes

	function makePbWinContent($data)
		{
		$content = "<line height='.031'>
					<cell width='.05'><text halign='right' textcolor='eee'>PB:</text></cell>
					<cell width='.2'><text textcolor='ddd'> " . $data . "</text></cell></line>
					<line height='.031'>
					<cell width='.05'><text halign='right' textcolor='eee'>Rec:</text></cell>
					<cell width='.11'><text textcolor='ddd'> " . $this->formatScore($this->besttime) . "</text></cell></line>";
		return $content;
		}  //  setPbWinData

// Line 342 (replacement)  -- Change 'UNRANKED' to '--', so it fit's in the content box

				$ret['rank'] = '--';

// Line 369 (replacement)  -- adds the rank to the window content

			$content = $this->makePbWinContent($this->formatScore($ret['time']).' ['.$ret['rank'].']');     

// Line 390-392 (replacement)  - Change's the location, and removes box

    		$window = $this->createWindowToPlayerFramework('', -.815, -.515, $player, true);
			$window->setContent($content);
			$window->setBackground('6660');


// ===============================================================================================================

// Karma table cleanup for missing players/challenges

// plugin.rasp_karma.php Line 77 (insert)

		//    Cleanup Karma rows for missing players/challenges
		$this->Aseco->console_text('[RASP Karma] Cleaning up unused data...');
		$sql = 'DELETE FROM rs_karma where not exists (select Id from players p where p.Id=rs_karma.PlayerID)';
		mysql_query($sql);
		$sql = 'DELETE FROM rs_karma where not exists (select Id from challenges c where c.Id=rs_karma.ChallengeID)';
		mysql_query($sql);

// ===============================================================================================================
On top of that... fixed player object, make the isAdmin function generic when no authitem given (instead of relying on SuperAdmin authitem), and pass/cancel buttons for admins on the vote popup. I'd give my code, but sure you can do it better, hehe...

User avatar
oliverde8
solid chaser
solid chaser
Posts: 1135
Joined: 07 Oct 2006 07:03
Owned TM-games: TMU
Manialink(s): oliverde8
Location: Turkey
Contact:

Re: ASECO 2.2.2 and stuff

Post by oliverde8 » 10 Jun 2009 04:50

yeaaah :D
hal|Sascha wrote:So now the callbacks if server is running with WarmUp is like the following:
A. WarmUp
A.1. BeginChallenge()
A.2. BeginRace()
A.3. EndRace()
B. Race
B.1. BeginRace()
B.2. EndRace()
B.3. EndChallenge()
^^Need to update executeCallbacks()
TrackMania.BeginRace => Must send as event OnBeginRace
TrackMania. BeginChallenge => Must send OnNewChallange event
Since the new dedicated works with this and not the old, maybe a dedicated version control

A little option to hide Rasp Windows. not an in game option, fufi widgets show the same so I commented all the lines of that an option would be easier
ImageImage
Manialink : oliverde8color>
Servers : STATS <> United | VeryShort | Made In Turkey

User avatar
w1lla
TM-Patrol
TM-Patrol
Posts: 1466
Joined: 23 May 2007 07:20
Owned TM-games: TMU, TMN, TMF
Manialink(s): intr
Location: Venray

Re: ASECO 2.2.2 and stuff

Post by w1lla » 10 Jun 2009 06:59

The addition of adding tmu and nation in the database of aseco....
When players connect or reconnect on a daily basis.

remove or edit plugin.tmxlinker.php for all tmx websites....

For dedimania might be nice if plugin.rasp_cptimes is included or it depends on it.

Make a report rounds plugin.... could be a nice basis for players because now no reports of the rounds are being done.

Karma vote with one of the Function keys could be quite nice....

Thats about it what i have.

Code: Select all

tmnforever is nations and united makes it special. tmnforever has united. I need united!

User avatar
oliverde8
solid chaser
solid chaser
Posts: 1135
Joined: 07 Oct 2006 07:03
Owned TM-games: TMU
Manialink(s): oliverde8
Location: Turkey
Contact:

Re: ASECO 2.2.2 and stuff

Post by oliverde8 » 10 Jun 2009 12:46

w1lla wrote: remove or edit plugin.tmxlinker.php for all tmx websites....
The TMX info plugin already does the work of tmxlinker if tmxlinker is desactivated
ImageImage
Manialink : oliverde8color>
Servers : STATS <> United | VeryShort | Made In Turkey

User avatar
w1lla
TM-Patrol
TM-Patrol
Posts: 1466
Joined: 23 May 2007 07:20
Owned TM-games: TMU, TMN, TMF
Manialink(s): intr
Location: Venray

Re: ASECO 2.2.2 and stuff

Post by w1lla » 10 Jun 2009 17:08

ah ok...

nice job on that oliverde then that plugin can be removed i suppose.

All in favor say... Yarrr.

Code: Select all

tmnforever is nations and united makes it special. tmnforever has united. I need united!

nocturne
solid chaser
solid chaser
Posts: 1390
Joined: 08 Jun 2007 18:48
Owned TM-games: all
Contact:

Re: ASECO 2.2.2 and stuff

Post by nocturne » 10 Jun 2009 18:55

oliverde8 wrote:
w1lla wrote: remove or edit plugin.tmxlinker.php for all tmx websites....
The TMX info plugin already does the work of tmxlinker if tmxlinker is desactivated
I couldn't get that plugin to work properly, btw... Needed to update the tmxfetcher, then change a few urls.

User avatar
oliverde8
solid chaser
solid chaser
Posts: 1135
Joined: 07 Oct 2006 07:03
Owned TM-games: TMU
Manialink(s): oliverde8
Location: Turkey
Contact:

Re: ASECO 2.2.2 and stuff

Post by oliverde8 » 10 Jun 2009 19:33

nocturne wrote:
oliverde8 wrote:
w1lla wrote: remove or edit plugin.tmxlinker.php for all tmx websites....
The TMX info plugin already does the work of tmxlinker if tmxlinker is desactivated
I couldn't get that plugin to work properly, btw... Needed to update the tmxfetcher, then change a few urls.
OO I thinked I had do that with version 1.33. now I see I hadn't update the zip file with the new file
I will make an update.
ImageImage
Manialink : oliverde8color>
Servers : STATS <> United | VeryShort | Made In Turkey

User avatar
oliverde8
solid chaser
solid chaser
Posts: 1135
Joined: 07 Oct 2006 07:03
Owned TM-games: TMU
Manialink(s): oliverde8
Location: Turkey
Contact:

Re: ASECO 2.2.2 and stuff

Post by oliverde8 » 11 Jun 2009 18:19

Ending vote on end of newchallange not on end of the challange. people votes during the chat time and the vote continues on thenext track after .
ImageImage
Manialink : oliverde8color>
Servers : STATS <> United | VeryShort | Made In Turkey

Assembler Maniac
Pit Crew
Pit Crew
Posts: 1493
Joined: 03 Jun 2006 13:24
Owned TM-games: TMU
Contact:

Re: ASECO 2.2.2 and stuff

Post by Assembler Maniac » 15 Jun 2009 04:55

oliverde8 wrote:Ending vote on end of newchallenge not on end of the challenge. people votes during the chat time and the vote continues on the next track after .
Describe this better please, I can't quite understand when/what you mean.

Also from prev post:
oliverde8 wrote:On top of that... fixed player object, make the isAdmin function generic when no authitem given (instead of relying on SuperAdmin authitem), and pass/cancel buttons for admins on the vote popup. I'd give my code, but sure you can do it better, hehe...
Fix player object how?
How can you make the isAdmin function generic? If there's no auth item, how do you figure out who has access to it?

Admin vote pass/cancel buttons added - good idea, thx.

nocturne
solid chaser
solid chaser
Posts: 1390
Joined: 08 Jun 2007 18:48
Owned TM-games: all
Contact:

Re: ASECO 2.2.2 and stuff

Post by nocturne » 15 Jun 2009 06:32

Assembler Maniac wrote:Also from prev post:
nocturne wrote:On top of that... fixed player object, make the isAdmin function generic when no authitem given (instead of relying on SuperAdmin authitem), and pass/cancel buttons for admins on the vote popup. I'd give my code, but sure you can do it better, hehe...
Fix player object how?
How can you make the isAdmin function generic? If there's no auth item, how do you figure out who has access to it?
I meant the player class... half of it just isn't TMF-relevant. There's been discussions on this before, and various ppl have posted their fixes...

Generic isAdmin check, as in... if they are on any of the admin lists, return a positive. As it stands, the SuperAdmin authitem controls everything from not getting booted on idle to editting sensitive server settings. If all else fails, why not just copy Fufi's isAnyAdmin funtion into the core Aseco..?
w1lla wrote:The addition of adding tmu and nation in the database of aseco....
Was going to mention that too... I switched the player class to save the player's 'game' column as either TMU or TMF according to 'OnlineRights', but had to change dozens of queries along the lines of 'select * from players p where p.login='.$xxx.' and p.game='.quotedString($this->Aseco->server->getGame())... I could see the desire to have the option to use the same tables for older servers, but the ranks table would still be conflicting and the times would be skewed by tmf phsyics.
Last edited by nocturne on 15 Jun 2009 07:40, edited 1 time in total.

User avatar
oliverde8
solid chaser
solid chaser
Posts: 1135
Joined: 07 Oct 2006 07:03
Owned TM-games: TMU
Manialink(s): oliverde8
Location: Turkey
Contact:

Re: ASECO 2.2.2 and stuff

Post by oliverde8 » 15 Jun 2009 06:54

Assembler Maniac wrote:
oliverde8 wrote:Ending vote on end of newchallenge not on end of the challenge. people votes during the chat time and the vote continues on the next track after .
Describe this better please, I can't quite understand when/what you mean.
The votes ends at end challange. Once it ended some people votes again to try to restart the track during the chat time, but after the vote continues on the next track and the wrong track is queed in the JB. it would be nice that the vote is cancelled on TrackMania.BeginRace

Code: Select all

	case 'TrackMania.BeginRace' :
						$before = memory_get_usage();
						$this->beginRace($call[1]);
						$after = memory_get_usage();

						// view debug information ...
						$this->console_debug("BeginRace ate " . ($after - $before) . " bytes");
						if ($this->_vote_in_progress)
							$this->callVoteDone(false); // if it's still in progress, then it hasn't passed, to kill it
						break;

					case 'TrackMania.EndRace' :
						$before = memory_get_usage();
						$this->endRace($call[1]);
						$after = memory_get_usage();

						if ($this->_vote_in_progress)
							//$this->callVoteDone(false); // if it's still in progress, then it hasn't passed, to kill it
							$this->callVoteUpdate();

						// view debug information ...
						$this->console_debug("EndRace ate " . ($after - $before) . " bytes");
						break;
ImageImage
Manialink : oliverde8color>
Servers : STATS <> United | VeryShort | Made In Turkey

Xymph
Pit Crew
Pit Crew
Posts: 5654
Joined: 19 Aug 2007 12:58
Owned TM-games: TMN, TMU, TMF, TM²
Contact:

Re: ASECO 2.2.2 and stuff

Post by Xymph » 15 Jun 2009 07:37

nocturne wrote:If all else fails, why not just copy Fufi's isAnyAdmin funtion into the core Aseco..?
Fufi didn't write that, it's a core XAseco function by yours truly, and as simple as this:

Code: Select all

  function isAnyAdmin($player) {

    return ($this->isMasterAdmin($player) || $this->isAdmin($player) || $this->isOperator($player));
  }  // isAnyAdmin
Developer of XASECO for TMF/TMN ESWC & XASECO2 for TM²: see XAseco.org
Find your way around the Mania community from the TMN ESWC hub, TMF hub, TM² hub, and SM hub

Assembler Maniac
Pit Crew
Pit Crew
Posts: 1493
Joined: 03 Jun 2006 13:24
Owned TM-games: TMU
Contact:

Re: ASECO 2.2.2 and stuff

Post by Assembler Maniac » 15 Jun 2009 12:58

oliverde8 wrote:The votes ends at end challange. Once it ended some people votes again to try to restart the track during the chat time, but after the vote continues on the next track and the wrong track is queed in the JB. it would be nice that the vote is cancelled on TrackMania.BeginRace

Code: Select all

	case 'TrackMania.BeginRace' :
						$before = memory_get_usage();
						$this->beginRace($call[1]);
						$after = memory_get_usage();

						// view debug information ...
						$this->console_debug("BeginRace ate " . ($after - $before) . " bytes");
						if ($this->_vote_in_progress)
							$this->callVoteDone(false); // if it's still in progress, then it hasn't passed, to kill it
						break;

					case 'TrackMania.EndRace' :
						$before = memory_get_usage();
						$this->endRace($call[1]);
						$after = memory_get_usage();

						if ($this->_vote_in_progress)
							//$this->callVoteDone(false); // if it's still in progress, then it hasn't passed, to kill it
							$this->callVoteUpdate();

						// view debug information ...
						$this->console_debug("EndRace ate " . ($after - $before) . " bytes");
						break;
Ok, the callVoteDone will be on the NewChallenge event.

I'm going to code up a server version test too. At this point, there's too many changes to try and keep it compatible with old server versions anyway.
nocturne wrote:I meant the player class... half of it just isn't TMF-relevant. There's been discussions on this before, and various ppl have posted their fixes...

Generic isAdmin check, as in... if they are on any of the admin lists, return a positive. As it stands, the SuperAdmin authitem controls everything from not getting booted on idle to editting sensitive server settings. If all else fails, why not just copy Fufi's isAnyAdmin funtion into the core Aseco..?
What parts of the player class aren't TMF relevant? (keep in mind I haven't been following the forum discussions unless it was a basic question to be answered)

As for the isAdmin function, I'm not sure you realize what you're asking. Say someone writes a new cmd/function that allows deletion of a player & their records, but doesn't have an assigned admin level. With your request in place, even the lowest admin level possible would have the ability to execute the command.

The whole point of the admin level assignment is to prevent people from doing things they're not supposed to be doing. What you're asking for is to assume "any admin" when the system is specifically designed for "assume the worst, allow only superadmin".

And for everyone: I'm going to be posting an announcement with some guidelines for authoring plugins for ASECO 2.x. I've seen some not so great coding in the plugins I've been working on, and it bugs me a little that it could be better.

Xymph
Pit Crew
Pit Crew
Posts: 5654
Joined: 19 Aug 2007 12:58
Owned TM-games: TMN, TMU, TMF, TM²
Contact:

Re: ASECO 2.2.2 and stuff

Post by Xymph » 15 Jun 2009 13:17

Assembler Maniac wrote:As for the isAdmin function, I'm not sure you realize what you're asking. Say someone writes a new cmd/function that allows deletion of a player & their records, but doesn't have an assigned admin level. With your request in place, even the lowest admin level possible would have the ability to execute the command.

The whole point of the admin level assignment is to prevent people from doing things they're not supposed to be doing. What you're asking for is to assume "any admin" when the system is specifically designed for "assume the worst, allow only superadmin".
Obviously the isAnyAdmin function wouldn't replace the existing system, and has fairly limited use as in most cases you will want to test for sufficient authorization, like you say.

But here's a simple example from XAseco where it is useful: /players outputs a list of nicknames and logins, and normal logins are shown in blue while admin ones are green. The function simply saves you doing isAdmin || isAdmin || etc. tests for however many admin levels there may be.
Developer of XASECO for TMF/TMN ESWC & XASECO2 for TM²: see XAseco.org
Find your way around the Mania community from the TMN ESWC hub, TMF hub, TM² hub, and SM hub

Post Reply