Page 1 of 3

ManiaLive 1.0 r239

Posted: 29 Jun 2011, 11:08
by farfa
Here is a new version of ManiaLive
In this version the changelog is not that big, but changes are important

ManiaHome
The ManiaHome Client is now compatible with the last version of ManiaHome. The method signature has change so, update your plugin before using it.

chat commange
A new feature has been set in the chat command interpreter.
if you register a command with the number of parameter equal to -1, you can send as much argument as you want to the command.
Here is a code sample to use it:

Code: Select all

function onLoad()
{
     $this->registerChatCommand('t', 'test', -1, true);
}

function test()
{
    $args = func_get_args();
    //Do what you want here!!!
}
Some bug fixes has been made too.

You can download this version here: http://code.google.com/p/manialive/downloads/list

The standard plugins have been also updated, so think to download them too ;)

Re: ManiaLive 1.0 r239

Posted: 29 Jun 2011, 11:25
by schmidi
last time i will annoy you with this. like in the previous releases, typo still present.
maybe nobody cares anyways.

ManiaLive\DedicatedApi\Callback\Listener.php line 27

Code: Select all

	/**
	 * Method called when a Player quit the server
	 * @param int $playerUid
	 * @param string $login
	 * @param string $text
	 * @param bool $isRegistredCmd
	 */
	function onPlayerChat($playerUid, $login, $text, $isRegistredCmd);
onPlayerChat ... "Method called when a Player quit the server"

Re: ManiaLive 1.0 r239

Posted: 29 Jun 2011, 14:24
by reaby
great update!!!
this will make the plugin development for end user more easy to use since chat based plugins requires no more those extra hyphens to enter command

+++

Re: ManiaLive 1.0 r239

Posted: 29 Jun 2011, 17:01
by Knutselmaaster
Indeed, the hyphens were difficult to understand for most users.
The help messages in mlepp did not help them much, as not many people understand the word "hyphen" and i did not find a synonymy that was more understandable...

The (dedimania) broken pipe error has not occured since i updated this afternoon, i will keep you updated about it.

Re: ManiaLive 1.0 r239

Posted: 30 Jun 2011, 21:28
by Fadden
I tried to update Manialive with the update.php script but it didn't work.
This errors appeared many times :

Code: Select all

PHP Warning:  readdir() expects parameter 1 to be resource, boolean given in /usr/games/ManiaLive/update/update.php on line 240
copying: ./temp/ManiaLive/libraries/ManiaLive
PHP Warning:  copy(./temp/ManiaLive/libraries/ManiaLive/): failed to open stream: No such file or directory in /usr/games/ManiaLive/update/update.php on line 251
The script extracts in ./temp/manialive and try to copy extracted files from ./temp/ManiaLive... So it fails and only delete files without replacing them :|

Re: ManiaLive 1.0 r239

Posted: 30 Jun 2011, 23:00
by Knutselmaaster
Try this version of the updater.

Re: ManiaLive 1.0 r239

Posted: 02 Jul 2011, 15:14
by reaby
I found that windows console doesn't support utf-8 by default, this had some issues with character encoding with upcoming mlepp and console output. Can you add the following startup command to run.ini to fix this ?

Code: Select all

chcp 65001 > nul && %phpPath% bootstrapper.php
Though one have to edit the defaults little too. The normal console font doesn't have utf-8 chars. To fix:
  • Open console window
  • Right click at title bar
  • Choose defaults from the menu (second last entry)
  • Choose the first font: tt Consolas
  • Click Ok
*EDIT*
futher testing shows, that this works quite ok, but i get one extra line containing some characters from the original string. not good.




Can you also add the line breaks to log files, it's damn hard to read them when it's only at 1 line.

Re: ManiaLive 1.0 r239

Posted: 03 Jul 2011, 09:01
by nouseforname
pls change:

.../ManiaLive/libraries/ManiaLive/Utilities\logger.php

line 77

from:

Code: Select all

 error_log($text, 3, $this->path);
to:

Code: Select all

 error_log(date("Y.m.d_H:i ",time()).$text."\n", 3, $this->path);


for new line in command log...

Re: ManiaLive 1.0 r239

Posted: 03 Jul 2011, 21:14
by Knutselmaaster
One timer in my logs:

Code: Select all

    Occured on 03.07.2011 at 14:39:51 at process with ID #9298
    ---------------------------------
 -> ErrorException with code 0
    sqlite_exec(): database is locked
  - in /home/tmservers/servers/train/ManiaLive240/libraries/ManiaLive/Database/SQLite/Connection.php on line 114
  - Stack: #0 [internal function]: ManiaLive\Application\ErrorHandling::createExceptionFromError(2, 'sqlite_exec(): ...', '/home/tmservers...', 114, Array)
           #1 /home/tmservers/servers/train/ManiaLive240/libraries/ManiaLive/Database/SQLite/Connection.php(114): sqlite_exec(Resource id #60, 'INSERT INTO cmd...')
           #2 /home/tmservers/servers/train/ManiaLive240/libraries/ManiaLive/Threading/Thread.php(256): ManiaLive\Database\SQLite\Connection->execute('INSERT INTO cmd...')
           #3 /home/tmservers/servers/train/ManiaLive240/libraries/ManiaLive/Threading/Thread.php(432): ManiaLive\Threading\Thread->sendCommand(Object(ManiaLive\Threading\Commands\QuitCommand))
           #4 /home/tmservers/servers/train/ManiaLive240/libraries/ManiaLive/Threading/ThreadPool.php(430): ManiaLive\Threading\Thread->restart()
           #5 /home/tmservers/servers/train/ManiaLive240/libraries/ManiaLive/Threading/ThreadPool.php(304): ManiaLive\Threading\ThreadPool->removeDeadThreads()
           #6 /home/tmservers/servers/train/ManiaLive240/libraries/ManiaLive/Features/Tick/Event.php(26): ManiaLive\Threading\ThreadPool->onTick()
           #7 /home/tmservers/servers/train/ManiaLive240/libraries/ManiaLive/Event/Dispatcher.php(52): ManiaLive\Features\Tick\Event->fireDo(Object(ManiaLive\Threading\ThreadPool))
           #8 /home/tmservers/servers/train/ManiaLive240/libraries/ManiaLive/Features/Tick/Ticker.php(32): ManiaLive\Event\Dispatcher::dispatch(Object(ManiaLive\Features\Tick\Event))
           #9 /home/tmservers/servers/train/ManiaLive240/libraries/ManiaLive/Application/Event.php(36): ManiaLive\Features\Tick\Ticker->onPreLoop()
           #10 /home/tmservers/servers/train/ManiaLive240/libraries/ManiaLive/Event/Dispatcher.php(52): ManiaLive\Application\Event->fireDo(Object(ManiaLive\Features\Tick\Ticker))
           #11 /home/tmservers/servers/train/ManiaLive240/libraries/ManiaLive/Application/AbstractApplication.php(144): ManiaLive\Event\Dispatcher::dispatch(Object(ManiaLive\Application\Event))
           #12 /home/tmservers/servers/train/ManiaLive240/bootstrapper.php(82): ManiaLive\Application\AbstractApplication->run()
           #13 {main}
Server with threading enabled, php 5.3.6

Re: ManiaLive 1.0 r239

Posted: 04 Jul 2011, 10:18
by farfa
@nouseforname: done in the latest commit, it's optional, so it's up to you if you want to enable it.
@Knutselmaaster: I'll check this.