AAO25.com

Assist => Support => Server Support => Topic started by: ronski on Friday, July 08, 2016, 03:11:36 AM

Title: Handling Server Messages
Post by: ronski on Friday, July 08, 2016, 03:11:36 AM
There are two ways to get server forcing text to be scrolling at console. One way is to repeat Welcome Message / Message Of The Day -lines by enabling repeatmessage from system/aa25.ini. These are boolean values where 0 is false and 1 is true. Most likely you don't want to use this method just to scroll text in console, so keep repeatmessage disabled

Code: [Select]
repeatmessage=0
I'm using services from two providers here as an example. If you rent a server from Vortex Servers (NA servers) (https://vortexservers.com/), you most likely have servermessage.cfg file at system/pb folder. If you rent a server from Hosters.at (EU servers) (http://www.hosters.at/) you most likely don't have this file ready for your use. I'm not familiar how it is with other providers nor home servers. If the file exists at system/pb folder, delete it.

Have a look at this forum post: http://aao25.com/forum/general-chat-90/server-messeseg-question/msg16328/#msg16328 (http://aao25.com/forum/general-chat-90/server-messeseg-question/msg16328/#msg16328) and download the serverrules.zip (http://aao25.com/forum/general-chat-90/server-messeseg-question/?action=dlattach;attach=97) file uploaded by Ru$tY.

Open serverrules.cfg from the .zip file (http://aao25.com/forum/general-chat-90/server-messeseg-question/?action=dlattach;attach=97) with such a text editor that would be able to show the file in correct encoding format, guess basic Notepad would work in Windows, TextWrangler (http://www.barebones.com/products/textwrangler/download.html) works for Mac users. Linux nerds are able to find themselves the program what to use :P

As you can see from the file, server messages will be posted with pb_sv_task [time1] [time2] say command. [time1] is just an order number in which order will the messages be shown. Note that it'll go from the highest value to the smallest one, it kind of prints the message upside down. TIME2 is the frequency in seconds that the message repeats (http://aao25.com/forum/general-chat-90/server-messeseg-question/msg16292/#msg16292), like -[sVs]-Beamer is saying at other thread.

Correct encoding of the file seems to western. If you mess up the encoding, those colour codes provided by Ru$tY. at the end of his serverrules.cfg file wont work.

Note that in Ru$tY.'s post they have differently named files, I'm not sure would it still work like they were guiding back in 2012, but nowadays system/pb/servermessage.cfg file is the one that will be shown in console as a scrolling message once it's placed into system/pb/ folder.

So once you have downloaded the .zip file (http://aao25.com/forum/general-chat-90/server-messeseg-question/?action=dlattach;attach=97) uploaded by Ru$tY. just edit the content of his serverrules.cfg the way you want and change the colours how you'd like them to be. When you're done, don't just save the file straight away, use Save As feature to be sure you save it in correct encoding format. Also you need to rename the file, so save it as servermessage.cfg.

When you have created new servermessage.cfg file in correct encoding format (western), go to your server administration / game panel, or navigate to the correct folder via ftp or locally if you're using home server, have a look into system/pb folder if servermessage.cfg file exists, if it does then delete it. When there's no such a file at the folder anymore just upload your recently created servermessage.cfg to the system/pb folder and when it's there, restart your server to get your changes to work.

If you edit the servermessage.cfg file via web browser, where content of servermessage.cfg is opened inside of textarea to be able to edit it, submitting the edit form will change the encoding of the file to UTF-8 and colours wont work anymore. Also when you open western encoded file in web form you wont see the content correctly since the web form doesn't understand such encoding as western.

All the credits goes to Ru$tY. (http://aao25.com/forum/profile/?u=387) who took time to solve this back in the days.
Title: Re: Handling Server Messages
Post by: -Vegeta- on Sunday, March 12, 2017, 13:07:20 PM
Thanks Roski
Title: Re: Handling Server Messages
Post by: ronski on Monday, March 13, 2017, 17:35:13 PM
Thanks Roski
Np Vegta