ketsuekiro / manialive

Automatically exported from code.google.com/p/manialive
GNU Lesser General Public License v3.0
0 stars 0 forks source link

Command parsing issue when running ManiaLive alongside other server controllers #52

Closed GoogleCodeExporter closed 8 years ago

GoogleCodeExporter commented 8 years ago
What steps will reproduce the problem?
1. Run both ManiaLive and another server controller for the same server.
2. One of:
2a. Type in a command for a ManiaLive plugin that is invalid for the other 
server controller, or
2b. Type in a command for the other server controller that is invalid in 
ManiaLive. 
3. The server controller that doesn't use the command 

What is the expected output? What do you see instead?
The server controllers should use the Echo() API call or an API call similar to 
ChatEnableManualRouting() to ensure that an error isn't thrown.  In the former 
case, the server controllers should tell each other using Echo when the command 
is valid for that server controller.  In the latter case, the command should be 
sent to only one controller, and that controller should pass the command down 
to the next one if it doesn't make use of it.  In both cases, only one 
controller should display the "invalid command" error.  

Instead, the server controller that doesn't use the command throws an error 
while the other one executes the command.  

What version of the product are you using? On what operating system?
Tested this with a pair of ManiaLive 2.5.1 installations running on the same 
2013-02-09b dedicated server on Windows.  

Please provide any additional information below.
I prefer the round-robin approach to fixing this issue, but it would require a 
new API version with a call to have the server send commands to one server 
controller at a time, and another call for each server controller to tell the 
server whether or not the command is valid for that controller.  Finally, there 
would need to be a callback to tell one of the server controllers if a command 
is invalid for all of the controllers, or PlayerChat() could fill that purpose. 
 I don't know who is responsible for the dedicated server API at Nadeo, so 
please pass this on to whoever that is.  

Original issue reported on code.google.com by tatharn...@gmail.com on 27 Feb 2013 at 5:33

GoogleCodeExporter commented 8 years ago
ManiaLive like MPAseco and the other controllers are not design to be used 
alongside an other one. If you don't want to see errors in ManiaLive, just 
create a plugin that register all the commands you want

Original comment by melot.philippe on 27 Feb 2013 at 10:26

GoogleCodeExporter commented 8 years ago
Unfortunately, there's one critical problem with that approach.  Even if I use 
a plugin to register all of the other controllers' commands with ManiaLive, if 
a command isn't used by any of the server controllers, then all of them will 
display an error message.  As currently written, no plugin can register all 
possible commands with ManiaLive because ManiaLive only allows registering one 
command per function call.  

This can be easily remedied by just having a function in the base Plugin class 
that allows the plugin to tell ManiaLive to forward all invalid commands to 
that plugin instead of displaying an error.  I could do the rest with a plugin 
as you said, but I need this one thing added to ManiaLive in order to address 
this one remaining issue and add cross-controller support for my future Dragon 
Console plugin.  

As for other issues, like GUI windows from different controllers overlapping, 
there isn't any pressing need to address those within the server controllers, 
since there are already many ways to fix those, and plugins for the same 
controller can run into the same problems.  

Also, I just noticed a typo in my original ticket.  I tried to delete step 3 up 
top, but it seems I missed part of it.  

Original comment by tatharn...@gmail.com on 27 Feb 2013 at 3:17

GoogleCodeExporter commented 8 years ago
Then if you still want to use both, disable the ChatInterpreter on ManiaLive

Original comment by melot.philippe on 28 Feb 2013 at 11:08