summaryrefslogtreecommitdiffstats
path: root/irc.py
diff options
context:
space:
mode:
Diffstat (limited to 'irc.py')
-rwxr-xr-xirc.py9
1 files changed, 6 insertions, 3 deletions
diff --git a/irc.py b/irc.py
index 38fe886..e5bfdc3 100755
--- a/irc.py
+++ b/irc.py
@@ -43,9 +43,12 @@ class Bot(asynchat.async_chat):
def __write(self, args, text=None):
# print '%r %r %r' % (self, args, text)
- if text is not None:
- self.push(' '.join(args) + ' :' + text + '\r\n')
- else: self.push(' '.join(args) + '\r\n')
+ try:
+ if text is not None:
+ self.push(' '.join(args) + ' :' + text + '\r\n')
+ else: self.push(' '.join(args) + '\r\n')
+ except IndexError:
+ pass
def write(self, args, text=None):
# This is a safe version of __write