From d12348ef7a83a5e7c8c18f17bf63875e03e090e8 Mon Sep 17 00:00:00 2001 From: Thomas Mannay Date: Sun, 30 Oct 2016 18:12:27 +0000 Subject: [PATCH] Don't respond if the dot commands don't begin the message. --- seddy.py | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/seddy.py b/seddy.py index fc8f781..66add7d 100644 --- a/seddy.py +++ b/seddy.py @@ -102,9 +102,9 @@ if __name__ == "__main__": if 'PING' in line: send.write('PONG\r\n') send.flush() - if '.bots' in msg or '.bot ' + nick in msg: + if '.bots' in msg[:5] or '.bot ' + nick in msg[:5 + len(nick)]: notice("I was written to correct your mistakes.") - if '.source ' + nick in msg: + if '.source ' + nick in msg[:8 + len(nick)]: notice('[Python] https://github.com/sys-fs/seddy') elif is_sed.match(msg): foo = seddy(msg, history)