trying to simplify nodeid entry...

This commit is contained in:
Nestpebble
2024-09-27 02:26:55 +01:00
parent 0c1c587bc7
commit 0b101d662e
+4 -2
View File
@@ -478,8 +478,10 @@ def handle_bbspost(message, message_from_id, deviceID):
return "example: bbspost $subject #message"
elif "@" in message and not "example:" in message:
toNode = message.split("@")[1].split("#")[0]
toNode = toNode.rstrip().strip("!")
if toNode.isalpha() or not toNode.isnumeric():
toNode = toNode.rstrip()
if "!" in toNode and toNode.strip("!").ishex():
toNode = toNode.strip("!")
elif toNode.isalpha() or not toNode.isnumeric():
toNode = get_num_from_short_name(toNode, deviceID)
if toNode == 0:
return "Node not found " + message.split("@")[1].split("#")[0]