From fbd936d76529d0956338232d880641b120cabb06 Mon Sep 17 00:00:00 2001 From: Juhani Haverinen Date: Thu, 3 Apr 2014 21:35:46 +0300 Subject: [PATCH] Change to accomodate for sharing of #help --- botcmd.py | 6 ++++-- 1 file changed, 4 insertions(+), 2 deletions(-) diff --git a/botcmd.py b/botcmd.py index e0e0127..8df5169 100644 --- a/botcmd.py +++ b/botcmd.py @@ -173,7 +173,9 @@ def parse((line,irc)): else: irc.send('PRIVMSG %s :Usage #invite nick'%chan) elif line[3]==':#help': - irc.send('PRIVMSG %s :%s'%(chan,help(' '.join(line[4:])))) + helptext=help(' '.join(line[4:])) + if helptext: + irc.send('PRIVMSG %s :%s'%(chan,helptext)) elif line[3]==':#esoteric' and chan=='#esoteric': irc.send('PRIVMSG %s :Nothing here'%chan) elif line[3][1:] in ('oonbotti:', 'oonbotti', 'oonbotti,', 'oonbotti2', 'oonbotti2:', 'oonbotti2,'): @@ -287,4 +289,4 @@ def help(cmd): elif cmd=='me': return 'I shall.' else: - return 'Not found' + return None