mirror of
https://github.com/craigerl/aprsd.git
synced 2025-06-25 05:25:21 -04:00
yet another unicode problem, in resend_email fixed
This commit is contained in:
parent
d3bb44feec
commit
bb1a2ee61a
@ -394,7 +394,7 @@ def resend_email(count, fromcall):
|
|||||||
# reverse lookup of a shortcut
|
# reverse lookup of a shortcut
|
||||||
from_addr = shortcuts_inverted[from_addr]
|
from_addr = shortcuts_inverted[from_addr]
|
||||||
# asterisk indicates a resend
|
# asterisk indicates a resend
|
||||||
reply = "-" + from_addr + " * " + body
|
reply = "-" + from_addr + " * " + body.decode(errors='ignore')
|
||||||
send_message(fromcall, reply)
|
send_message(fromcall, reply)
|
||||||
msgexists = True
|
msgexists = True
|
||||||
|
|
||||||
@ -798,17 +798,22 @@ def server(loglevel, quiet, config_file):
|
|||||||
elif re.search("^-.*", message):
|
elif re.search("^-.*", message):
|
||||||
LOG.debug("EMAIL")
|
LOG.debug("EMAIL")
|
||||||
searchstring = "^" + CONFIG["ham"]["callsign"] + ".*"
|
searchstring = "^" + CONFIG["ham"]["callsign"] + ".*"
|
||||||
|
LOG.debug("A")
|
||||||
# only I can do email
|
# only I can do email
|
||||||
if re.search(searchstring, fromcall):
|
if re.search(searchstring, fromcall):
|
||||||
|
LOG.debug("B")
|
||||||
# digits only, first one is number of emails to resend
|
# digits only, first one is number of emails to resend
|
||||||
r = re.search("^-([0-9])[0-9]*$", message)
|
r = re.search("^-([0-9])[0-9]*$", message)
|
||||||
if r is not None:
|
if r is not None:
|
||||||
|
LOG.debug("C")
|
||||||
resend_email(r.group(1), fromcall)
|
resend_email(r.group(1), fromcall)
|
||||||
# -user@address.com body of email
|
# -user@address.com body of email
|
||||||
elif re.search(r"^-([A-Za-z0-9_\-\.@]+) (.*)", message):
|
elif re.search(r"^-([A-Za-z0-9_\-\.@]+) (.*)", message):
|
||||||
|
LOG.debug("D")
|
||||||
# (same search again)
|
# (same search again)
|
||||||
a = re.search(r"^-([A-Za-z0-9_\-\.@]+) (.*)", message)
|
a = re.search(r"^-([A-Za-z0-9_\-\.@]+) (.*)", message)
|
||||||
if a is not None:
|
if a is not None:
|
||||||
|
LOG.debug("E")
|
||||||
to_addr = a.group(1)
|
to_addr = a.group(1)
|
||||||
content = a.group(2)
|
content = a.group(2)
|
||||||
# send recipient link to aprs.fi map
|
# send recipient link to aprs.fi map
|
||||||
|
Loading…
x
Reference in New Issue
Block a user