diff --git a/irc.py b/irc.py index fab33d8..b9d098a 100755 --- a/irc.py +++ b/irc.py @@ -51,7 +51,7 @@ class Bot(asynchat.async_chat): # asynchat.async_chat.push(self, *args, **kargs) def __write(self, args, text=None): - # print '%r %r %r' % (self, args, text) + # print 'PUSH: %r %r %r' % (self, args, text) try: if text is not None: # 510 because CR and LF count too, as nyuszika7h points out diff --git a/modules/oblique.py b/modules/oblique.py index 50ea7cf..a8179bb 100644 --- a/modules/oblique.py +++ b/modules/oblique.py @@ -43,6 +43,8 @@ def service(phenny, input, command, args): lines = bytes.splitlines() if not lines: return phenny.reply("Sorry, the service didn't respond any output.") + try: line = lines[0].encode('utf-8')[:350] + except: line = lines[0][:250] phenny.say(lines[0][:350]) def refresh(phenny): diff --git a/modules/startup.py b/modules/startup.py index fdc0d4f..ce0c0f4 100644 --- a/modules/startup.py +++ b/modules/startup.py @@ -58,11 +58,12 @@ def startup(phenny, input): if hasattr(phenny.config, 'password'): phenny.msg('NickServ', 'IDENTIFY %s' % phenny.config.password) - __import__('time').sleep(5) + time.sleep(5) # Cf. http://swhack.com/logs/2005-12-05#T19-32-36 for channel in phenny.channels: phenny.write(('JOIN', channel)) + time.sleep(0.5) startup.rule = r'(.*)' startup.event = '251' startup.priority = 'low' diff --git a/phenny b/phenny index 375ac80..2ecb0a3 100755 --- a/phenny +++ b/phenny @@ -123,7 +123,8 @@ def main(argv=None): # Step Two: Check Dependencies check_python_version() # require python2.4 or later - check_dotdir() # require ~/.phenny, or make it and exit + if not opts.config: + check_dotdir() # require ~/.phenny, or make it and exit # Step Three: Load The Configurations