From 43cead65820e0534bea0800afc9af3855a1adff1 Mon Sep 17 00:00:00 2001
From: moneromooo <moneromoo@nowhere.nowhere.nowhere>
Date: Tue, 17 Mar 2015 09:08:32 +0000
Subject: [PATCH] twitter: allow random text after tipping

---
 tipbot/modules/twitter.py | 6 +++++-
 1 file changed, 5 insertions(+), 1 deletion(-)

diff --git a/tipbot/modules/twitter.py b/tipbot/modules/twitter.py
index b8e09fb..93593ca 100644
--- a/tipbot/modules/twitter.py
+++ b/tipbot/modules/twitter.py
@@ -172,9 +172,13 @@ class TwitterNetwork(Network):
         if not match:
           continue
         target=match.group(0)
+        match=re.search(amount_regexp,line.replace(target,'').strip())
+        if not match:
+          continue
+        amount=match.group(0)
         if self.on_command:
           try:
-            synthetic_cmd=['tip',target.replace('@',''),line.replace('+','').replace(target,'').strip()]
+            synthetic_cmd=['tip',target.replace('@','').strip(),amount.replace('+','').strip()]
             log_log('Running synthetic command: %s' % (str(synthetic_cmd)))
             self.on_command(link,synthetic_cmd)
           except Exception,e: