diff --git a/mesh_bot.py b/mesh_bot.py index ce67b84..dfdd821 100755 --- a/mesh_bot.py +++ b/mesh_bot.py @@ -69,6 +69,8 @@ def auto_response(message, snr, rssi, hop, pkiStatus, message_from_id, channel_n "whoami": lambda: handle_whoami(message_from_id, deviceID, hop, snr, rssi, pkiStatus), "๐Ÿ“": lambda: handle_whoami(message_from_id, deviceID, hop, snr, rssi, pkiStatus), "๐Ÿ””": lambda: handle_alertBell(message_from_id, deviceID, message), + "CQCQ": lambda: handle_cq(message_from_id, deviceID, channel_number), + "CQCQCQ": lambda: handle_cq(message_from_id, deviceID, channel_number), } # set the command handler @@ -159,13 +161,19 @@ def handle_ping(message_from_id, deviceID, message, hop, snr, rssi, isDM): multiPingList.append({'message_from_id': message_from_id, 'count': pingCount + 1, 'type': type, 'deviceID': deviceID}) msg = f"๐ŸšฆInitalizing {pingCount} auto-ping" - return msg def handle_alertBell(message_from_id, deviceID, message): msg = ["the only prescription is more ๐Ÿฎ๐Ÿ””๐Ÿ„๐Ÿ›Ž๏ธ", "what this ๐Ÿค– needs is more ๐Ÿฎ๐Ÿ””๐Ÿ„๐Ÿ›Ž๏ธ", "๐ŸŽคring my bell๐Ÿ›Ž๏ธ๐Ÿ””๐ŸŽถ"] return random.choice(msg) +def handle_cq(message_from_id, deviceID, channel_number): + if deviceID == 1: + myname = get_name_from_number(myNodeNum1, 'short', 1) + elif deviceID == 2: + myname = get_name_from_number(myNodeNum2, 'short', 2) + msg = f"QSP QSL OM DE {myname} K" + def handle_motd(message, message_from_id, isDM): global MOTD isAdmin = False diff --git a/modules/system.py b/modules/system.py index 4369e08..c133174 100644 --- a/modules/system.py +++ b/modules/system.py @@ -19,7 +19,7 @@ games_enabled = False # Ping Configuration if ping_enabled: # ping, pinging, ack, testing, test, pong - trap_list_ping = ("ping", "pinging", "ack", "testing", "test", "pong", "๐Ÿ””") + trap_list_ping = ("ping", "pinging", "ack", "testing", "test", "pong", "๐Ÿ””", "CQCQ", "CQCQCQ") trap_list = trap_list + trap_list_ping help_message = help_message + "ping"