aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorNiklas Halle <niklas@niklashalle.net>2020-08-24 15:38:02 +0200
committerNiklas Halle <niklas@niklashalle.net>2020-08-24 15:38:02 +0200
commit044db74fa09055b6128e7508bf7c08576d9d29e8 (patch)
tree1d37bdb794d32b8be10c72a53d7a3912e3ffea6d
parent789bc17b9d031d9c28751c7921f3a69d2175710b (diff)
downloadn_frontend_signal-044db74fa09055b6128e7508bf7c08576d9d29e8.tar.gz
n_frontend_signal-044db74fa09055b6128e7508bf7c08576d9d29e8.zip
regex fix (maybe)
-rwxr-xr-xmain.py4
1 files changed, 2 insertions, 2 deletions
diff --git a/main.py b/main.py
index c08d828..4075c7b 100755
--- a/main.py
+++ b/main.py
@@ -37,7 +37,7 @@ def startup(number):
s = Signal(number)
# with args
- @s.chat_handler("/([^\\s]+)\\s+(.*)", order=10) # This is case-insensitive.
+ @s.chat_handler("^/([^\\s]+)\\s+([^$]*)$", order=10) # This is case-insensitive.
def klinger(message, match):
# Returning `False` as the first argument will cause matching to continue
# after this handler runs.
@@ -55,7 +55,7 @@ def startup(number):
return stop, answer
# no args
- @s.chat_handler("/(.+)", order=20) # This is case-insensitive.
+ @s.chat_handler("^/(.+)$", order=20) # This is case-insensitive.
def klinger(message, match):
# Returning `False` as the first argument will cause matching to continue
# after this handler runs.