I have tried to make a script to make a message by ~~Server~~ appear in only the main channel instead of all channels, using the following script in beforeNewMessage: Code (text): if (message.substr(0, 12) == "~~Server~~: "){ sys.stopEvent(); sys.sendHtmlAll("<font color='orange'><timestamp/><b>~~Server~~:</b></font> " + message.slice(12), 0); return; } However, the event appears not to be stopped even with sys.stopEvent() there. The message posted by ~~Server~~ appears twice. Of the two, the first message is the one that is supposed to appear. The second message appears in all channels and ~~Server~~ has bot colour in it. I have no idea how this message can appear while the event has stopped. There should only be the first message, which is posted in my main channel. I tried removing my client scripts, but nothing changed. Does anyone know what is going wrong? And if so, please tell me how to make the ~~Server~~ messages appear in my main channel instead of all. It's really annoying to have the messages appear in private channels. Also, the messages sent by ~~Server~~ do not appear in the server window without this script. That is strange to me, as they always did in previous versions of PO.
You'll find a bit more help with your problem under Server and Client scripting, since that's what this pertains to. (I have no idea what I'm doing so bear with me if I sound stupid and uninformed) There might be an event or something that you're missing or a check that didn't properly check or something. Anyway, this post is just letting you know your thread was relocated.
The sys.stopEvent stops the message being printed on the console, not the broadcast that prints that message AND sends it to players. Maybe we should add a beforeServerMessage event for this?
So it is impossible to stop a server message from being sent? Wow, that sucks... I badly want my server messages in one channel. :( BeforeServerMessage should indeed be added.
At the moment yes, I'll go ahead and look into fixing that though :) EDIT: https://github.com/po-devs/pokemon-online/pull/306 Check status to see if mainlined :) EDIT2: Inn the mean time you could clone my repository, but you'll need to compile it yourself.