- All server controllers that don't use a particular command will display a "command invalid" error, even if another server controller does use that command. This cannot be completely addressed through the use of plugins, because the server controller itself is responsible for the improper error message. Key points for a solution include:
- Server controllers must know at all times which other server controllers are running on a server. To accomplish this, when a server controller starts, it must broadcast its presence through the proposed communication protocol and ask what other server controllers are present. The other server controllers then broadcast their presence. Also, when a server controller is shut down, it should announce that via the protocol. Finally, to detect server controller crashes and improper shutdowns, each server controller must periodically send out a "ping" broadcast to tell the other controllers that they're still connected.
- Server controllers must communicate which commands they use to each other. The proposed communication protocol would facilitate this. This can be done through the use of plugins, or directly through the server controllers' chat interpreters. When a server controller is no longer connected, its commands should then be unregistered with the other controllers' chat interpreters.
- Upon finding out that a command is used by another server controller, each server controller's chat interpreter should register that command in its own command list and have the command either pass to an empty method or be ignored.
- All server controllers except one must suppress their "command invalid" errors even if a command truly is invalid. Otherwise, the error message will be displayed multiple times for the same command. It is up to the server owner or the server controllers to decide which server controller will display this error message.
- Server controllers should communicate specifically whether they have a help system accessed by chat command. All server controllers except one should disable this feature, and if that controller is disconnected, then the others must then decide whether one should take its place or to have no replacement system.
- If any server controllers contain a help system that provides basic help information on a command (like ManiaLive's /man command, but not /help) then the system should be disabled, unless it is the only one enabled and it can get or generate the necessary data for the other controllers' commands. Standardization of this data collection is important, but beyond the scope of this list.
- If a controller needs to use ChatEnableManualRouting() to manipulate player chat messages, it should communicate this to the other controllers. Only one server controller should route player chat messages, or else multiple transformed messages will be displayed for every one message sent by a player.
I didn't know that Echo and the callback switched the argument order. I was planning on using an Echo-based protocol for my ManiaLive plugins to communicate with other server controllers, and I never would have thought that the arguments would be in reverse order. Thanks for letting us know.The_Big_Boo wrote:First, we're using the Echo method so here are a few things to know before starting:
- Messages are sent by calling Echo method on the dedicated
- Message are received by the callback ManiaPlanet.Echo
- Echo callback is always sent to everyone
- Echo method and ManiaPlanet.Echo callback have 2 arguments but there are not in the same order (which most probably won't be fixed)
EDIT: I was missing some things that server controllers and plugins need to do to be multi-controller aware. I haven't finalized it yet, but I have a draft specification to give server controllers and plugins MCA functionality. If you want a copy of what I have now, please send me a private message.