Merge branch 'master' of https://github.com/sbp/phenny
Conflicts: irc.py modules/oblique.py modules/startup.pymaster
commit
09e26155ce
2
irc.py
2
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
|
||||
|
|
|
@ -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):
|
||||
|
|
|
@ -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'
|
||||
|
|
3
phenny
3
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
|
||||
|
||||
|
|
Loading…
Reference in New Issue