maniaplanet / manialive

PHP controller for the ManiaPlanet Dedicated Server
GNU Lesser General Public License v3.0
9 stars 4 forks source link

onPlayerChat - misleading function name? #15

Closed magnetik closed 10 years ago

magnetik commented 10 years ago

From arjanbol...@gmail.com on February 11, 2011 18:48:37

Ok so i've been working on a IRC plugin for manialive and this leads me to the point where i want to get the text of a player, when they chat ingame and send it to the irc channel.

The entire communication with an irc channel is no problem, however for as much as i can tell, there is no way to actually get the chat ingame.

I've tried onPlayerChat but this doesn't seem to do anything.

Am i just using the wrong function here and is onPlayerChat a misleading function name? or does it actually not work

also btw there is a slight typo in the function

function onPlayerChat($playerUid, $login, $text, $isRegistredCmd);

$isRegistredCmd should be $isRegisteredCmd, but this is only a minor issue. The main concern is that the documentation states it is called when a player quits the server, if this is indeed the case, wouldn't it be helpful to rename the function to something more logical?.

Original issue: http://code.google.com/p/manialive/issues/detail?id=15

magnetik commented 10 years ago

From arjanbol...@gmail.com on February 11, 2011 15:30:23

I hereby have to apologize for my own stupidity, i forgot to call $this->enableDedicatedEvents();

Anyway both the documentation and typo issues still stand ^^ onPlayerChat works normally :D my brain apparently doesn't ^^

magnetik commented 10 years ago

From melot.philippe on February 12, 2011 00:03:45

so we can say it's fixed

Status: Fixed
Owner: melot.philippe