diff --git a/chatbot b/chatbot index 9cde5ed..e056407 100755 --- a/chatbot +++ b/chatbot @@ -11,9 +11,7 @@ VERSION='0.1.0' def processmsg(msg, rcpt): if !msg.startswith("!"): return "" - if msg.startswith("http"): - return "link" - elif "youtube" in msg: + elif "youtube.com/watch" in msg: return msg.replace("youtube.com", "iv.datura.network") def show_version(): @@ -41,7 +39,7 @@ class MUCBot(slixmpp.ClientXMPP): def muc_message(self, msg): rcpt=msg['from'].bare processmsg(msg['body'], rcpt) - if msg['type'] in ('chat', 'normal'): + if msg['mucnick'] != self.nick): self.send_message(mto=rcpt,mbody="%s: %s" % (msg['mucnick'],msg['body']),mtype='groupchat')