Server side messages
Server side messages
Hi,
I see that on servers hosted on BE or or others as well, sometimes the server sends out a message a regular intervals, with announcements for events or scheduled maintenance and other stuff. Currently i'm hosting a couple of servers on a raspberry pi and i'm trying to figure out how i can make this work for myself. I really have no clue, searched on the interwebs, but with no avail. The only thing I found was the "puke" command, but that relates to scrips within the wad itself. Some help or at least a clue where to look would be very much appreciated.
I see that on servers hosted on BE or or others as well, sometimes the server sends out a message a regular intervals, with announcements for events or scheduled maintenance and other stuff. Currently i'm hosting a couple of servers on a raspberry pi and i'm trying to figure out how i can make this work for myself. I really have no clue, searched on the interwebs, but with no avail. The only thing I found was the "puke" command, but that relates to scrips within the wad itself. Some help or at least a clue where to look would be very much appreciated.
- DevilHunter
- Zandronum Tester
- Posts: 635
- Joined: Sun Jun 17, 2012 12:58 am
- Location: Alaska, USA
- Contact:
Re: Server side messages
Those messages are hardcoded into BestBot's source far as I know. There was this other mod way back when... (maybe in the skulltag era?) where it would have random MOTD's popup on the Screen. And.. I think it was either Merc's 1.9 or SST that had similer messages show up, but I have no clue how that works.
I'm sure someone else here has a way of doing it. OR... you could just deploy the bestbot onto your Server, but that would require having a website, HD space for wads/configs, MySQL exp, and whatnot...
I'm sure someone else here has a way of doing it. OR... you could just deploy the bestbot onto your Server, but that would require having a website, HD space for wads/configs, MySQL exp, and whatnot...
Re: Server side messages
Can't you access those server with rcon through automated commandline or similar? That would be the easier option I think. I don't use rcon or commandline commands, so I don't really know much about this, and it also depends on the OS of your RasPI how you are supposed to achieve this.
Some kind of commandline script that runs indefinitely until you terminate it that spits out a message to a server through rcon is my best bet.
Some kind of commandline script that runs indefinitely until you terminate it that spits out a message to a server through rcon is my best bet.
- Sean
- IRC Operator
- Posts: 982
- Joined: Thu Jan 16, 2014 9:09 pm
- Location: United Kingdom
- Clan: Zandronum
- Clan Tag: [Za]
- Contact:
Re: Server side messages
You could make an alias, using the wait command:
126000 = 35 * 60 * 60 (an hour)
Code: Select all
alias globalmsg "wait 126000; say This is a global message; globalmsg"; globalmsg
<capodecima> i dont say any more word without my loyer jenova
Re: Server side messages
Hi, thank you for your suggestions.
The option that sean proposes seems to be the better/easier one to use for my purposes. I got it working, but i only tested it on the client side (when joining my own server that is). I dont even need rcon to do it. But it does not fit my purposes entirely....
To refine it and make it more general i have to get it automatically running at startup of a new server. It should become a server-side thingy. So the following questions arise:
- where do i define this "alias"? Would that be in ./.zandronum/zandronum.ini or do i put it in a .cfg file?
- how do i execute the command at startup (as commandline parameter or do i put it in some exec.cfg file)?
Good you explained the timer mechanic as well....
And to be complete: i run my servers on a raspberry pi, with raspbian. The server version of zandronum (2.1.2) has been compiled by a friend and he sent me the binary. I start a server by running a small shell script that contains all necessary information (iwads, pwads, flags, map rotation). I have such script basically for each pwad i host (250+ and counting). I know it is a bit of a hassle, but i'm looking for better solutions for this as well (i do everything via cmdline, since that graphical gui is a bit too heavy to work with remotely and is consumes too much valuable resources, better spent for my doom servers :)).
the scripts look a bit like this:
The option that sean proposes seems to be the better/easier one to use for my purposes. I got it working, but i only tested it on the client side (when joining my own server that is). I dont even need rcon to do it. But it does not fit my purposes entirely....
To refine it and make it more general i have to get it automatically running at startup of a new server. It should become a server-side thingy. So the following questions arise:
- where do i define this "alias"? Would that be in ./.zandronum/zandronum.ini or do i put it in a .cfg file?
- how do i execute the command at startup (as commandline parameter or do i put it in some exec.cfg file)?
Good you explained the timer mechanic as well....
And to be complete: i run my servers on a raspberry pi, with raspbian. The server version of zandronum (2.1.2) has been compiled by a friend and he sent me the binary. I start a server by running a small shell script that contains all necessary information (iwads, pwads, flags, map rotation). I have such script basically for each pwad i host (250+ and counting). I know it is a bit of a hassle, but i'm looking for better solutions for this as well (i do everything via cmdline, since that graphical gui is a bit too heavy to work with remotely and is consumes too much valuable resources, better spent for my doom servers :)).
the scripts look a bit like this:
Code: Select all
#!/bin/bash
/home/pi/doom/zandronum-server \
-iwad /home/pi/doom/iwads/doom2.wad \
...other params....
+sv_maxplayers 8 \
+dmflags 3227652 \
+dmflags2 8388608 \
+zadmflags 16 \
&
- doomista
- Forum Regular
- Posts: 147
- Joined: Sat Mar 07, 2015 6:58 pm
- Location: I've been to hell. Twice
Re: Server side messages
I didn't even realize there's is such thing as server zandro, I am hosting homeserver from the regular executable. Anyways, I do server setup from the script too (win10, batch). Basically the script asks three questions: what the gamemode will be, what the mappack will be and what the weapon mod will be. Since I have around 30 wads to choose about, it's pretty well manageable. But the point is: choosing a gamemode points me to a specifig config and choosing a pwad points me to a specific config. These two are then merged to a special temp config which is then loaded to the zandro. I find this pretty convenient as I have files with small number of lines which can be easily altered and I also don't have to care about all possible combinations since I am merging config files into a very unique mix.grrfield wrote: And to be complete: i run my servers on a raspberry pi, with raspbian. The server version of zandronum (2.1.2) has been compiled by a friend and he sent me the binary. I start a server by running a small shell script that contains all necessary information (iwads, pwads, flags, map rotation). I have such script basically for each pwad i host (250+ and counting). I know it is a bit of a hassle, but i'm looking for better solutions for this as well (i do everything via cmdline, since that graphical gui is a bit too heavy to work with remotely and is consumes too much valuable resources, better spent for my doom servers :)).
If you restart your server on a daily basis (you probably don't, but it can't hurt, so why not), you can set your motd in the config via script. Since you can take advantage of bash and arrays, it would be pretty easy.
EDIT: Hope you have bash on raspbian. I am not a linux user nor it's fan, I have bash in form of cygwin because of college so I don't have any idea what kind of unix/linux raspbian is
Re: Server side messages
It took me some time to get it working, but this does the trick (after successfull RCON login that is):
I guess i just have to create an alias in my ini-file to get it working and by calling an exec.cfg or so, or can i have it in my cfg as well?
Code: Select all
RCON alias globalmsg "wait 10000;say Visit http://grrfield.duckdns.org; globalmsg"; rcon globalmsg
- Sean
- IRC Operator
- Posts: 982
- Joined: Thu Jan 16, 2014 9:09 pm
- Location: United Kingdom
- Clan: Zandronum
- Clan Tag: [Za]
- Contact:
Re: Server side messages
You can have it in your config.
<capodecima> i dont say any more word without my loyer jenova
Re: Server side messages
Well guys,
thanks for helping me out on that one. Still have to test and tweak some more thoroughly, but i'll get there.
Two more questions though:
- can the "wait" command cause lag to other players (someone was complaining about it). Remember that a Pi is not a real workhorse....
- that "wait" command seems not not work "regular". I mean that the interval sometimes seem to vary noticeable....
thanks
thanks for helping me out on that one. Still have to test and tweak some more thoroughly, but i'll get there.
Two more questions though:
- can the "wait" command cause lag to other players (someone was complaining about it). Remember that a Pi is not a real workhorse....
- that "wait" command seems not not work "regular". I mean that the interval sometimes seem to vary noticeable....
thanks
- Sean
- IRC Operator
- Posts: 982
- Joined: Thu Jan 16, 2014 9:09 pm
- Location: United Kingdom
- Clan: Zandronum
- Clan Tag: [Za]
- Contact:
Re: Server side messages
Nogrrfield wrote: - can the "wait" command cause lag to other players (someone was complaining about it). Remember that a Pi is not a real workhorse....
IIRC there's a bug that makes the wait command wait for twice as long as the value specified.grrfield wrote: - that "wait" command seems not not work "regular". I mean that the interval sometimes seem to vary noticeable....
<capodecima> i dont say any more word without my loyer jenova