ManiaLive r194

Discuss the Dedicated Server Tools developed by Nadeo Live such as ManiaLive, Trust Circles, Dedicated Manager, Competition Manager and Lobbies

Moderator: NADEO

farfa
Nadeo
Nadeo
Posts: 585
Joined: 14 Jun 2010, 16:15
Location: In front of your hood with one lap late

ManiaLive r194

Post by farfa »

Here is a new version of ManiaLive which is compatible with the latest Release of the Dedicated server (http://www.tm-forum.com/viewtopic.php?f ... 67#p191667)
Image

Upgrade
This version should work well again with the update script.
Find it in the /update directory. Windows users execute the update.bat where Linux users will have to pass the file to the php executeable.

Download
If you want to upgrade from any older version or this is your first install, go to http://www.manialive.com.
See the download tab for the latest release, download and extract it.

Plugins
As always you can download just the core, but that won't do much :-)
Download the new plugin package on: http://code.google.com/p/manialive/downloads/list
Extract it to the ManiaLive folder. After that you need to add the plugins in your config file so that they are loaded (read the wiki on the google project on how to do that).

Features you should know about
Thanks to the latest release, there is now a currentVote property in the Storage class. this property contain an object if there is a vote in progress. The object stay in the Storage class until the end of the loop of the end of the vote. If there is no vote, the property is set to null.
We also add a Cache system. In this class you can store data you want to share with other plugins. You have 4 methods to know to use it

Code: Select all

//To store some data
//The timeToLive value is optionnal, if set, the value will be destoyed once the time in second will be reached
$this->store('mySuperKey',$mySuperData, $timeToLive);
//To get some data stored by the plugin itself
$mySuperData = $this->fetchOwn('mySuperKey');
//To get some data stored by an other plugin
if($this->exists($pluginId,'mySuperKey'))
{
     $mySuperData = $this->fetch('$pluginId, 'mySuperKey');
}
If you try to fetch a data that does not exists in the cache it will throw an exception

Changes
+ add compatibility with server build of 21st feb 2011
+ add the currentVote to the storage class
+ add Cache system to ManiaLive to store data to be share between classes
* bug fixes
Also known as: satanasdiabolo
User avatar
aseco
Posts: 96
Joined: 06 Jul 2010, 17:08
Location: Germany
Contact:

Re: ManiaLive r194

Post by aseco »

There are just three more changes in the new version you should know about:
- plugin errors in onLoad won't crash whole manialive anymore.
- version checks are failsafe now.
+ implemented onPlayerFinishLap event in storage class.

Also, I want to mention, that for the new Dedimania version it is necessary ( :roll: ) to run the latest Dedicated Server version!
Last edited by aseco on 25 Feb 2011, 11:36, edited 1 time in total.
i7 920 | Nvidia GTX260 | 4Gb DDR3
www.floschnell.de | I like that comic
User avatar
Xymph
Posts: 1399
Joined: 15 Jun 2010, 20:35
Contact:

Re: ManiaLive r194

Post by Xymph »

aseco wrote:Also, I want to mention, that for the new Dedimania version it is inevitable to run the latest Dedicated Server version!
Out of curiosity, which specific feature of the new dedicated is necessary (not inevitable ;) ) for your Dedi plugin?
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
User avatar
4lturbo
Posts: 106
Joined: 13 Jan 2011, 18:26

Re: ManiaLive r194

Post by 4lturbo »

aseco wrote: + implemented onPlayerFinishLap event in storage class.
\o/, very nice, thanks, tested and approved
CT*ImHoTep
ModLap Championship
Image
Le jour où l'on mettra les cons sur orbite, y en a qui n'ont pas fini de tourner ...
User avatar
aseco
Posts: 96
Joined: 06 Jul 2010, 17:08
Location: Germany
Contact:

Re: ManiaLive r194

Post by aseco »

Xymph wrote:
aseco wrote:Also, I want to mention, that for the new Dedimania version it is inevitable to run the latest Dedicated Server version!
Out of curiosity, which specific feature of the new dedicated is necessary (not inevitable ;) ) for your Dedi plugin?
xbx wrote:new method GetCurrentRankingForLogin(), which is like GetCurrentRankings(), but for a specific login or list of logins. (useful for teammode as GetCurrentRankings() just returns the score for the 2 teams and not for the individual players)
In the end it was not totally necessary, but it has been the nicest way to do it.

EDIT:
Finally we succeeded in tracking the Fatal error: Exception thrown without stack frame in Unknown on line 0:
Before I explain the reason, I will just post a link to our wiki where it is explained how you can fix this.
Ok, the reason is not so obvious: I think this is related to the CRT-bug (http://bugs.php.net/bug.php?id=49948) which throws an exception right at the start of manialive and as manialive is trying to parse that exception, the date() method throws another one just within the exception handler. Now php can't provide a stack frame anymore and is unable to tell the exact reason ... :roll:
4lturbo wrote:\o/, very nice, thanks, tested and approved
:-) yup, this really took some time of testing and debugging ...
i7 920 | Nvidia GTX260 | 4Gb DDR3
www.floschnell.de | I like that comic
User avatar
4lturbo
Posts: 106
Joined: 13 Jan 2011, 18:26

Re: ManiaLive r194

Post by 4lturbo »

The event ON_PLAYER_FINISH_LAP is sent even if the track isn't a lap challenge you must add a test if challenge is multilap or not (in Data\Storage.php onPlayerCheckpoint() method ) ;)
CT*ImHoTep
ModLap Championship
Image
Le jour où l'on mettra les cons sur orbite, y en a qui n'ont pas fini de tourner ...
farfa
Nadeo
Nadeo
Posts: 585
Joined: 14 Jun 2010, 16:15
Location: In front of your hood with one lap late

Re: ManiaLive r194

Post by farfa »

Just like the endRound callback, it's send even if I'm not in round mod. You can consider a track in timeAttack like a track of 1 lap ;)
Also known as: satanasdiabolo
User avatar
4lturbo
Posts: 106
Joined: 13 Jan 2011, 18:26

Re: ManiaLive r194

Post by 4lturbo »

Yes, but i use this event to get top lap, and this isn't good to see "Best Lap" in a challenge which it isn't multilap ;)
You already have onPlayerBestTime (for no multilap challenge)

Think about this "little bug" in the next release 8-)
Only add this at the end of onPlayercheckpoint() method in Storage.php

Code: Select all

if ($this->currentChallenge->lapRace) 
{
   Dispatcher::dispatch(new Event($this, Event::ON_PLAYER_NEW_BEST_TIME, array($player, $old_best, $timeOrScore)));
}
CT*ImHoTep
ModLap Championship
Image
Le jour où l'on mettra les cons sur orbite, y en a qui n'ont pas fini de tourner ...
User avatar
4lturbo
Posts: 106
Joined: 13 Jan 2011, 18:26

Post by 4lturbo »

I have the same trouble with this version than with r189 (Link)

Code: Select all

DOMElement::setAttribute(): string is not in UTF-8
I have this error today with the nickname ( $£$524adm$£$265intzt , and the other time was $z$o$000Kryw$ffà~$90CH )
So i look to my plugin source, with this nick as mine, this happens when i call String::stripAllTmStyle, in this two nick there is $ with a no valid char (for tmn syntax), so there is, may be, an error in the preg_match pattern.

PS: Farfa, do you have read my MP ?
CT*ImHoTep
ModLap Championship
Image
Le jour où l'on mettra les cons sur orbite, y en a qui n'ont pas fini de tourner ...
User avatar
weerwolf
Posts: 603
Joined: 15 Jun 2010, 21:21
Location: Wijchen, Netherlands
Contact:

Re: ManiaLive r194

Post by weerwolf »

Fatal Crash:
and Note: I allready adjusted php limit to 50Mb

Code: Select all

Fatal error: Allowed memory size of 50331648 bytes exhausted (tried to allocate 71 bytes) in /LYNX1server/LYNX1manialive/libraries/ManiaLive/Gui/Handler/IDGenerator.php on line 71
Post Reply

Return to “Dedicated Server Tools”

Who is online

Users browsing this forum: No registered users and 1 guest