summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorsand <daniel@spatof.org>2013-05-14 13:20:14 (GMT)
committer sand <daniel@spatof.org>2013-05-14 13:20:14 (GMT)
commit7e9f81b3866854888b77d03d15ac9e40008f9d0d (patch)
treefe1cccb17ac1d60fd8ce52af99f4ce5d2b0e6171
parentb611d5548acf044355bc9721f34bfda7972cd848 (diff)
fix per megahal, ancora
-rw-r--r--pinolo/plugins/megahal.py3
1 files changed, 2 insertions, 1 deletions
diff --git a/pinolo/plugins/megahal.py b/pinolo/plugins/megahal.py
index 651b153..4ad6ffa 100644
--- a/pinolo/plugins/megahal.py
+++ b/pinolo/plugins/megahal.py
@@ -49,7 +49,7 @@ __license__ = 'BSD'
log = logging.getLogger(__name__)
r_irclog = re.compile(r"^\[[^]]+\]\s+")
-r_ircsubject = re.compile(r"<[^>]+>")
+r_ircsubject = re.compile(r"<[^>]+>\s+")
DEFAULT_ORDER = 5
DEFAULT_BRAINFILE = os.path.join(os.environ.get('HOME', ''), '.pymegahal-brain')
@@ -470,6 +470,7 @@ class MegaHAL(object):
if not line.startswith("<"):
continue
line = r_ircsubject.sub("", line)
+ print "Learning %r" % line
self.learn(line)
def learn(self, phrase):