From 5faaba78d89d98f4a8bd9f942e738800f23ba9dc Mon Sep 17 00:00:00 2001 From: tv Date: Tue, 6 Sep 2011 15:46:43 +0200 Subject: //Reaktor/IRC: be famous only sometimes --- Reaktor/IRC/bot2.py | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) (limited to 'Reaktor') diff --git a/Reaktor/IRC/bot2.py b/Reaktor/IRC/bot2.py index 092d34bb..0279c0f6 100755 --- a/Reaktor/IRC/bot2.py +++ b/Reaktor/IRC/bot2.py @@ -35,7 +35,8 @@ class IRCBot(SimpleIRCClient): _, _handle, _command, _argument, _ = re.split( '^(\w+):\s*(\w+)(?:\s+(.*))?$', event.arguments()[0]) except ValueError, error: - PRIVMSG(self.target, 'I\'m so famous') + if re.search(_nickname, event.arguments()[0]): + PRIVMSG(self.target, 'I\'m so famous') return # ignore if _handle == _nickname or _handle == 'ALL': @@ -57,7 +58,7 @@ class IRCBot(SimpleIRCClient): p = popen([command], stdin=PIPE, stdout=PIPE, stderr=PIPE, env=env) except OSError, error: ME(self.target, 'is made of stupid') - print('OSError@%s: %s' % (argv, error)) + print('OSError@%s: %s' % (command, error)) return stdout, stderr = [ x[:len(x)-1] for x in -- cgit v1.2.3