Author Topic: Small script to see who is online on laanx  (Read 6950 times)

LigH

  • Forum Legend
  • *
  • Posts: 7096
    • View Profile
Re: Small script to see who is online on laanx
« Reply #15 on: November 24, 2009, 03:15:09 am »
BTW - running Vista in VirtualBox is ... nerdy. ;)

The good old XML report had its advantage that it contained the guild information about the players currently being online. The player stats HTML page doesn't.

Gag Harmond
Knight and Ambassador
The Royal House of Purrty

weltall

  • Associate Developer
  • Veteran
  • *
  • Posts: 1671
    • View Profile
    • http://weltall.heliohost.org
Re: Small script to see who is online on laanx
« Reply #16 on: November 24, 2009, 03:19:05 am »
i had win7 in vmware and virtualbox then installed it natively and deleted the image (10gb are a lot)

Aiwendil

  • Guest
Re: Small script to see who is online on laanx
« Reply #17 on: November 24, 2009, 08:48:09 am »
The good old XML report had its advantage that it contained the guild information about the players currently being online. The player stats HTML page doesn't.
I guess that's one of the reasons why it's not available anymore...back then the xml report also showed the secret guilds of players. And I prefer to have the script an IC tool, meaning the user chooses what infos get in there. This way you can add only the infos your have and keep it as a reminder for the infos you know ICly about other characters.

Oh, and it's a themed windows XP...I have a native vista64 installed. But I boot it not very often...what leads to booting it even less because I hate having to install all the updates I missed the two month I didn't use it at each start.

Edit:
I tried the script with ezpcusa and it seems to work fine. Haven't done much testing, but at least I get the online player list. To use it with ezpcusa just open the "PS-PlayerS.py.ini" file and change the line
Code: [Select]
statuspage = http://laanx.fragnetics.com/index.php?page=char_stats
to
Code: [Select]
statuspage = http://planeshift.ezpcusa.com/index.php?page=char_stats
Then it should use the ezpcusa status page for the player list.

« Last Edit: November 24, 2009, 09:06:58 am by Aiwendil »

Aiwendil

  • Guest
Re: Small script to see who is online on laanx
« Reply #18 on: November 30, 2009, 03:07:09 pm »
Got Lhaa to host the zip file for me...a big thanks to her for that. So download from here without the stup...annoy...whatever Rapidshare.

Nakem

  • Traveller
  • *
  • Posts: 42
    • View Profile
Re: Small script to see who is online on laanx
« Reply #19 on: November 30, 2009, 03:19:35 pm »
It still crashes on a non-threaded Tk lib  :'(
Maybe I'll get to update the Qt version...  :)

Aiwendil

  • Guest
Re: Small script to see who is online on laanx
« Reply #20 on: November 30, 2009, 03:25:16 pm »
What crash? Any console output? But using the threaded Tk version here.

Nakem

  • Traveller
  • *
  • Posts: 42
    • View Profile
Re: Small script to see who is online on laanx
« Reply #21 on: November 30, 2009, 03:32:35 pm »
Here you go:

Code: [Select]
Exception in thread Thread-1:
Traceback (most recent call last):
  File "/usr/lib/python2.6/threading.py", line 522, in __bootstrap_inner
    self.run()
  File "PS-PlayerS.py", line 359, in run
    self.parse()
  File "PS-PlayerS.py", line 395, in parse
    self.guicallback(self.players)
  File "PS-PlayerS.py", line 1167, in updateText
    self.playerCount['text'] = 'Players Online: ' + str(len(players))
  File "/usr/lib/python2.6/lib-tk/Tkinter.py", line 1209, in __setitem__
    self.configure({key: value})
  File "/usr/lib/python2.6/lib-tk/Tkinter.py", line 1202, in configure
    return self._configure('configure', cnf, kw)
  File "/usr/lib/python2.6/lib-tk/Tkinter.py", line 1193, in _configure
    self.tk.call(_flatten((self._w, cmd)) + self._options(cnf))
TclError: out of stack space (infinite loop?)

But it's known bug when using a non-threaded Tklib in a threaded programm.

Aiwendil

  • Guest
Re: Small script to see who is online on laanx
« Reply #22 on: November 30, 2009, 03:57:05 pm »
Ah, I see. I guess it would be possible to build the script without using threads...but it would take some time to rework everything. Initially I only wanted to try out the python threads, but now the whole GUI somehow depends on the thread polling the server status. Would be interesting to know how many distributions are shipped without a thread-safe tcl/Tk.

Nakem

  • Traveller
  • *
  • Posts: 42
    • View Profile
Re: Small script to see who is online on laanx
« Reply #23 on: November 30, 2009, 04:09:53 pm »
Using Qt works for me and that's why I created the Qt version but it looks better, too. ;)
Maybe the problem is that you use the Tk functions of the main thread in the status thread? I don't really know.....

What about showing a notify message, every time a friend (or enemy) logs in/out? Maybe something like this:


It would help, if you're waiting for someone in PS.
« Last Edit: December 02, 2009, 12:56:46 pm by Nakem »

Nakem

  • Traveller
  • *
  • Posts: 42
    • View Profile
Re: Small script to see who is online on laanx
« Reply #24 on: December 02, 2009, 12:40:39 pm »
=== Update! See below. ===

Finished the Qt version! It is compatible with the configuration files of the latest release so you can use them both at the same time.
Like last time I built executables. And here are the screenshots:
LinuxWindows

And here are the downloads:
The binaries for Linux and Windows together with the source code and the documentation.24MB (.tar.gz) (.zip)
The binary for Linux and the documentation.15MB (.tar.gz) (.zip)
The binary for Windows and the documentation.9,1MB (.tar.gz) (.zip)

I hope you like it.  :)
« Last Edit: February 18, 2010, 03:20:52 pm by Nakem »

Aiwendil

  • Guest
Re: Small script to see who is online on laanx
« Reply #25 on: December 03, 2009, 12:21:07 pm »
Thx Nakem, looks great. For the notification window...A bit hard fo me to do with Tk, at least if it should be a bit more than just a pop-up window. But I guess it's far easier to do with your Qt version. There are still some flaws in the script and things i would like to add. But once I have all the basic functionalityI think shipping it in your Qt version is the better way...and maybe just keep the Tk version for compatibility with macs.

[Edit:]
And just because I saw your signature...would it be a good idea to post a link to the script in psde too? I'm not often enough there to really know what's going on, but I guess there are some german speakers that don't read this forum regularly. And at least in german I can post...okay, posting in english too even if I can't speak really speak the language.
« Last Edit: December 03, 2009, 12:24:57 pm by Aiwendil »

Nakem

  • Traveller
  • *
  • Posts: 42
    • View Profile
Re: Small script to see who is online on laanx
« Reply #26 on: December 03, 2009, 04:48:42 pm »
The box was actually made with "notify-send" (a simple command line program) but I fear it won't run under Windows. I'll try to find another way though.
I wrote the article on PSDe but I'm not sure it it's fine that way.
One last thing though, maybe we could implement support for translations  ::) ?

Aiwendil

  • Guest
Re: Small script to see who is online on laanx
« Reply #27 on: December 03, 2009, 05:40:31 pm »
Thanks for the psde article Nakem and the translation is not a bad idea. Shouldn't be too hard to do in python. I didn't use many strings yet, so I can look into it.

LigH

  • Forum Legend
  • *
  • Posts: 7096
    • View Profile
Re: Small script to see who is online on laanx
« Reply #28 on: December 04, 2009, 03:46:28 am »
Also possibly useful - a free definition of user groups (more than the predefined friends/enemies/GMs) via GUI elements...

Gag Harmond
Knight and Ambassador
The Royal House of Purrty

weltall

  • Associate Developer
  • Veteran
  • *
  • Posts: 1671
    • View Profile
    • http://weltall.heliohost.org
Re: Small script to see who is online on laanx
« Reply #29 on: December 11, 2009, 07:22:00 am »
for this to work on laanx you need to change PLAYERTAGCOUNT from 171 to 192
on ezpcusa no changes yet but will in future change in the same way