SWBFGamers

General => Public Square => Topic started by: Led on July 01, 2018, 06:56:46 PM

Title: Any interest in Game Auto-Alerts?
Post by: Led on July 01, 2018, 06:56:46 PM
I think it should be possible to query the Master Server and send out SMS alerts when there are a certain number of players on the servers. 

Would there be any interest on the player side for this?
Title: Re: Any interest in Game Auto-Alerts?
Post by: Triops on July 02, 2018, 01:08:36 AM
I would be very interested in this :tu:.
Would this be possible for Europeans like me, too? I ask, because there would be many costs for SMS to Europa. (I don't know how expensive tolls for sms in U.S. are )

Have a nice time
Triops
Title: Re: Any interest in Game Auto-Alerts?
Post by: Red04SWBF on July 02, 2018, 01:39:46 AM
Quote from: Triops on July 02, 2018, 01:08:36 AM
I would be very interested in this :tu:.
Would this be possible for Europeans like me, too? I ask, because there would be many costs for SMS to Europa. (I don't know how expensive tolls for sms in U.S. are )

Have a nice time
Triops

It's true, although in Europe it depends on roaming and whether you are sending or receiving one. I also think there might be some alternative to SMS.
Title: Re: Any interest in Game Auto-Alerts?
Post by: Triops on July 02, 2018, 05:54:21 AM
I think, I would not have to pay, when I receive a SMS (in Austria). I have never had roaming fees for sms, but I fear there would be costs for swbfgamers.
Title: Re: Any interest in Game Auto-Alerts?
Post by: Led on July 02, 2018, 06:06:10 AM
So it could be a message or an email...I think we could work out the details if there is enough interest.   I think it could be set to only notify on certain days of the week or between certain hours, and would of course be completely optional.
Title: Re: Any interest in Game Auto-Alerts?
Post by: {PLA}gdh92 on July 02, 2018, 08:53:14 AM
Sounds like a good idea, I think email would be best. It would need to be between player selected hours and limited to one or two though so you didn't get emails all day as people logged in.
Title: Re: Any interest in Game Auto-Alerts?
Post by: Red04SWBF on July 02, 2018, 10:54:02 AM
Quote from: {PLA}gdh92 on July 02, 2018, 08:53:14 AM
Sounds like a good idea, I think email would be best. It would need to be between player selected hours and limited to one or two though so you didn't get emails all day as people logged in.

I agree. I use my avatar email and receive notifications on my smartphone very often (if someone uses Gmail, of course :P).
Title: Re: Any interest in Game Auto-Alerts?
Post by: Anyder on July 02, 2018, 12:50:01 PM
Quote from: Led on July 02, 2018, 06:06:10 AM
So it could be a message or an email...I think we could work out the details if there is enough interest.   I think it could be set to only notify on certain days of the week or between certain hours, and would of course be completely optional.
We have a tool Sonic developed long ago to get notified when you're running the application if there are X (number set by client) players in a server, and the app updates every X (seconds set by the client), for SWBF1.
Title: Re: Any interest in Game Auto-Alerts?
Post by: RepComm on July 02, 2018, 09:05:55 PM
A discord bot is another way to go, and that would be a lot of fun to make..
Title: Re: Any interest in Game Auto-Alerts?
Post by: Led on July 03, 2018, 05:59:41 AM
Quote from: RepComm on July 02, 2018, 09:05:55 PM
A discord bot is another way to go, and that would be a lot of fun to make..

Sure, if you want to give it a whirl.   You may need access to the MS database--if so I will point you to DP for that info.
Title: Re: Any interest in Game Auto-Alerts?
Post by: Dark_Phantom on July 03, 2018, 08:25:06 PM
Yeah, let me know which way you guys want to go and we can get a test up and running - it definitely is possible according to my research to do it straight from the MS or through something like Discord.
Title: Re: Any interest in Game Auto-Alerts?
Post by: RepComm on July 04, 2018, 03:18:31 PM
No time like the present to learn new things!
I'm thinking maybe the bot could mention @ingame_notify or some kind of self assignable role, so as to not annoy the whole server or channel.

I'll have a GitHub up soon with my bot code, and I'll get with you about how to stick the master server together with it.
Title: Re: Any interest in Game Auto-Alerts?
Post by: Led on July 04, 2018, 03:50:36 PM
sounds good.  Let's use the test MS for now.  Before we go live let's talk about some of the restrictions.
Title: Re: Any interest in Game Auto-Alerts?
Post by: RepComm on August 27, 2023, 11:06:02 AM
I have had SWBF intalled on ubuntu lately and was thinking about how nice it would be to be notified when folks join, and then ran across this old thread. I'm not sure I ever got to making something like this, but I went ahead and decided to do so.

https://github.com/RepComm/swbf-bridge

I don't have anything connecting to master servers yet, and if that is a no-go, just say so. I'll be DMing Led and Dark Phantom about setting up something secure to interface with the master server.

I thought about the obvious of simply polling the master server the same way the forum does.

What I'd like to see is a generic discord server notification bot, and after that works a direct message option for allowing individuals to set their own notifications via discord DM.
Title: Re: Any interest in Game Auto-Alerts?
Post by: {AR}MetalKiller on August 28, 2023, 07:17:04 AM
In the AR-Clan Discord we have a dedicated channel where a discord bot notifies players about our steam server.
People get notified when the map changes (the map name is shown) or a new player joins.
Additionally, we introduced 2 roles that tag people when there are more than 3 or more than 5 people on the server (tags occur only after a certain timeout i.e. 30 minutes).
We have a separate channel for moderators where the names of the players on the server are displayed.
The bot also notifies us if the server crashes.

The bot is written in Python and is publicly available: https://github.com/21stcenturyclan/SWBF-Server-Bot/ (https://github.com/21stcenturyclan/SWBF-Server-Bot/)

One drawback is that this bot is not universally reusable and will work only for one discord server.
Feel free to use/tweak the code, or contact us if you want to create a more generic bot.

---

I am not familiar with how the master server works, but our bot scans the memory of the battlefront executable (given by the PID) in a regular interval (every 3 seconds).
If certain values in the memory change, a new event is created and the bot executes an action (i.e. a channel message).
Title: Re: Any interest in Game Auto-Alerts?
Post by: RepComm on August 29, 2023, 06:40:09 AM
That is a beautiful solution!
If it's scanning the battlefront process then I think what is handling is an individual dedicated server, correct?

Right now I'm aiming at the master server to achieve handing any public server (those that announce to the master server list).

There is also a luxury that the current master server implemented is open source, so events could be generated directly in theory

In the future I think something that can optionally dial into a process such as your bot could be very fascinating, linking the two together

Perhaps something like:
Get events and server lists from master server
Check port XYZ on dedicated server IP
 if responds ask it to forward events as if it's a dedicated server bot

I'm getting ahead of myself, I'll reply back when I have some basic master server interop
Title: Re: Any interest in Game Auto-Alerts?
Post by: {AR}MetalKiller on August 29, 2023, 08:41:17 AM
Quote from: RepComm on August 29, 2023, 06:40:09 AMIf it's scanning the battlefront process then I think what is handling is an individual dedicated server, correct?

Correct

Quote from: RepComm on August 29, 2023, 06:40:09 AMThere is also a luxury that the current master server implemented is open source, so events could be generated directly in theory

Could somebody pass me a link to the code?
Cheers!

Quote from: RepComm on August 29, 2023, 06:40:09 AMPerhaps something like:
Get events and server lists from master server
Check port XYZ on dedicated server IP
 if responds ask it to forward events as if it's a dedicated server bot
Sounds like a lot of work, but a lot of fun ;)
Title: Re: Any interest in Game Auto-Alerts?
Post by: RepComm on August 29, 2023, 09:39:02 AM
Quote from: {AR}MetalKiller on August 29, 2023, 08:41:17 AMCould somebody pass me a link to the code?

https://github.com/derkalle4/gamespy-masterserver
Title: Re: Any interest in Game Auto-Alerts?
Post by: {PLA}gdh92 on August 29, 2023, 10:30:02 AM
https://discord.gg/DbXC73XY4 That's the discord link in case anyone wants to see it..
Title: Re: Any interest in Game Auto-Alerts?
Post by: {AR}MetalKiller on August 31, 2023, 07:52:55 AM
Quote from: RepComm on August 29, 2023, 09:39:02 AMhttps://github.com/derkalle4/gamespy-masterserver

This might be off topic but is this the actual master server used for swbfspy?
I am a bit surprised that it is running on VB  :o
Title: Re: Any interest in Game Auto-Alerts?
Post by: RepComm on August 31, 2023, 10:12:57 AM
A reimplementation of the MS, yes. I'm learning how to compile it and configure as well. I intend to containerize the build process and runtime to make it simple to work with.
EhPortal 1.34 © 2024, WebDev