Author Topic: Making a "IG server switched map"-notifications app - servers.php  (Read 2197 times)

0 Members and 1 Guest are viewing this topic.

Offline Chaingun

  • Regular Member
  • *
  • Posts: 587
  • Archers were evil already in the 15th century.
  • Class: Cavalry
I was discussing with Oliveran about practicing a certain map, and it would be great to know when this map appears on IG server even though I'm not in the game, via a Windows "notification balloon" or something like that on the task bar.

The best way to accomplish this would be to build on what is already there *. A quick inspection of the IG output suggests that servers.php is queried every five minutes using AJAX. Visiting servers.php gives me fairly nice output, however, it's completely wrong. Is there any chance of fixing this?

Also, I don't really need HTML formatting for my app, just JSON or even line separated plain text would do fine (to conserve unnecessary data transfer). Adding a HTTP param for controlling the kind of output would be nice.

Who do I need to talk to about this? I can do all coding (although, I'm sure there are good reasons to why servers.php isn't being updated  :unsure:).

* A more exotic alternative would be to see if I could query the Warband master server for this info, but without having checked that closer I'm sure there's some layer of security against that.
Ignore the fact my Steam profile is an email address - I haven't used the address for years.

Offline M

  • Posts: 1379
  • Class: None
Re: Making a "IG server switched map"-notifications app - servers.php
« Reply #1 on: March 13, 2012, 10:00:45 PM »
The best way to accomplish this would be to build on what is already there *. A quick inspection of the IG output suggests that servers.php is queried every five minutes using AJAX. Visiting servers.php gives me fairly nice output, however, it's completely wrong. Is there any chance of fixing this?
If I remember correctly servers.php just scrapes the output of http://22nd.eu/stats/displaystats.php?server=IG_Battlegrounds and http://22nd.eu/stats/displaystats.php?server=IG_Training because at the time nobody would give me access to the servers' strings.txt to change where Vincenzo's admin tools sent the stats. Since the servers use ENL mod rather than vincenzo's now I don't think there's anyway of fixing it unless you get whoever maintains the ENL mod to add a thing. It's not a difficult thing to add so maybe they would do it for you.

Offline Chaingun

  • Regular Member
  • *
  • Posts: 587
  • Archers were evil already in the 15th century.
  • Class: Cavalry
Re: Making a "IG server switched map"-notifications app - servers.php
« Reply #2 on: March 13, 2012, 10:05:46 PM »
Alright, thanks M :) I will start bothering them about it.

Looks like there are several ways to do this. Vincenzo sits on the most obvious solution (module system sources for his mod), but I'm sure something can be done from scratch involving database on e.g. IG web server and customizing ENL server mod if he refuses to cooperate.

Edit 2: send_message_to_url seems to be the key operation, so I can make the mod changes myself and everything else in the chain. I will develop this thing privately, but I wonder if IG can host the final PHP script and database + install patches to coming ENL server module system releases?

A side effect is the IG servers' statuses on this web page can be fixed at the same time.

Edit 3: Vince has agreed to help! So this site should transparently get working again with quite small effort from server admins. :) After that I'll just plug into 22nd for my app enabling monitoring of any servers.

Edit 4: Shock (author of ENL server mod) will be working with me on this.
« Last Edit: March 14, 2012, 10:36:07 PM by Chaingun »
Ignore the fact my Steam profile is an email address - I haven't used the address for years.

Offline Lugh

  • Regular Member
  • *
  • Posts: 2569
  • Class: Infantry
Re: Making a "IG server switched map"-notifications app - servers.php
« Reply #3 on: March 26, 2012, 09:49:16 AM »

Edit 2: send_message_to_url seems to be the key operation, so I can make the mod changes myself and everything else in the chain. I will develop this thing privately, but I wonder if IG can host the final PHP script and database + install patches to coming ENL server module system releases?

A side effect is the IG servers' statuses on this web page can be fixed at the same time.

How's this coming along, Chaingun? I don't see a reason why we can't host the script and database.

Offline Chaingun

  • Regular Member
  • *
  • Posts: 587
  • Archers were evil already in the 15th century.
  • Class: Cavalry
Re: Making a "IG server switched map"-notifications app - servers.php
« Reply #4 on: March 29, 2012, 07:39:02 AM »
Just my laziness slowing it down atm.

I will try to hurry up
« Last Edit: April 06, 2012, 04:44:08 PM by Chaingun »
Ignore the fact my Steam profile is an email address - I haven't used the address for years.

Offline Chaingun

  • Regular Member
  • *
  • Posts: 587
  • Archers were evil already in the 15th century.
  • Class: Cavalry
Re: Making a "IG server switched map"-notifications app - servers.php
« Reply #5 on: April 06, 2012, 04:42:49 PM »
"Pre-alpha" download: http://dl.dropbox.com/u/19620648/warbandmonitor/warbandmonitor_0.1.zip (UPDATED to work, forgot to include some installation files...)

Basically, some stuff works with 22nd servers (which might be closing down shortly if I understand Vincenzo right), but I need to get data from Shock's ENL mod instead, which may take another 1-2 weeks.
« Last Edit: April 06, 2012, 04:52:20 PM by Chaingun »
Ignore the fact my Steam profile is an email address - I haven't used the address for years.