|
|
|
Administrator 1265 posts
Registered: Jan 2006
So i was browsing http://qtv.atrophied.co.uk/serversI noticed that there's few ports there - there are lots of servers missing. This happens because qtv server admins must add the qw servers manually to their qtv.cfg file. something like 123.412.123.421:27500 123.412.123.421:27501 123.412.123.421:27502 (...) This is a manual task - every time there's new servers, admin must change the qtv.cfg file for the new servers to the streamed to the qtv. So I though: we should automate this. something simple that would work We have in quakeservers.net a bunch of archives who get automatically updated. These archives can be used... for example, this one has the north america servers: http://www.quakeservers.net/lists/north_america/servers.txtand there are more archives. So the thing is:Someone with bash skills, do a simple bash script that would retrieve the list of servers from the internet, extract the serverip:port and put it on qtv.cfg Later we could put this script in cron, daily. Challenges: We cannot simply append the servers to the qtv.cfg, as they will be repeated. Solution: we could create a folder with old qtv.cfg's for backup purposes. or maybe even better: backup the first time (the original qtv.cfg) and do not backup any longer. Suggestions are welcome. Its quite simple really. Qtv server admins could execute this script and put it on cron, and have their qtv updated with the newer servers automatically. The file to retrieve from the internet should be configurable. who with the skills is willing to do this? never argue with an idiot. they'll bring you back to their level and then beat you with experience.
Administrator 114 posts
Registered: Sep 2013
mushi, paste/send example qtv.cfg to me please (full one, above exaple is not enough).
Administrator 1265 posts
Registered: Jan 2006
i know, i tried to get one but where i am now i cant connect to ssh... everything is blocked
edit: d22 is making the script already never argue with an idiot. they'll bring you back to their level and then beat you with experience.
Administrator 114 posts
Registered: Sep 2013
https://github.com/d2-d2/qtvcfg ;-)
Member 344 posts
Registered: Nov 2006
I thought something like this would do the trick (cat qtv.skel; curl -s http://www.quakeservers.net/lists/north_america/servers.txt http://www.quakeservers.net/lists/south_america/servers.txt | cut -f 1 | sort | uniq) > qtv.cfg
Member 258 posts
Registered: Feb 2006
Please note:
- QuakeServers.net lists contain servers that do not stream MVD (QWfwd, Qizmo etc.) - Some servers don't have same stream port and port to which QW clients connect (which is displayed on lists) - Some servers have qtv_password enabled
It's pointless and waste of resources trying to connect to these servers. It might be also considered rude by some admins when unknown QTVs try to connect constantly to their servers. It might piss someone off and cause abuse emails to your ISP.
Administrator 114 posts
Registered: Sep 2013
@mushi: check out new version at github
Administrator 1025 posts
Registered: Apr 2006
Please de-bashify it, there's absolutely no need to enforce bash on such a simple task. I don't run bash on my systems, and neither does a lot of other people after the latest Shellshock incident. Some tips for you d2: wget -q ${UPDATEURL} -O /tmp/servers.txt if [[ ${?} != 0 ]]; then echo ... fi
Could just be turned into: wget -q ${UPDATEURL} -O /tmp/servers.txt || echo "Something went wrong"
or if you want several things to be executed it's possible to just: wget -q ${UPDATEURL} -O /tmp/servers.txt || { echo "Something went wrong" exit 1 }
Administrator 114 posts
Registered: Sep 2013
dimman:
1. "Please de-bashify it" - nah, bash is everywhere whether you like it or not. Patched one, fully functional and safe. Following your logic you should probably get rid of sudo, passwd, apache, nginx and couple of others to 'be safe'.
2. about other things - sure, plenty of them could be rewritten, giving absolutely no better performance, but just saving few bytes. Unless they are functional or logic fixes I'm really not interested in putting them into that script. I know shell-scripting. You too. Point taken ;-)
Administrator 1025 posts
Registered: Apr 2006
1. "Please de-bashify it" - nah, bash is everywhere whether you like it or not. Patched one, fully functional and safe. I don't use bash, neither does a lot of other people. People tend to confuse bash will shell scripting, thinking that "scripts are bash". Bash is bloat and provides nothing useful in this case. Following your logic you should probably get rid of sudo, passwd, apache, nginx and couple of others to 'be safe'.
Then you got it wrong. Shellshock was just the final push, I've been using zsh for several years. 2. about other things - sure, plenty of them could be rewritten, giving absolutely no better performance, but just saving few bytes. Unless they are functional or logic fixes I'm really not interested in putting them into that script. I know shell-scripting. You too. Point taken ;-)
You do whatever you want with your stuff of course. Doing things properly and correctly is how I want stuff, having an open mind doesn't hurt.
Administrator 1025 posts
Registered: Apr 2006
Please note:
- QuakeServers.net lists contain servers that do not stream MVD (QWfwd, Qizmo etc.) - Some servers don't have same stream port and port to which QW clients connect (which is displayed on lists) - Some servers have qtv_password enabled
It's pointless and waste of resources trying to connect to these servers. It might be also considered rude by some admins when unknown QTVs try to connect constantly to their servers. It might piss someone off and cause abuse emails to your ISP. I also have to agree with mli. The purpose of the eztv/qtv solution was to have _one_ QTV connected to each server so that the server host would save bandwidth. Now if there's a lot of QTV servers connecting to the server, it loses its purpose (which is that it's the QTV server that streams to client, not the server).
Administrator 114 posts
Registered: Sep 2013
1. "Please de-bashify it" - nah, bash is everywhere whether you like it or not. Patched one, fully functional and safe. I don't use bash, neither does a lot of other people. People tend to confuse bash will shell scripting, thinking that "scripts are bash". Bash is bloat and provides nothing useful in this case. Following your logic you should probably get rid of sudo, passwd, apache, nginx and couple of others to 'be safe'.
Then you got it wrong. Shellshock was just the final push, I've been using zsh for several years. 2. about other things - sure, plenty of them could be rewritten, giving absolutely no better performance, but just saving few bytes. Unless they are functional or logic fixes I'm really not interested in putting them into that script. I know shell-scripting. You too. Point taken ;-)
You do whatever you want with your stuff of course. Doing things properly and correctly is how I want stuff, having an open mind doesn't hurt. You are absolutely right :-) In the meantime, v0.4 emerged. Check it out ;-) Please note:
- QuakeServers.net lists contain servers that do not stream MVD (QWfwd, Qizmo etc.) - Some servers don't have same stream port and port to which QW clients connect (which is displayed on lists) - Some servers have qtv_password enabled
It's pointless and waste of resources trying to connect to these servers. It might be also considered rude by some admins when unknown QTVs try to connect constantly to their servers. It might piss someone off and cause abuse emails to your ISP. I also have to agree with mli. The purpose of the eztv/qtv solution was to have _one_ QTV connected to each server so that the server host would save bandwidth. Now if there's a lot of QTV servers connecting to the server, it loses its purpose (which is that it's the QTV server that streams to client, not the server). I would agree with such approach in ideal situation where there is no latency in the network and one QTV is enough to handle requests. It's not that simple at the moment and we all know that different routes give us different results. So is for QTV - it's not particularly good at buffering and we all see fast-forward games when too many people are connected or packets are travelling through too many hops. So I think having few QTV servers could help somehow to see fluent mvd streamings. QW community is 'hermetic'. Maybe a good idea would be to divde existing QW estate into geo-regions and setup QTV servers to have as low latency as possible on decent servers to handle dozens of users? Kind of CDN network, but on the smaller scale.
Administrator 1265 posts
Registered: Jan 2006
Allow me to further describe what i was thinking when i asked for this script. The goal here is to have every qw server (excluding proxies ofc) linked to one qtv - not necessarily the same qtv. So you can visit http://qtv.quakeworld.nu and see whats going on in the world of qw servers, to observe or see demos. The script d2 made is nice: it retrieves a user-chosen server list from quakeservers.net, excludes some servers, pings them, and finally adds them to qtv.cfg. It also has an option to cron the script, so the qtv streams new servers automatically. The script is not to be used on every qtv. This is to be used on specific qtv's: So here's what i've thinked: setup qtv servers by localization Geo-defined:USA: have one qtv server there with all the servers from North AmericaBRAZIL: have one qtv server there with all the servers from South AmericaEurope: have one qtv server there with all the servers from Europe (or maybe 2 or 3 because of the quantity of games played) Australia: have one qtv server there with all the servers from Asia Pacific and AustraliaI also thinked about distinguishing qtv servers from DM from TF. Maybe thats useful, especially with the new Classic Fortress coming in. We don't want the same qwserver to be include in more than one qtv. we will try to avoid that. Server admins: DO NOT use this script in your own qtv unless you are asked to. I will contact some server admins in those locations to ask them to use the script for their locations. never argue with an idiot. they'll bring you back to their level and then beat you with experience.
Administrator 114 posts
Registered: Sep 2013
Hi mushi, would that be helpful if I make a mod to that script to exclude servers with ping less than X [ms], where X is defined by user?
Administrator 1265 posts
Registered: Jan 2006
Hi mushi, would that be helpful if I make a mod to that script to exclude servers with ping less than X [ms], where X is defined by user? don't think so. still poking with this, no time yet to do it. never argue with an idiot. they'll bring you back to their level and then beat you with experience.
|
|
|
|