fix sed command for real now
This commit is contained in:
parent
53b5a87943
commit
5c4e9067a0
1 changed files with 2 additions and 2 deletions
4
main.py
4
main.py
|
|
@ -218,7 +218,7 @@ class AngelBot(ClientXMPP):
|
||||||
"""Process sed command."""
|
"""Process sed command."""
|
||||||
try:
|
try:
|
||||||
text = msg["body"]
|
text = msg["body"]
|
||||||
if not sed_cmd.search(text):
|
if not sed_cmd.match(text):
|
||||||
self.messages[sender]["messages"].add(text)
|
self.messages[sender]["messages"].add(text)
|
||||||
return
|
return
|
||||||
sed_args = sed_parse.split(text)
|
sed_args = sed_parse.split(text)
|
||||||
|
|
@ -230,7 +230,7 @@ class AngelBot(ClientXMPP):
|
||||||
sed.load_string(text)
|
sed.load_string(text)
|
||||||
|
|
||||||
for message in self.messages[sender]["messages"]:
|
for message in self.messages[sender]["messages"]:
|
||||||
if not re.match(sed_args[1], message):
|
if not re.search(sed_args[1], message):
|
||||||
continue
|
continue
|
||||||
msg = io.StringIO(message)
|
msg = io.StringIO(message)
|
||||||
res = "\n".join(sed.apply(msg, None))
|
res = "\n".join(sed.apply(msg, None))
|
||||||
|
|
|
||||||
Loading…
Add table
Add a link
Reference in a new issue