I can't compile a Windows version since my computer is a bit outdated. Thanks to Happy Tanker for providing SSH and letting me do everything for this plugin on his computer.ResetServerWhenEmpty
by Theme97, 03/26/06
The plugin idea is very simple. You can toggle an RSWE (Restart Server When Empty) with a simple
/rswe command. You MUST have a repeating batch/shell for an automatic restart.
/rswe on
/rswe off
/rswe toggle
/rswe status
In order to use the first 3 commands, you must have the RSWE perm. In order to use /rswe status,
you need the RSWESTATUS perm.
When loading the plugin, you can also use a parameter called "noTimer". The plugin works by
checking every _rejoinTime seconds to see if there are any players. If there are no players, the
server sends a message in case there are observers and shuts down. The plugin relies on a repeating
batch or shell to start up the server. If noTimer is enabled, the plugin checks for players every
time somebody leaves.
v1.0: Plugin created. Not going in Plug-in Releases quite yet. Not very sure if noTimer works.
ResetServerWhenEmpty plugin
ResetServerWhenEmpty plugin
From the README:
- Attachments
-
- RSWE_linux.zip
- Linux version.
- (6.41 KiB) Downloaded 276 times
-
- RSWE_source.zip
- Source.
- (10.47 KiB) Downloaded 269 times
- A Meteorite
- Private First Class
- Posts: 1786
- Joined: Thu Apr 28, 2005 12:56 am
- Location: California, U.S.
- Contact:
Wonderfull! Just what I needed!
OK, slightly related: any good repeating shell scripts?
OK, slightly related: any good repeating shell scripts?
Owner @ BZFX
Core Admin @ CAN
Email me: bzmet…@gmail.com
I can give you the IKCTF repeating shell script soon.
Edit: I put this in plug-in development because I'm not quite sure everything works. The server used to segfault everytime I had a bz_ePlayerPartEvent. I also am not sure if the timer works and if "noTimer" works too. Can someone please go through rigorous testing?
Edit 2: Can someone compile a Windows version too? Thanks.
Edit 3: Got it. This is the one Happy Tanker uses:
Run_Theme97_Map.sh
Single_Server_Instance.sh
Edit: I put this in plug-in development because I'm not quite sure everything works. The server used to segfault everytime I had a bz_ePlayerPartEvent. I also am not sure if the timer works and if "noTimer" works too. Can someone please go through rigorous testing?
Edit 2: Can someone compile a Windows version too? Thanks.
Edit 3: Got it. This is the one Happy Tanker uses:
Run_Theme97_Map.sh
Code: Select all
while [ 1 ]
do
#Open a server instance
./Single_Server_Instance.sh
done
Code: Select all
bzfs -conf Conf >> Logs
1. I think you might have to ask a temporal distraction for that.
2. AFAIK, these two shells should work:
RunServer.sh
A different RunServer.sh
2. AFAIK, these two shells should work:
RunServer.sh
Code: Select all
bzfs -conf Conf >> Logs
./RunServer.sh
Code: Select all
while [ 1 ]
do
bzfs -conf Conf >> Logs
done
Last edited by Theme97 on Tue Mar 28, 2006 11:52 pm, edited 1 time in total.
You can run off the .sh? my plugins went to usr/local/lib/pluginnamehere.so and i run off those successfully.Theme97 wrote:1. I think you might have to ask a temporal distraction for that.
2. AFAIK, these two shells should work:
RunServer.shCode: Select all
bzfs -conf Conf >> Logs sh RunServer.sh