some fixes and added #help

This commit is contained in:
Juhani Haverinen 2013-06-30 14:42:14 +03:00
parent 86f1b8e111
commit 5637860b9a
3 changed files with 6 additions and 4 deletions

View File

@ -1,7 +1,7 @@
import eliza
doctor=eliza.eliza()
opnicks=['nortti','nortti_','shikhin','shikhin`','`shikhin','^[]','sortiecat','martinFTW','graphitemaster','XgF']
opnicks=['nortti','nortti_','shikhin','shikhin`','`shikhin','^[]','sortiecat','martinFTW','graphitemaster','XgF','sprocklem']
opchans=['#osdev-offtopic']
oprights={}
for i in opnicks:
@ -16,8 +16,10 @@ def parse((line,irc)):
irc.send('PRIVMSG NickServ :ACC '+line[0].split('!')[0][1:])
elif line[3]==':#src':
irc.send('PRIVMSG %s :https://github.com/JuEeHa/oonbotti2'%line[2])
elif line[3]==':#help':
irc.send('PRIVMSG %s :#echo #op #src #help'%line[2])
elif line[3][1:] in ('oonbotti:', 'oonbotti', 'oonbotti,', 'oonbotti2', 'oonbotti2:', 'oonbotti2,'):
irc.send('PRIVMSG %s :%s'%(line[2],doctor.respond(' '.join(line[4:]))))
irc.send('PRIVMSG %s :%s: %s'%(line[2],line[0].split('!')[0][1:],doctor.respond(' '.join(line[4:]))))
elif line[1]=='NOTICE' and line[0].split('!')[0]==':NickServ' and line[4]=='ACC':
if line[3][1:] in oprights and int(line[5])==3:
for chan in oprights[line[3][1:]]:

Binary file not shown.

View File

@ -91,13 +91,13 @@ class Keyhandler(threading.Thread):
c=line.split(' ')
if c[0]=='/j' and len(c)==2:
self.outc.send('JOIN '+c[1])
elif c[0]=='/m' and len(c)==3:
elif c[0]=='/m' and len(c)>2:
self.outc.send('PRIVMSG %s :%s'%(c[1],' '.join(c[2:])))
elif c[0]=='/q' and len(c)==1:
self.outc.send('QUIT')
break
elif c[0][0]=='/':
self.outc.send(c[0][1:].upper()+' '.join(c[1:]))
self.outc.send(c[0][1:].upper()+' '+' '.join(c[1:]))
class Loghandler(threading.Thread):
def __init__(self,inpc):