News: 1up Discord VOIP
Invite Code: https://discord.gg/VPv9JhP

Author Topic: 1up Gadget (Sidebar Server Monitor) [official release]  (Read 12556 times)

0 Members and 1 Guest are viewing this topic.

Offline Pyrite[1up]

  • *[1up] Dev Admin
  • [1up] Dev Team
  • [1upZ] NMRiH Admin
  • Posts: 1,560
  • Karma: 147
  • Since: 08/11/2009
    YearsYearsYearsYearsYearsYearsYearsYearsYearsYearsYearsYearsYearsYearsYears
Re: 1up Gadget (Sidebar Server Monitor) [official release]
« Reply #45 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.
•·.· ́ ̄`·.·•"Most Likely to Pillage the Global Village"•·.· ́ ̄`·.·•


Offline KD197

  • Posts: 671
  • Karma: 28
  • Since: 20/06/2010
    YearsYearsYearsYearsYearsYearsYearsYearsYearsYearsYearsYearsYearsYears
Re: 1up Gadget (Sidebar Server Monitor) [official release]
« Reply #46 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.

Not-so-1337-hax0rz: awsdgiaygveiujgfahiy, killer, [K1L]ShAd0W[GER], [51]Usage (impersonator), 1Lexa8, Redeye, sid, ASTROKILLA, bar, mody, [R:K]BatistaBomB, revenger, [58f]gojan, imaidiot, [DOA]Arik, sn4k3, Broajer, HACKER, DDMX, dopey

"yeah, I googled "mod reveal 67" to find out what it does and the top links were from 1up" - SlimPickins[1up]

Offline Pyrite[1up]

  • *[1up] Dev Admin
  • [1up] Dev Team
  • [1upZ] NMRiH Admin
  • Posts: 1,560
  • Karma: 147
  • Since: 08/11/2009
    YearsYearsYearsYearsYearsYearsYearsYearsYearsYearsYearsYearsYearsYearsYears
Re: 1up Gadget (Sidebar Server Monitor) [official release]
« Reply #47 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.
•·.· ́ ̄`·.·•"Most Likely to Pillage the Global Village"•·.· ́ ̄`·.·•


Offline KD197

  • Posts: 671
  • Karma: 28
  • Since: 20/06/2010
    YearsYearsYearsYearsYearsYearsYearsYearsYearsYearsYearsYearsYearsYears
Re: 1up Gadget (Sidebar Server Monitor) [official release]
« Reply #48 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.
« Last Edit: September 05, 2010, 06:36:22 AM by KD197 »

Not-so-1337-hax0rz: awsdgiaygveiujgfahiy, killer, [K1L]ShAd0W[GER], [51]Usage (impersonator), 1Lexa8, Redeye, sid, ASTROKILLA, bar, mody, [R:K]BatistaBomB, revenger, [58f]gojan, imaidiot, [DOA]Arik, sn4k3, Broajer, HACKER, DDMX, dopey

"yeah, I googled "mod reveal 67" to find out what it does and the top links were from 1up" - SlimPickins[1up]

Offline Pyrite[1up]

  • *[1up] Dev Admin
  • [1up] Dev Team
  • [1upZ] NMRiH Admin
  • Posts: 1,560
  • Karma: 147
  • Since: 08/11/2009
    YearsYearsYearsYearsYearsYearsYearsYearsYearsYearsYearsYearsYearsYearsYears
Re: 1up Gadget (Sidebar Server Monitor) [official release]
« Reply #49 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.
•·.· ́ ̄`·.·•"Most Likely to Pillage the Global Village"•·.· ́ ̄`·.·•


Offline KD197

  • Posts: 671
  • Karma: 28
  • Since: 20/06/2010
    YearsYearsYearsYearsYearsYearsYearsYearsYearsYearsYearsYearsYearsYears
Re: 1up Gadget (Sidebar Server Monitor) [official release]
« Reply #50 on: September 05, 2010, 06:37:41 AM »
OK dude, I'll be on Vent in a while. Sorry for being such a bother :-[

Not-so-1337-hax0rz: awsdgiaygveiujgfahiy, killer, [K1L]ShAd0W[GER], [51]Usage (impersonator), 1Lexa8, Redeye, sid, ASTROKILLA, bar, mody, [R:K]BatistaBomB, revenger, [58f]gojan, imaidiot, [DOA]Arik, sn4k3, Broajer, HACKER, DDMX, dopey

"yeah, I googled "mod reveal 67" to find out what it does and the top links were from 1up" - SlimPickins[1up]

Offline Dougy

  • Posts: 594
  • Karma: -6
  • Since: 17/01/2010
    YearsYearsYearsYearsYearsYearsYearsYearsYearsYearsYearsYearsYearsYears
    • TheOMFG Music
Re: 1up Gadget (Sidebar Server Monitor) [official release]
« Reply #51 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:




Offline KD197

  • Posts: 671
  • Karma: 28
  • Since: 20/06/2010
    YearsYearsYearsYearsYearsYearsYearsYearsYearsYearsYearsYearsYearsYears
Re: 1up Gadget (Sidebar Server Monitor) [official release]
« Reply #52 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?

Not-so-1337-hax0rz: awsdgiaygveiujgfahiy, killer, [K1L]ShAd0W[GER], [51]Usage (impersonator), 1Lexa8, Redeye, sid, ASTROKILLA, bar, mody, [R:K]BatistaBomB, revenger, [58f]gojan, imaidiot, [DOA]Arik, sn4k3, Broajer, HACKER, DDMX, dopey

"yeah, I googled "mod reveal 67" to find out what it does and the top links were from 1up" - SlimPickins[1up]

Offline Dougy

  • Posts: 594
  • Karma: -6
  • Since: 17/01/2010
    YearsYearsYearsYearsYearsYearsYearsYearsYearsYearsYearsYearsYearsYears
    • TheOMFG Music
Re: 1up Gadget (Sidebar Server Monitor) [official release]
« Reply #53 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

Offline CuttyFlam[1up]

  • *[1up] Server Referee
  • Posts: 886
  • Karma: 155
  • '
  • Since: 14/08/2010
    YearsYearsYearsYearsYearsYearsYearsYearsYearsYearsYearsYearsYearsYears
Re: 1up Gadget (Sidebar Server Monitor) [official release]
« Reply #54 on: October 02, 2010, 02:07:35 AM »
I would like to test it in my Linux :D

marvsta

Re: 1up Gadget (Sidebar Server Monitor) [official release]
« Reply #55 on: October 02, 2010, 02:26:12 AM »
I USE A MAC :(
BTW IS THIS GOOD?
PK

Offline KD197

  • Posts: 671
  • Karma: 28
  • Since: 20/06/2010
    YearsYearsYearsYearsYearsYearsYearsYearsYearsYearsYearsYearsYearsYears
Re: 1up Gadget (Sidebar Server Monitor) [official release]
« Reply #56 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.
« Last Edit: October 02, 2010, 07:05:42 AM by KD197[1up] »

Not-so-1337-hax0rz: awsdgiaygveiujgfahiy, killer, [K1L]ShAd0W[GER], [51]Usage (impersonator), 1Lexa8, Redeye, sid, ASTROKILLA, bar, mody, [R:K]BatistaBomB, revenger, [58f]gojan, imaidiot, [DOA]Arik, sn4k3, Broajer, HACKER, DDMX, dopey

"yeah, I googled "mod reveal 67" to find out what it does and the top links were from 1up" - SlimPickins[1up]

Offline Dougy

  • Posts: 594
  • Karma: -6
  • Since: 17/01/2010
    YearsYearsYearsYearsYearsYearsYearsYearsYearsYearsYearsYearsYearsYears
    • TheOMFG Music
Re: 1up Gadget (Sidebar Server Monitor) [official release]
« Reply #57 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!!!!!!!


Offline KD197

  • Posts: 671
  • Karma: 28
  • Since: 20/06/2010
    YearsYearsYearsYearsYearsYearsYearsYearsYearsYearsYearsYearsYearsYears
Re: 1up Gadget (Sidebar Server Monitor) [official release]
« Reply #58 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.

Not-so-1337-hax0rz: awsdgiaygveiujgfahiy, killer, [K1L]ShAd0W[GER], [51]Usage (impersonator), 1Lexa8, Redeye, sid, ASTROKILLA, bar, mody, [R:K]BatistaBomB, revenger, [58f]gojan, imaidiot, [DOA]Arik, sn4k3, Broajer, HACKER, DDMX, dopey

"yeah, I googled "mod reveal 67" to find out what it does and the top links were from 1up" - SlimPickins[1up]

Offline Dougy

  • Posts: 594
  • Karma: -6
  • Since: 17/01/2010
    YearsYearsYearsYearsYearsYearsYearsYearsYearsYearsYearsYearsYearsYears
    • TheOMFG Music
Re: 1up Gadget (Sidebar Server Monitor) [official release]
« Reply #59 on: October 02, 2010, 06:51:24 PM »
niceee