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)
|
# asynchat.async_chat.push(self, *args, **kargs)
|
||||||
|
|
||||||
def __write(self, args, text=None):
|
def __write(self, args, text=None):
|
||||||
# print '%r %r %r' % (self, args, text)
|
# print 'PUSH: %r %r %r' % (self, args, text)
|
||||||
try:
|
try:
|
||||||
if text is not None:
|
if text is not None:
|
||||||
# 510 because CR and LF count too, as nyuszika7h points out
|
# 510 because CR and LF count too, as nyuszika7h points out
|
||||||
|
|
|
@ -43,6 +43,8 @@ def service(phenny, input, command, args):
|
||||||
lines = bytes.splitlines()
|
lines = bytes.splitlines()
|
||||||
if not lines:
|
if not lines:
|
||||||
return phenny.reply("Sorry, the service didn't respond any output.")
|
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])
|
phenny.say(lines[0][:350])
|
||||||
|
|
||||||
def refresh(phenny):
|
def refresh(phenny):
|
||||||
|
|
|
@ -58,11 +58,12 @@ def startup(phenny, input):
|
||||||
|
|
||||||
if hasattr(phenny.config, 'password'):
|
if hasattr(phenny.config, 'password'):
|
||||||
phenny.msg('NickServ', 'IDENTIFY %s' % 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
|
# Cf. http://swhack.com/logs/2005-12-05#T19-32-36
|
||||||
for channel in phenny.channels:
|
for channel in phenny.channels:
|
||||||
phenny.write(('JOIN', channel))
|
phenny.write(('JOIN', channel))
|
||||||
|
time.sleep(0.5)
|
||||||
startup.rule = r'(.*)'
|
startup.rule = r'(.*)'
|
||||||
startup.event = '251'
|
startup.event = '251'
|
||||||
startup.priority = 'low'
|
startup.priority = 'low'
|
||||||
|
|
1
phenny
1
phenny
|
@ -123,6 +123,7 @@ def main(argv=None):
|
||||||
# Step Two: Check Dependencies
|
# Step Two: Check Dependencies
|
||||||
|
|
||||||
check_python_version() # require python2.4 or later
|
check_python_version() # require python2.4 or later
|
||||||
|
if not opts.config:
|
||||||
check_dotdir() # require ~/.phenny, or make it and exit
|
check_dotdir() # require ~/.phenny, or make it and exit
|
||||||
|
|
||||||
# Step Three: Load The Configurations
|
# Step Three: Load The Configurations
|
||||||
|
|
Loading…
Reference in New Issue