Page 17 of 17

Re: ASECO/RASP TMF 2.2.0c [08/6/26]

Posted: 11 Apr 2009 17:30
by oliverde8
Hi,

Several Aseco can be connected to one DB. What I am trying to do is to keep in the database all transactions made by the servers. I want to be able to understand which server did the transaction. Thats why I need to have something that identifies the server. The port seemed to be fine to be used(5001 5002...) but I wasn't able to get it in the plugin

I used

Code: Select all

$this->Aseco->masterserver->port
but it is empty I tried a

Code: Select all

print_r($this->Aseco->masterserve);
But I got all empty

Code: Select all

stdClass Object
(
    [login] =>
    [pass] =>
    [ip] =>
    [port] =>
)
I know I could just pick it up in the XML file but that isn't the ideal way. I could olso use server login(the one by nadeo not the SuperAdmin..) but I wasn't able to get that either.

Thanks for the help :thumbsup:

Re: ASECO/RASP TMF 2.2.0c [08/6/26]

Posted: 11 Apr 2009 18:49
by Xymph
oliverde8 wrote:I used

Code: Select all

$this->Aseco->masterserver->port
but it is empty I tried a

Code: Select all

print_r($this->Aseco->masterserve);
But I got all empty
Maybe that's because there's an 'r' missing at the end. :wink:

Re: ASECO/RASP TMF 2.2.0c [08/6/26]

Posted: 11 Apr 2009 19:07
by Assembler Maniac
oliverde8 wrote:Several Aseco can be connected to one DB. What I am trying to do is to keep in the database all transactions made by the servers. I want to be able to understand which server did the transaction. Thats why I need to have something that identifies the server. The port seemed to be fine to be used(5001 5002...) but I wasn't able to get it in the plugin

I used

Code: Select all

$this->Aseco->masterserver->port
but it is empty I tried a

Code: Select all

print_r($this->Aseco->masterserve);
But I got all empty

Code: Select all

stdClass Object
(
    [login] =>
    [pass] =>
    [ip] =>
    [port] =>
)
I know I could just pick it up in the XML file but that isn't the ideal way. I could also use server login(the one by nadeo not the SuperAdmin..) but I wasn't able to get that either.

Thanks for the help :thumbsup:
Why not use the server login? That way if the IP or port changes it won't make any difference.

Use method GetSystemInfo, array element ServerLogin.

Re: ASECO/RASP TMF 2.2.0c [08/6/26]

Posted: 11 Apr 2009 19:55
by oliverde8
Thanks :thumbsup: I will do that

thats was the first plan but couldn't find it and as the list of TrackmaniaMethods has no information about GetSystemInfo didn't look more into it

Re: ASECO/RASP TMF 2.2.0c [08/6/26]

Posted: 11 Apr 2009 20:09
by Assembler Maniac
oliverde8 wrote:Thanks :thumbsup: I will do that

thats was the first plan but couldn't find it and as the list of TrackmaniaMethods has no information about GetSystemInfo didn't look more into it
I've got some utilities that let me send commands (and manialink files) to the server and see the results (sendcmd.php GetSystemInfo). It's pretty helpful when a command looks like it *might* be what you want, but seeing the results will tell you for sure.

Re: ASECO/RASP TMF 2.2.0c [08/6/26]

Posted: 11 Apr 2009 20:35
by Xymph
Assembler Maniac wrote:I've got some utilities that let me send commands (and manialink files) to the server and see the results (sendcmd.php GetSystemInfo). It's pretty helpful when a command looks like it *might* be what you want, but seeing the results will tell you for sure.
Yeah, I use these RPC utilities very often too. It also includes a script to monitor callbacks as they are sent by the dedicated.

Re: ASECO/RASP TMF 2.2.0c [08/6/26]

Posted: 05 May 2009 15:39
by dor396

Re: ASECO/RASP TMF 2.2.0c [08/6/26]

Posted: 07 May 2009 15:16
by oliverde8
Hi,

I think I found an error in JB plugin replayCallvote function
there is this
if (array_key_exists($uid, $this->jukebox))
But uid is never gotten

needs
$uid = $this->Aseco->server->challenge->uid;
just before

and $admin don't exist so you can't use it to send the message need to replace it with $player
At the end it bocomes

Code: Select all

function replayCallvote($command){
		$player = $command['author'];
		
		$uid = $this->Aseco->server->challenge->uid;
		// check if track already in jukebox
		if (array_key_exists($uid, $this->jukebox)){                             // find by uid in jukebox
			$message = $this->Aseco->formatColors($this->messages['TRACKINJB']);
			$this->Aseco->client->query('ChatSendServerMessageToLogin', $message, $player->login);
			return;
		}

		$this->Aseco->callVote($player, 'Replay current track', $this->replayVotePct, $this->replayVoteTime, $this, 'replayTrackByVote');
	}  //  replayCallvote

Re: ASECO/RASP TMF 2.2.0c [08/6/26]

Posted: 08 May 2009 14:17
by Assembler Maniac
oliverde8 wrote:Hi,

I think I found an error in JB plugin replayCallvote function
there is this
if (array_key_exists($uid, $this->jukebox))
But uid is never gotten

needs
$uid = $this->Aseco->server->challenge->uid;
just before

and $admin don't exist so you can't use it to send the message need to replace it with $player
At the end it becomes

Code: Select all

function replayCallvote($command){
		$player = $command['author'];
		$uid = $this->Aseco->server->challenge->uid;

		// check if track already in jukebox
		if (array_key_exists($uid, $this->jukebox)){                             // find by uid in jukebox
			$message = $this->Aseco->formatColors($this->messages['TRACKINJB']);
			$this->Aseco->client->query('ChatSendServerMessageToLogin', $message, $player->login);
			return;
		}

		$this->Aseco->callVote($player, 'Replay current track', $this->replayVotePct, $this->replayVoteTime, $this, 'replayTrackByVote');
	}  //  replayCallvote
Good catch. Your code changes are appropriate.

Also, at the bottom of the jukebox plugin, there's a line that reads:
$_PLUGIN->addEvent('onPlayerServerMessageAnswer', 'event_jukebox_message');

It can be commented out or deleted. The function event_jukebox_message doesn't exist anywhere and never got written because the voting functionality (f5/f6) got added to aseco.php.

Re: ASECO/RASP TMF 2.2.0c [08/6/26]

Posted: 03 Jun 2009 17:14
by oliverde8
I fond something else that didn't work,

the /admin endround command should be working with Rounds Teams & Laps mode it only works with Rounds

I made a chane in plugin.rasp.php

Code: Select all

	function endround(&$command)
		{
		if ( $this->Aseco->server->gameinfo->getMode() == 'Rounds' 
		|| $this->Aseco->server->gameinfo->getMode() == 'Laps' 
		|| $this->Aseco->server->gameinfo->getMode() == 'Team' ){
			$this->Aseco->client->query('ForceEndRound');
			$this->sendServerMessage($this->Aseco->formatColors($this->messages['ENDROUND']));
		
		}else{
			$this->sendServerMessageToLogin($command['author']->login, $this->Aseco->formatColors($this->messages['ENDROUNDERR']));
			}
			
		}  //  endround

Re: ASECO/RASP TMF 2.2.0c [08/6/26]

Posted: 03 Jun 2009 17:32
by Assembler Maniac
Thanks. It's changed.
oliverde8 wrote:I fond something else that didn't work,

the /admin endround command should be working with Rounds Teams & Laps mode it only works with Rounds

I made a chane in plugin.rasp.php

Code: Select all

	function endround(&$command)
		{
		if ( $this->Aseco->server->gameinfo->getMode() == 'Rounds' 
		|| $this->Aseco->server->gameinfo->getMode() == 'Laps' 
		|| $this->Aseco->server->gameinfo->getMode() == 'Team' ){
			$this->Aseco->client->query('ForceEndRound');
			$this->sendServerMessage($this->Aseco->formatColors($this->messages['ENDROUND']));
		
		}else{
			$this->sendServerMessageToLogin($command['author']->login, $this->Aseco->formatColors($this->messages['ENDROUNDERR']));
			}
			
		}  //  endround

Re: ASECO/RASP TMF 2.2.0c [08/6/26]

Posted: 29 Apr 2010 18:47
by Greco
i found a bug to all aseco versions.
When you type /admin kick login or another commands with login if the login is wrong or not type it ( /admin kick ) you have the server message. Its not the correct.

Re: ASECO/RASP TMF 2.2.0c [08/6/26]

Posted: 01 May 2010 19:35
by nocturne
Not really a bug, just that there's no check if the player is in the list (which makes it helpful in cleaning out bugged disconnects or 'ghosts'). Plus, it makes it fun screwing around with the other admins by using their nicknames instead of logins.. :lol: