ifly6 / Communique

A free client for the NationStates Telegram API
MIT License
3 stars 0 forks source link

Feature Request #8

Open patricius opened 6 years ago

patricius commented 6 years ago

https://www.nationstates.net/cgi-bin/api.cgi?q=happenings;region=europe;filter=move;limit=50%2522

Hi. Sorry to bother you, but I have a request.

Could this be added as a filter?

For instance, I'm using your region, it would continuously message people who leave it. so it would filter off the departed from take the nation making the action and the add it to recipients list.

region:Europe, +action:departed would be the syntax

ifly6 commented 3 years ago

Really really late. It isn't addable because the way the program is structured requires there to be an enumerated list of recipients at start. The recruitment daemon works on the back end by simply re-running the enumeration every 180 seconds. If I were to redesign the program, I'd pick a different structure.

I'm rewriting the base library not to take an enumerated list of recipients but rather to process them in a queue. Already wrote some code which would do what you requested; it isn't entirely ready yet. Due to the change though, I'm re-opening this Issue.

ifly6 commented 3 years ago

Current implementation uses API calls for regional inhabitants rather than monitoring the happenings call. This is mostly because I set up the framework expecting that new possibilities are provided faster than telegrams can be sent. See CommMovementMonitor.

ifly6 commented 8 months ago

This should now be present in the current pre-release code base for version 13 as flag _movement:out_of;europe.