1up Clan Forums

Discussions => Admin Announcements => Site News => Topic started by: RonaldLee[1up] on January 22, 2010, 10:52:59 AM

Title: 1up Gadget (Sidebar Server Monitor) [official release]
Post by: RonaldLee[1up] on January 22, 2010, 10:52:59 AM
1up Sidebar Gadget created by SNKMFER[1up].
The 1up Sidebar Gadget is designed to monitor 1up servers. In addition to monitoring servers, it can also take you directly to the official "Join 1up" Application and start your Urban Terror up to play. Just click on a server and a window will open quickly to show who is playing. See the example below:

(http://1upclan.info/public/upload/projects/1up_sidebar_gadget/sidebar_ss.jpg)

Downloads
Full Size: http://1upclan.info/public/download.php?id=5222 (http://1upclan.info/public/download.php?id=5222)
(the standard, sit-on-your-desktop app).

Mini Size: http://1upclan.info/public/download.php?id=5221 (http://1upclan.info/public/download.php?id=5221)
(a shrunk down window initially created for Dj_Laidas[1up])

Urban Terror Launcher
Read the "Settings/About" page which gives instructions on setting up the Urban Terror quick launch.
Title: Re: 1up Gadget (Sidebar Server Monitor) [official release]
Post by: GoogleIt on January 22, 2010, 12:13:00 PM
sweeeeeet. Go Luke!
Title: Re: 1up Gadget (Sidebar Server Monitor) [official release]
Post by: dj_laidas on January 22, 2010, 01:48:34 PM
1up Sidebar Gadget created by SNKMFER[1up].
]
(a shrunk down window initially created for Dj_Laidas[1up])

Thanx a lot.....

Now that is awsome...Thanx again...
its now very usufull 2 me.....
Title: Re: 1up Gadget (Sidebar Server Monitor) [official release]
Post by: GoogleIt on January 22, 2010, 01:49:07 PM
This is probably a stupid question, but it only works with Windows 7 right?
Title: Re: 1up Gadget (Sidebar Server Monitor) [official release]
Post by: FedoraMike on January 22, 2010, 02:03:28 PM
Pretty cool stuff, but I'll stick with xfire since if pretty much does the same thing as a server browser :)
Title: Re: 1up Gadget (Sidebar Server Monitor) [official release]
Post by: Tesla[1up] on January 22, 2010, 03:01:30 PM
Looks good MFer, glad to see you got it working without to much hassle.

Tesla[1up]
Title: Re: 1up Gadget (Sidebar Server Monitor) [official release]
Post by: SNK_MFER on January 22, 2010, 03:53:36 PM
Should work with Vista as well. And I believe Ron has a version of XP it will work with.
Title: Re: 1up Gadget (Sidebar Server Monitor) [official release]
Post by: GoogleIt on January 22, 2010, 04:44:36 PM
Should work with Vista as well. And I believe Ron has a version of XP it will work with.

I would very much like to get that from you Ron. :D
Title: Re: 1up Gadget (Sidebar Server Monitor) [official release]
Post by: FedoraMike on January 22, 2010, 04:52:53 PM
Should work with Vista as well. And I believe Ron has a version of XP it will work with.

I would very much like to get that from you Ron. :D

I think Ron and I run the same version of XP (since he showed it to me a while ago), Windows XP Ultimate by Johnny... You can find the torrent download here at www.winxpu.info (http://www.winxpu.info) (it can take forever to dl though)  I could arrange to send you a disk in the mail if need be, let me know :)
Title: Re: 1up Gadget (Sidebar Server Monitor) [official release]
Post by: GoogleIt on January 22, 2010, 05:08:06 PM
Should work with Vista as well. And I believe Ron has a version of XP it will work with.

I would very much like to get that from you Ron. :D

I think Ron and I run the same version of XP (since he showed it to me a while ago), Windows XP Ultimate by Johnny... You can find the torrent download here at www.winxpu.info (http://www.winxpu.info) (it can take forever to dl though)  I could arrange to send you a disk in the mail if need be, let me know :)

I'm dling it. Thanks FMike.
Title: Re: 1up Gadget (Sidebar Server Monitor) [official release]
Post by: RonaldLee[1up] on January 23, 2010, 03:53:41 PM
This thing works great. I like that when I click on a server, the window opens in about 1 second. No more waiting of a web-browser to load to view information about servers and see who is playing.
Title: Re: 1up Gadget (Sidebar Server Monitor) [official release]
Post by: dj_laidas on January 23, 2010, 11:12:43 PM
Ok ill have to say that in the mini gadged the lanch game play icon doent do anything..
it work on the big gadget fine but not on mini.....

can we fix it in the next version with the new name of domination?>??
Title: Re: 1up Gadget (Sidebar Server Monitor) [official release]
Post by: SNK_MFER on January 23, 2010, 11:57:20 PM
yeah of course, I'll check that out now (to be honest I didn't fully test the mini since most of the code is the exact same from the full version)
Title: Re: 1up Gadget (Sidebar Server Monitor) [official release]
Post by: Shans on January 25, 2010, 12:13:39 AM
Looks cool.. nice desktop too btw xD
Title: Re: 1up Gadget (Sidebar Server Monitor) [official release]
Post by: Disease on February 08, 2010, 10:33:16 AM
I'm gonna guess it's NOT available for Mac users? :(
Title: Re: 1up Gadget (Sidebar Server Monitor) [official release]
Post by: Cuomo on April 03, 2010, 10:07:15 PM
so only works with xp if you have ultimate? i have xp performance, i dulled out xp with nothing cept what you needz
Title: Re: 1up Gadget (Sidebar Server Monitor) [official release]
Post by: Bliz on August 26, 2010, 05:16:18 AM
Well since It was not Windows XP compatible  unless you installed a new ultimate OS... I went to Google :P
it is basically vista sidebar but for Windows XP and works fine
pretty self explanatory
oh and great job I love it :)


http://joshoon.deviantart.com/art/Windows-Sidebar-Real-one-Pack-75626472 (http://joshoon.deviantart.com/art/Windows-Sidebar-Real-one-Pack-75626472)


Screenie (yes it is win xp I have modified theme)
(http://i34.tinypic.com/e7cepw.jpg)
Title: Re: 1up Gadget (Sidebar Server Monitor) [official release]
Post by: RonaldLee[1up] on August 26, 2010, 08:20:22 AM
The gadget needs to be updated now because many servers have changed names, we have added some servers, and our "Join 1up" button points to a direct application instead of a forum post per se.
Title: Re: 1up Gadget (Sidebar Server Monitor) [official release]
Post by: Bliz on August 26, 2010, 04:14:47 PM
http://tinyurl.com/1up-edit (http://tinyurl.com/1up-edit)
except join 1up doesn't work unless you are signed in.. if not it takes you to the 1upclan.info/forums page
fixed :)
Title: Re: 1up Gadget (Sidebar Server Monitor) [official release]
Post by: KD197 on August 26, 2010, 04:36:03 PM
I'd be interested in the information that is used to generate the site's stat pages - I've kinda got a hacky CLI server monitor going but it relies on fetching the webpages, taking the relevant sections and stripping the HTML, and it's kinda difficult to get nice formatting. So if there is an alternative way of fetching this info I'd be interested.
Title: Re: 1up Gadget (Sidebar Server Monitor) [official release]
Post by: Bliz on August 26, 2010, 04:55:46 PM
I think this is just doing it with iframes displaying the page on the forums xD
Title: Re: 1up Gadget (Sidebar Server Monitor) [official release]
Post by: Bliz on August 28, 2010, 02:21:47 PM
A lot of changes
The urt images run urbanterror and connect to the server there next to and the 1up RCON thing runs 1up ModRcon program
(http://i37.tinypic.com/kc1ph5.png)

Download :
http://tinyurl.com/1up-edit-2 (http://tinyurl.com/1up-edit-2)
Title: Re: 1up Gadget (Sidebar Server Monitor) [official release]
Post by: Pyrite[1up] on August 28, 2010, 03:46:14 PM
I'll probably deploy the new Java ModRcon via Java Web Start, so the link in the sidebar gadget will have to change eventually, but that's way down the road. Nice work!
Title: Re: 1up Gadget (Sidebar Server Monitor) [official release]
Post by: KD197 on August 28, 2010, 09:37:25 PM
I was wondering if there was any other way to access the server stats other than pulling in the webpages?
I've got a terminal script that gets all the info from the server pages but it's pretty hacky to look at the script itself... ie what I'm after is the source from which the server stats pages are generated, because if the HTML is changed, the script fails.
Haven't worked on the "launch game into server" thing but according to Bliz it's a simple command, everything else is working just fine. It's not shiny like the official gadget, but it's a terminal app, the best it can offer is colour :P I <3 terminals though hence why I made this. I might see if I can do a player name search as well, but I don't know if I've got the skills to do that, I'm a coding noob.

EDIT: SEARCH FUNCTION! WOOOO! \o/ It's case-insensitive but doesn't seem to like special characters but it works on partial match.
EDIT 2: Now it can also launch straight in to the servers, with cpufrequtils and secondary X server.
I'll test it a bit for a few days to make sure I haven't stuffed something up... I'd still prefer another method of getting the info, like XML or something, so if any of the devs wanna comment on if there is such a resource, I'd re-write the script to work with that instead; parsing HTML is hacky and I don't like it.  >:(
(http://kazeshima.net/images/1ups_search.png)
Title: Re: 1up Gadget (Sidebar Server Monitor) [official release]
Post by: KD197 on August 29, 2010, 06:53:44 PM
Trying to get this working on Mac for Dougy, tried using curl instead of wget and it's near-instantaneous. Player search takes less than a second now... it was 4s for each server, then I set them up to run simultaneously and it took ~6s.
For some reason it won't work in Dougy's terminal, it's throwing weird errors that seem to regard to fonts  :P

Quote
/Users/jjjj/1ups_mac: line 1: {rtf1macansicpg10000cocoartf824cocoasubrtf480: command not found
/Users/jjjj/1ups_mac: line 2: syntax error near unexpected token `}'
/Users/jjjj/1ups_mac: line 2: `{\fonttbl\f0\fmodern\fcharset77 Courier;}'
There isn't even a "}" on line 2 XD

Any Mac people wanna try it? Dougy's is a PPC... I dunno if that makes a difference. Are there even any Linux people here?!
Title: Re: 1up Gadget (Sidebar Server Monitor) [official release]
Post by: Pyrite[1up] on August 29, 2010, 06:55:38 PM
I have Linux and PowerPC based Macs, I can help.
Title: Re: 1up Gadget (Sidebar Server Monitor) [official release]
Post by: Pyrite[1up] on August 29, 2010, 07:58:19 PM
This is on my PPC based Mac, running OS 10.2 and bash 2.05a.

The output of uname -a is:

Darwin dumbledore 6.8 Darwin Kernel Version 6.8: Wed Sep 10 15:20:55 PDT 2003; root:xnu/xnu-344.49.obj~2/RELEASE_PPC  Power Macintosh powerpc

The output of sw_vers is:

ProductName:   Mac OS X
ProductVersion:   10.2.8
BuildVersion:   6R73

Seems to work fine, except when querying the server portions (second screenshot).

[attachment no longer available]
Title: Re: 1up Gadget (Sidebar Server Monitor) [official release]
Post by: Bliz on August 30, 2010, 12:32:57 AM
I really have no idea how to code in any language :) I just looked at the files that came with the first server monitor and then added duplicated trouble shot and finally got it that took me 15 hours a person who knew simple java script/xml could have probably done it in about 2 minutes. xD
Title: Re: 1up Gadget (Sidebar Server Monitor) [official release]
Post by: KD197 on August 30, 2010, 06:23:41 AM
Thanks Pyrite, the screen shots make it easier to understand what I'm dealing with.
I found out why Pidgin was showing you as offline - the damn thing had frozen >:( Had to kill -9 it.

Anyways, from what I can ascertain from Google, the issue with tab spacing is that the version of BSD sed shipped with Macs has a bug whereby \t is not interpreted properly. I found in a forum post that someone "upgraded" sed via a program called Fink http://www.finkproject.org/ (http://www.finkproject.org/), and running "fink install sed" or something like that. A quick glance at the site and a check in the repository, all it's doing is installing GNU sed. What I might try first is replacing \t with an actual tab, as suggested elsewhere on various Mac forums, as the only other way to get it to interpret \t is to wrap it in single quotes. (I wonder how GNU sed will play with that :P)

As for the colour issue, the difference between the server stats output and the Vent title output for example, is that the colour escape codes are inserted into the stream via sed, whereas in the areas it works it's being added after a "echo -e" which enables interpretation of backslash escapes. I'm not entirely sure what is to blame for this difference if the shells are the same - although I did notice your terminal window says "tcsh" not bash. :|

Either way, I think rather than trying to manipulate the whole file in one go and spitting out the output, what I'll do is read the info into vars, then "echo -e" them back with colour escape codes. All with nice tab indentation of course! ;) Oh yeah and thanks for the links to the mods and vent data, I'll replace that too.

Looked at some Java stuff... I have no idea how proper programming languages work  ???
Title: Re: 1up Gadget (Sidebar Server Monitor) [official release]
Post by: Tesla[1up] on September 04, 2010, 03:23:56 AM
I do not understand why either of you are not using the getstatus command to get the info you want and format it however you want instead of trying to parse remote php files which puts a strain on our site that is not needed. All the info you need can be obtained using the getstatus command this is how sites like game tracker and others like it work so use the tools that are already available to you instead of making life more difficult for yourselves.

As far as connecting to a server from within an application goes that is extremely simple to do as well, simply call the urt executable with the connect and ip parameters like this (path/to/urt_executable.exe connect  127.0.0.1) you don't even need to supply a port if the server you are connecting to is using the default port (ie 27960) but if it's not then you just add the port after the ip like this (127.0.1.0:55555)

Like I said all of the things your trying to accomplish can be done in much simpler ways so do yourselves a favor and search google for "quake 3 rcon protocol" and you should be good to go once you understand the basics which is extremely easy to do (1 line of code to be exact)

Good Luck,
Tesla[1up]
Title: Re: 1up Gadget (Sidebar Server Monitor) [official release]
Post by: Pyrite[1up] on September 04, 2010, 03:51:38 AM
I do not understand why either of you are not using the getstatus command to get the info you want and format it however you want instead of trying to parse remote php files which puts a strain on our site that is not needed. All the info you need can be obtained using the getstatus command this is how sites like game tracker and others like it work so use the tools that are already available to you instead of making life more difficult for yourselves.

As far as connecting to a server from within an application goes that is extremely simple to do as well, simply call the urt executable with the connect and ip parameters like this (path/to/urt_executable.exe connect  127.0.0.1) you don't even need to supply a port if the server you are connecting to is using the default port (ie 27960) but if it's not then you just add the port after the ip like this (127.0.1.0:55555)

Like I said all of the things your trying to accomplish can be done in much simpler ways so do yourselves a favor and search google for "quake 3 rcon protocol" and you should be good to go once you understand the basics which is extremely easy to do (1 line of code to be exact)

Good Luck,
Tesla[1up]

I already helped him with most of that. The problem is the language of choice he is implementing, as a shell script, I would have no idea how to open sockets in bash script. I told it would be easier to parse the html, but for the vent status and onlinemods, he is pointing it to my server. Oh, and it doesn't put any strain on our server, it's no different than going to the servers page in a web browser yourself, instead, he is using curl, which is basically a command line web browser. The cool thing is, now that he has written this, we can now make a desktop widget for the Mac OSX Dashboard that uses his script as a backend. I think Dougy is going to look into this task.
Title: Re: 1up Gadget (Sidebar Server Monitor) [official release]
Post by: Dougy on September 04, 2010, 05:55:41 AM
To install KD's Lush Script (Non-perfect) but hey it works ;)

Pyrite: http://kazeshima.net/scripts/1ups (http://kazeshima.net/scripts/1ups)
Pyrite: open a terminal
Pyrite: type
Pyrite: curl http://kazeshima.net/scripts/1ups (http://kazeshima.net/scripts/1ups) > 1ups
Pyrite: chmod +x 1ups
Pyrite: ./1ups

They are the Mac Commands I used..................... Thanks Kd for this wonderful app, I would like to know if you would keep working on this as im hoping to make this into a widget to use on mac :D <3 much love KD and wonderful script :D
Title: Re: 1up Gadget (Sidebar Server Monitor) [official release]
Post by: KD197 on September 04, 2010, 09:51:50 AM
Sorry Tesla, like Pyrite said, I did ask about direct info from the server after Googling for "query urban terror server stats" returned nothing of use.
Curl only fetches the HTML from the page, causing no more load than viewing that page directly. I didn't realise the reason you directed me to HTML was due to language restrictions Pyrite, I've actually dabbled in bash sockets a bit when writing a bash irc client. Do Macs have nc/netcat by default?
I didn't realise my script was going to be used as a backend, I believe there are some simple GUI toolkits for Linux I might be able to use...
Also, the script in it's current state doesn't work well with the Mac versions of the tools I've used, but it's easily fixed. I was going to make this interactive, in the way that you double click a desktop icon and it launches a terminal for you, but I'll hold off on that until I know if Dougy can make a GUI for it.
Title: Re: 1up Gadget (Sidebar Server Monitor) [official release]
Post by: Dougy on September 04, 2010, 10:11:39 AM
Also, the script in it's current state doesn't work well with the Mac versions of the tools I've used, but it's easily fixed. I was going to make this interactive, in the way that you double click a desktop icon and it launches a terminal for you, but I'll hold off on that until I know if Dougy can make a GUI for it.

Bull**** im saying that to you kd the current version works like a dream kd sorry for the profanity but its so F'ing good i could marry your script XD
Title: Re: 1up Gadget (Sidebar Server Monitor) [official release]
Post by: KD197 on September 04, 2010, 12:20:58 PM
That's strange, Pyrite said that it wasn't interpreting newline characters (\n in GNU sed) properly on his system; Macs have BSD sed, which is slightly different. Let me know if you can't get a widget-type thing working and I'll see if I can do anything.
At some point I'd like to see if I can use the getstatus command like Tesla said.
Oh and can a Mac user confirm the status of launching into servers please?

Once I sort out the newline character thing, I think I can speed the player search up again.
Originally it was parallel downloading and parsing, but it caused 32 processes to spawn simultaneously, and this set off the anti-forkbomb restrictions I have on my rig. So I switched to sequential download and parse - the idea is to have parallel downloads and sequential parsing, to speed it back up.
Parallel download and parsing was ~0.65s, sequential download and parse ~3.80s, so I'm hoping the parallel downloads will bring the time down below 3s.
Title: Re: 1up Gadget (Sidebar Server Monitor) [official release]
Post by: Pyrite[1up] on September 04, 2010, 03:15:26 PM
That's strange, Pyrite said that it wasn't interpreting newline characters (\n in GNU sed) properly on his system; Macs have BSD sed, which is slightly different. Let me know if you can't get a widget-type thing working and I'll see if I can do anything.
At some point I'd like to see if I can use the getstatus command like Tesla said.
Oh and can a Mac user confirm the status of launching into servers please?

Once I sort out the newline character thing, I think I can speed the player search up again.
Originally it was parallel downloading and parsing, but it caused 32 processes to spawn simultaneously, and this set off the anti-forkbomb restrictions I have on my rig. So I switched to sequential download and parse - the idea is to have parallel downloads and sequential parsing, to speed it back up.
Parallel download and parsing was ~0.65s, sequential download and parse ~3.80s, so I'm hoping the parallel downloads will bring the time down below 3s.

Oh, and SlimPickins and I agreed, the way you are launching UrT in your script is totally gridbag. I would just specify the path to Urt at the top (put the default), and the user can change it to meet their needs. No need to spawn a separate X session just to run UrT either. You can simply detect if X is running, and if so, run it on that display, otherwise your script can just say "You need to be running X in order to play Urban Terror" or something.
Title: Re: 1up Gadget (Sidebar Server Monitor) [official release]
Post by: Pyrite[1up] on September 04, 2010, 04:02:01 PM
Scratch that, I was able to get it working with 3 lines of bash code (i had no idea you can do sockets in bash).
Code: [Select]
exec 3<>/dev/udp/208.43.15.85/27960
echo -e "\xff\xff\xff\xffgetstatus">&3
cat <&3

:D
Title: Re: 1up Gadget (Sidebar Server Monitor) [official release]
Post by: KD197 on September 04, 2010, 04:10:10 PM
Bash sockets are the win dude. Nice one for working it out, I can get working on it straight away. This should make Tesla happy  8)
Also, the way the game is being launched is like what you're describing - the function "URT" at the top has the path, and is being called later in the script, with the +connect and IP/port info. Unless you meant something else?
Title: Re: 1up Gadget (Sidebar Server Monitor) [official release]
Post by: Dougy on September 04, 2010, 05:09:16 PM
i hacked my sed remember lol :D so.............
Title: Re: 1up Gadget (Sidebar Server Monitor) [official release]
Post by: KD197 on September 04, 2010, 05:11:32 PM
How the hell do you hack sed? You mean you installed GNU sed probably.
Oh and Pyrite, I got the socket redirection working, and stopped it from hanging the script too. ;)
I'll get started with sed tomorrow to parse all the data and make it look nice. :P
Title: Re: 1up Gadget (Sidebar Server Monitor) [official release]
Post by: Dougy on September 04, 2010, 05:27:36 PM
How the hell do you hack sed? You mean you installed GNU sed probably.
Oh and Pyrite, I got the socket redirection working, and stopped it from hanging the script too. ;)
I'll get started with sed tomorrow to parse all the data and make it look nice. :P

No coz you cant install it properly on our macs you have to like rewrite/replace the existing code with the new crappier looking one the tutorial supplies XD so yer in terms that aint hacking its basically following a tutorial............. LOL
Title: Re: 1up Gadget (Sidebar Server Monitor) [official release]
Post by: Pyrite[1up] on September 04, 2010, 05:50:24 PM
I just thought of an idea, we should put our server definitions in a RSS feed, for the Mac OSX Dashboard Widget to use, and also for the Windows Vista/7 Gadget to use, so if we add/change a 1up server, the desktop widgets will be updated automatically.
Title: Re: 1up Gadget (Sidebar Server Monitor) [official release]
Post by: KD197 on September 04, 2010, 06:44:41 PM
Good idea, I dunno what RSS syntax is like as I've never bothered with it but as long as I can parse it, I'm game. If the script is going to use an RSS feed for server IPs, I'd either have to have a switch in the script for the user to update a local file containing the IPs, from which the main script would read every time, or have the RSS downloaded every time it's run. I don't want to use up more bandwidth than necessary, even if its just a few kilobytes. It all adds up.
I guess I could use sed to make the script edit itself lol. But I don't know how that would work in terms of different install locations. The home dir is a good place if it's going to be run directly by the user, whereas somewhere like /usr/bin would be more suitable if it's just going to be a backend.
Title: Re: 1up Gadget (Sidebar Server Monitor) [official release]
Post by: Tesla[1up] on September 04, 2010, 07:16:47 PM
Quote
Shell Script¶

If you are using a Linix/Unix/Solaris/BSD box then you can get the status of the server on the command line.

Rcon Status (password required)

printf '\xFF\xFF\xFF\xFFrcon <PASSWORD> status\n' | nc -u -n -w 1 <SERVER_IP> <SERVER_PORT> | sed -ne ':x;/\xFF/{N;s/\xFF\xFF\xFF\xFFprint\n//;tx};/^$/d;p'

Basic Status (no password required)

printf '\xFF\xFF\xFF\xFFgetstatus\n' | nc -u -n -w 1 <SERVER_IP> <SERVER_PORT>

(Replace <PASSWORD>, <SERVER_IP>, <SERVER_PORT> above with the actual values)

And what I meant by strain on the website is that by using the page grabbing method he was using and only grabbing the info every 5 seconds or so would generate over 123 Gigs of bandwidth per month for just one person and if you multiply that number by just 25% of the clan (actual users who may use the app) then your looking at roughly 1.4 Terabytes of bandwidth per month which to me is a great deal of bandwidth for one application to use in a months time that is all I was saying.

Tesla[1up]
Title: Re: 1up Gadget (Sidebar Server Monitor) [official release]
Post by: KD197 on September 05, 2010, 04:30:10 AM
Whilst I see what you're getting at, that kind of usage model is far from what the script does. It only pulls in the pages when specifically requested, which would be the same as viewing the pages on the site, and the only increased usage comes from the player search, which one could argue is no different from someone looking at all the pages to see if someone is there. Of course, one could argue that the script makes it more convenient, and therefore more likely that people are going to search for players. I see your point, I never wanted to waste bandwidth, but I don't think it'd be anywhere near as bad as you've calculated - no-one is going to run the script every 5 seconds 24 hours a day every day of the month.
But hey, Pyrite and myself worked out how to get the info from the servers directly last night so no worries dude!
Title: Re: 1up Gadget (Sidebar Server Monitor) [official release]
Post by: Pyrite[1up] on September 05, 2010, 05:17:41 AM
Good idea, I dunno what RSS syntax is like as I've never bothered with it but as long as I can parse it, I'm game. If the script is going to use an RSS feed for server IPs, I'd either have to have a switch in the script for the user to update a local file containing the IPs, from which the main script would read every time, or have the RSS downloaded every time it's run. I don't want to use up more bandwidth than necessary, even if its just a few kilobytes. It all adds up.
I guess I could use sed to make the script edit itself lol. But I don't know how that would work in terms of different install locations. The home dir is a good place if it's going to be run directly by the user, whereas somewhere like /usr/bin would be more suitable if it's just going to be a backend.

I was thinking the RSS feed would just have all our servers in it, the widget could pull those in on a button click or with some kind of cache control, then the user could add/edit/remove servers to the database that the widget uses, and the widget would refresh the 1up servers from the RSS feed like once a week or month or something. So it would only pull in the RSS feed upon first running it, and then may be sync it with their own database every week or two or three, so that if we add or change any 1up servers, the changes would distribute down to the desktop widgets automagically. This wouldn't involve any changes to your script though KD197. However, you should modify your script so you can supply an IP address as a parameter to the bash script, like:

./1ups --listplayers 208.43.15.85

etc.
Title: Re: 1up Gadget (Sidebar Server Monitor) [official release]
Post by: KD197 on September 05, 2010, 05:50:13 AM
Automatic updating in a bash script... sounds like fun to code lol. How often have the servers changed in the past?
All I'm thinking of is the the logistics of implementing automatic updating... I suppose I could pipe the month digit into a file on first run, then read from that file every run, compare it to the current month's digit as returned by the "date" program and if it doesn't match, pull the RSS feed and update the file. I was thinking just having a file with lines like:
Code: [Select]
Updated: 09
Icy: 208.43.15.8:27960
Xmas: 208.43.15.89:27960
etc etc, then just cat | grep the file and bob's your uncle 8)
So when "date" returns "10" on the local system and it doesn't match the local file which has "09" it gets the RSS and overwrites this file with the new info.

Also, I've been looking at stuff like xdialog and xmessage (I think xmessage has more options for naming buttons, and I found an OS X manpage for it too.) so I think I need to work out how they work before rewriting the script - if I can get xmessage working, the script will need to be similar to how it is now, as opposed to being more interactive if it's going to run in a terminal; as I said before, if it's going to run in a terminal, it would be nice if the user just had to click a desktop icon and a terminal would open with a prompt asking for an option, and it to continue repeating until the user exits.

Anyone got any thoughts on the value of using xmessage or some other such graphical interface as opposed to just a terminal? I'm biased as I use terminals for most things, so typing a single character to get a ton of info seems trivial to me.
It would certainly be simpler to just use terminal, but I don't want to put people off by not having a GUI if that's what most people want.
Title: Re: 1up Gadget (Sidebar Server Monitor) [official release]
Post by: Pyrite[1up] on September 05, 2010, 06:04:29 AM
What part about "this would not involve any changes to your script" do you not understand?

I was speaking about the dashboard widget/gadget, not your script. Your script is simply the means to supply the data to the widget/gadget, not the other way around.
Title: Re: 1up Gadget (Sidebar Server Monitor) [official release]
Post by: KD197 on September 05, 2010, 06:20:07 AM
Oh I see. Sorry I'm trying to do about 10 things at once here and didn't read it properly :P

I'm still concerned over how this won't work on all platforms... I kinda feel that because I'm unable to do anything that works on all platforms, that I'm doing a half-assed job... And I don't want a 1up server monitor app to look half-assed because I don't want to give people that kind of impression about 1up. I just want everyone to have a nice consistent looking app that functions the same on all platforms, not my hacky piece of s*** excuse for an app. I either need to knuckle down and try and learn some Java or hand this over to someone who actually knows what they're doing.
Title: Re: 1up Gadget (Sidebar Server Monitor) [official release]
Post by: Pyrite[1up] on September 05, 2010, 06:33:20 AM
Oh I see. Sorry I'm trying to do about 10 things at once here and didn't read it properly :P

I'm still concerned over how this won't work on all platforms... I kinda feel that because I'm unable to do anything that works on all platforms, that I'm doing a half-assed job... And I don't want a 1up server monitor app to look half-assed because I don't want to give people that kind of impression about 1up. I just want everyone to have a nice consistent looking app that functions the same on all platforms, not my hacky piece of s*** excuse for an app. I either need to knuckle down and try and learn some Java or hand this over to someone who actually knows what they're doing.

Hey man, it sounds like you don't understand the broad picture of things. Lets talk on vent later and I'll go over my master plan with you, mean time, just implement your script the way you intended it to work in the first place.
Title: Re: 1up Gadget (Sidebar Server Monitor) [official release]
Post by: KD197 on September 05, 2010, 06:37:41 AM
OK dude, I'll be on Vent in a while. Sorry for being such a bother :-[
Title: Re: 1up Gadget (Sidebar Server Monitor) [official release]
Post by: Dougy on September 30, 2010, 10:29:14 PM
PROOF OF KD's 1upST working under bash 3.2

ryan-douglass-power-mac-g4:~ Dougy$ bash
bash-3.2$ /Volumes/Mac\ 1/Users/jjjj/1upST

















Linux/Mac 1up Server Tool

Loading server summary, please wait...





















Linux/Mac 1up Server Tool

Stats:   Join:   Server:         Players:   Map:
i   I   1up Icy Jumps Server   12 / 32      ut4_prague
x   X   1up Xmas Special TDM    6 / 32      q_1upxmas
f   F   1up Free4All Server   12 / 32      ut4_kingdom_rc6
t   T   1up Fun Server TDM    4 / 32      q_1upxmas
c   C   1up CTF Server      12 / 32      ut4_kingdom_rc6
z   Z   1up Zombie Challenge   12 / 32      ut4_prague
j   J   1up Jump Server       6 / 32      ut4_walljumps
s   S   1up SuperTS Server   12 / 32      ut4_prague

Other options:   v for 1up Ventrilo Server User List.
      r for 1up In-Game Server Referees.
      p:playername to search for playername.
         Player search is case insensitive, and works
         with partial match, eg: p:lex will match
         Flexan[1up], alex etc...
      a:ip:port to get stats for any server.
         If you enter an incorrect IP, or that IP is not
         running Urban Terror, an error will be returned.
      m to return to this menu.
      q to quit.

Enter Option:

(http://img691.imageshack.us/img691/7352/picture1aim.png)

Title: Re: 1up Gadget (Sidebar Server Monitor) [official release]
Post by: KD197 on October 01, 2010, 01:47:45 PM
Nice one Dougy! I guess I remembered incorrectly about bash 4 being needed...
Also you've confirmed something I've seen happen on my end - the map names are sometimes wrong on first load. I'm not sure why but I haven't got round to looking into it, I think it's the parallel queries to the server script... I'll probably point it to individual scripts for each server and see how that affect things.
What did you have to do to get bash 3.2 on your Mac?
Title: Re: 1up Gadget (Sidebar Server Monitor) [official release]
Post by: Dougy on October 02, 2010, 01:01:38 AM
comes with osx 10.5.6 leopard ;)
i have 2 macs 1 with leopard 10.5.6 - now my gaming computer
and 1 with 10.4.11 - now my music producing computer :P

I have heard that 10.7 is out under dev and construct its leaked on TPB somewhere ....... i heard that the features include bash 4.1 and it has easier bash update system.

it also has tons more emac utilities with it :D
im saving up to buy a mac pro 12 core £4000

Two 2.66GHz 6-Core Intel Xeon “Westmere” processors
6GB (six 1GB) memory
1TB hard drive
18x double-layer SuperDrive
ATI Radeon HD 5770 with 1GB GDDR5
Title: Re: 1up Gadget (Sidebar Server Monitor) [official release]
Post by: CuttyFlam[1up] on October 02, 2010, 02:07:35 AM
I would like to test it in my Linux :D
Title: Re: 1up Gadget (Sidebar Server Monitor) [official release]
Post by: marvsta on October 02, 2010, 02:26:12 AM
I USE A MAC :(
BTW IS THIS GOOD?
PK
Title: Re: 1up Gadget (Sidebar Server Monitor) [official release]
Post by: KD197 on October 02, 2010, 06:58:41 AM
OK I need to update it to sort out that first run problem, and also for Mumble instead of Vent, so I'll post the link to the updated version as soon as I have the right info.
Title: Re: 1up Gadget (Sidebar Server Monitor) [official release]
Post by: Dougy on October 02, 2010, 09:59:44 AM
OK I need to update it to sort out that first run problem, and also for Mumble instead of Vent, so I'll post the link to the updated version as soon as I have the right info.

KD i know most scripts always come with bugs but the one i just found is very strange, its double printing servers.

Stats:   Join:   Server:         Players:   Map:
i   I   1up Icy Jumps Server    6 / 32      ut4_icyworld1a
x   X   1up Xmas Special TDM    6 / 32      ut4_arena2
f   F   1up Free4All Server   23 / 32      ut4_arena2
t   T   1up Fun Server TDM    6 / 32      ut4_icyworld1a
c   C   1up CTF Server       6 / 32      ut4_village
z   Z   1up Zombie Challenge    6 / 32      ut4_icyworld1a
j   J   1up Jump Server       6 / 32      ut4_icyworld1a
s   S   1up SuperTS Server    6 / 32      ut4_cambridge_fixed


I dont believe for 1 minute that zombie is running icyworlds lol!!!!!!!

(http://img178.imageshack.us/img178/9836/picture1pxi.png)
Title: Re: 1up Gadget (Sidebar Server Monitor) [official release]
Post by: KD197 on October 02, 2010, 10:02:52 AM
Nice one Dougy! I guess I remembered incorrectly about bash 4 being needed...
Also you've confirmed something I've seen happen on my end - the map names are sometimes wrong on first load. I'm not sure why but I haven't got round to looking into it, I think it's the parallel queries to the server script... I'll probably point it to individual scripts for each server and see how that affect things.
What did you have to do to get bash 3.2 on your Mac?
I'll be sorting it out later.
Title: Re: 1up Gadget (Sidebar Server Monitor) [official release]
Post by: Dougy on October 02, 2010, 06:51:24 PM
niceee