mirror of
https://github.com/craigerl/aprsd.git
synced 2024-12-21 09:01:23 -05:00
change query char from ? to !
This commit is contained in:
parent
658e6b6202
commit
7de2820caa
@ -11,7 +11,7 @@ class QueryPlugin(plugin.APRSDPluginBase):
|
||||
"""Query command."""
|
||||
|
||||
version = "1.0"
|
||||
command_regex = r"^\?.*"
|
||||
command_regex = r"^\!.*"
|
||||
command_name = "query"
|
||||
|
||||
def command(self, fromcall, message, ack):
|
||||
@ -28,8 +28,8 @@ class QueryPlugin(plugin.APRSDPluginBase):
|
||||
# only I can do admin commands
|
||||
if re.search(searchstring, fromcall):
|
||||
|
||||
# resend last N most recent: "?3"
|
||||
r = re.search(r"^\?([0-9]).*", message)
|
||||
# resend last N most recent: "!3"
|
||||
r = re.search(r"^\!([0-9]).*", message)
|
||||
if r is not None:
|
||||
if len(tracker) > 0:
|
||||
last_n = r.group(1)
|
||||
@ -41,8 +41,8 @@ class QueryPlugin(plugin.APRSDPluginBase):
|
||||
LOG.debug(reply)
|
||||
return reply
|
||||
|
||||
# resend all: "?a"
|
||||
r = re.search(r"^\?[aA].*", message)
|
||||
# resend all: "!a"
|
||||
r = re.search(r"^\![aA].*", message)
|
||||
if r is not None:
|
||||
if len(tracker) > 0:
|
||||
reply = messaging.NULL_MESSAGE
|
||||
@ -53,8 +53,8 @@ class QueryPlugin(plugin.APRSDPluginBase):
|
||||
LOG.debug(reply)
|
||||
return reply
|
||||
|
||||
# delete all: "?d"
|
||||
r = re.search(r"^\?[dD].*", message)
|
||||
# delete all: "!d"
|
||||
r = re.search(r"^\![dD].*", message)
|
||||
if r is not None:
|
||||
reply = "Deleted ALL pending msgs."
|
||||
LOG.debug(reply)
|
||||
|
@ -41,7 +41,7 @@ class TestPlugin(unittest.TestCase):
|
||||
|
||||
@mock.patch("aprsd.messaging.MsgTrack.flush")
|
||||
def test_query_flush(self, mock_flush):
|
||||
message = "?delete"
|
||||
message = "!delete"
|
||||
query = query_plugin.QueryPlugin(self.config)
|
||||
|
||||
expected = "Deleted ALL pending msgs."
|
||||
@ -53,7 +53,7 @@ class TestPlugin(unittest.TestCase):
|
||||
def test_query_restart_delayed(self, mock_restart):
|
||||
track = messaging.MsgTrack()
|
||||
track.track = {}
|
||||
message = "?4"
|
||||
message = "!4"
|
||||
query = query_plugin.QueryPlugin(self.config)
|
||||
|
||||
expected = "No pending msgs to resend"
|
||||
|
Loading…
Reference in New Issue
Block a user