ea and ealert

It's in the Bot, not a game, its FEMA. 🦺
This commit is contained in:
SpudGunMan
2024-12-11 16:15:40 -08:00
parent 0749df04e5
commit b2eae85cc2
4 changed files with 14 additions and 7 deletions

View File

@@ -367,8 +367,9 @@ There is no direct support for MQTT in the code, however, reports from Discord a
| `hfcond` | Returns a table of HF solar conditions | |
| `tide` | Returns the local tides (NOAA data source) |
| `rlist` | Returns a table of nearby repeaters from RepeaterBook | |
| `wx` and `wxc` | Return local weather forecast (wxc is metric value), NOAA or Open Meteo for weather forecasting |
| `wxa` and `wxalert` | Return NOAA alerts. Short title or expanded details |
| `wx` and `wxc` | Return local weather forecast (wxc is metric value), NOAA or Open Meteo for weather forecasting | |
| `wxa` and `wxalert` | Return NOAA alerts. Short title or expanded details | |
| `ea` and `ealert` | Return FEMA iPAWS/EAS alerts. Headline or expanded details | |
### Bulletin Board & Mail
| Command | Description | |

View File

@@ -45,6 +45,8 @@ def auto_response(message, snr, rssi, hop, pkiStatus, message_from_id, channel_n
"cqcq": lambda: handle_ping(message_from_id, deviceID, message, hop, snr, rssi, isDM, channel_number),
"cqcqcq": lambda: handle_ping(message_from_id, deviceID, message, hop, snr, rssi, isDM, channel_number),
"dopewars": lambda: handleDopeWars(message, message_from_id, deviceID),
"ea": lambda: handle_fema_alerts(message, message_from_id, deviceID),
"ealert": lambda: handle_fema_alerts(message, message_from_id, deviceID),
"email:": lambda: handle_email(message_from_id, message),
"games": lambda: gamesCmdList,
"globalthermonuclearwar": lambda: handle_gTnW(),
@@ -73,7 +75,6 @@ def auto_response(message, snr, rssi, hop, pkiStatus, message_from_id, channel_n
"testing": lambda: handle_ping(message_from_id, deviceID, message, hop, snr, rssi, isDM, channel_number),
"tide": lambda: handle_tide(message_from_id, deviceID, channel_number),
"videopoker": lambda: handleVideoPoker(message, message_from_id, deviceID),
"ealert": lambda: handle_fema_alerts(message, message_from_id, deviceID),
"whereami": lambda: handle_whereami(message_from_id, deviceID, channel_number),
"whoami": lambda: handle_whoami(message_from_id, deviceID, hop, snr, rssi, pkiStatus),
"wiki:": lambda: handle_wiki(message, isDM),
@@ -618,7 +619,12 @@ def handle_wxc(message_from_id, deviceID, cmd):
def handle_fema_alerts(message, message_from_id, deviceID):
location = get_node_location(message_from_id, deviceID)
return getIpawsAlert(str(location[0]), str(location[1]))
if message.lower().startswith("ealert"):
# Detailed alert
return getIpawsAlert(str(location[0]), str(location[1]))
else:
# Headlines only
return getIpawsAlert(str(location[0]), str(location[1]), shortAlerts=True)
def handle_bbspost(message, message_from_id, deviceID):
if "$" in message and not "example:" in message:

View File

@@ -9,7 +9,7 @@ import bs4 as bs # pip install beautifulsoup4
import xml.dom.minidom
from modules.log import *
trap_list_location = ("whereami", "tide", "moon", "wx", "wxc", "wxa", "wxalert", "rlist", "ealert")
trap_list_location = ("whereami", "tide", "moon", "wx", "wxc", "wxa", "wxalert", "rlist", "ea", "ealert")
def where_am_i(lat=0, lon=0, short=False, zip=False):
whereIam = ""

View File

@@ -72,14 +72,14 @@ if enableCmdHistory:
if location_enabled:
from modules.locationdata import * # from the spudgunman/meshing-around repo
trap_list = trap_list + trap_list_location # items tide, whereami, wxc, wx
help_message = help_message + ", whereami, wx, wxc, rlist, ealert"
help_message = help_message + ", whereami, wx, wxc, rlist"
# Open-Meteo Configuration for worldwide weather
if use_meteo_wxApi:
from modules.wx_meteo import * # from the spudgunman/meshing-around repo
else:
# NOAA only features
help_message = help_message + ", wxa, tide"
help_message = help_message + ", wxa, tide, ealert"
# BBS Configuration
if bbs_enabled: