Standard\TeamSpeak plugin throws exception on stopServer()

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

Moderator: NADEO

Post Reply
TatharNuar
Posts: 80
Joined: 16 Jul 2012, 16:50

Standard\TeamSpeak plugin throws exception on stopServer()

Post by TatharNuar »

If I stop my server using my Server Commands plugin, the Standard\TeamSpeak plugin throws an exception. A copy of the function from my plugin is below.

Code: Select all

function stopServerNow($login)
    {
        $name = $this -> storage -> getPlayerObject($login) -> nickName;
        $this -> connection -> chatSendServerMessage("$name \$z($login) is shutting down the server NOW.");
        
        $strippedName = Formatting::stripStyles($name);
        $this -> connection -> stopServer();
        die("$strippedName ($login) shut down the server.");
    }
farfa
Nadeo
Nadeo
Posts: 585
Joined: 14 Jun 2010, 16:15
Location: In front of your hood with one lap late

Re: Standard\TeamSpeak plugin throws exception on stopServer

Post by farfa »

Can you give us more details about the exception ?
Have you started your server with noautoquit option ?
Also known as: satanasdiabolo
TatharNuar
Posts: 80
Joined: 16 Jul 2012, 16:50

Re: Standard\TeamSpeak plugin throws exception on stopServer

Post by TatharNuar »

farfa wrote:Can you give us more details about the exception ?
Have you started your server with noautoquit option ?
I run my testing server on a different computer, so I wouldn't be able to dig up the actual exception. Would it be OK if I just sent you my plugin so you could try it for yourself? It can be reproduced by typing /stopServerNow with both plugins running.

No, I don't know what that option is.
farfa
Nadeo
Nadeo
Posts: 585
Joined: 14 Jun 2010, 16:15
Location: In front of your hood with one lap late

Re: Standard\TeamSpeak plugin throws exception on stopServer

Post by farfa »

The thing is, if your server is killed. I mean the task does not run anymore (it's the normal situation if you have not start it with the command /noautoquit). ManiaLive crash because the XML-RPC connection is lost.

So, if your server does not run with /noautoquit, it's normal, otherwise, your code sample should be enough to create a fake plugin.
Also known as: satanasdiabolo
TatharNuar
Posts: 80
Joined: 16 Jul 2012, 16:50

Re: Standard\TeamSpeak plugin throws exception on stopServer

Post by TatharNuar »

farfa wrote:The thing is, if your server is killed. I mean the task does not run anymore (it's the normal situation if you have not start it with the command /noautoquit). ManiaLive crash because the XML-RPC connection is lost.

So, if your server does not run with /noautoquit, it's normal, otherwise, your code sample should be enough to create a fake plugin.
So, am I doing it right? I couldn't find anything to shut down ManiaLive itself, so I just used PHP's die().
Post Reply

Return to “Dedicated Server Tools”

Who is online

Users browsing this forum: No registered users and 1 guest