some fixes and added #help
This commit is contained in:
parent
86f1b8e111
commit
5637860b9a
|
@ -1,7 +1,7 @@
|
||||||
import eliza
|
import eliza
|
||||||
|
|
||||||
doctor=eliza.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']
|
opchans=['#osdev-offtopic']
|
||||||
oprights={}
|
oprights={}
|
||||||
for i in opnicks:
|
for i in opnicks:
|
||||||
|
@ -16,8 +16,10 @@ def parse((line,irc)):
|
||||||
irc.send('PRIVMSG NickServ :ACC '+line[0].split('!')[0][1:])
|
irc.send('PRIVMSG NickServ :ACC '+line[0].split('!')[0][1:])
|
||||||
elif line[3]==':#src':
|
elif line[3]==':#src':
|
||||||
irc.send('PRIVMSG %s :https://github.com/JuEeHa/oonbotti2'%line[2])
|
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,'):
|
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':
|
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:
|
if line[3][1:] in oprights and int(line[5])==3:
|
||||||
for chan in oprights[line[3][1:]]:
|
for chan in oprights[line[3][1:]]:
|
||||||
|
|
BIN
botcmd.pyc
BIN
botcmd.pyc
Binary file not shown.
|
@ -91,13 +91,13 @@ class Keyhandler(threading.Thread):
|
||||||
c=line.split(' ')
|
c=line.split(' ')
|
||||||
if c[0]=='/j' and len(c)==2:
|
if c[0]=='/j' and len(c)==2:
|
||||||
self.outc.send('JOIN '+c[1])
|
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:])))
|
self.outc.send('PRIVMSG %s :%s'%(c[1],' '.join(c[2:])))
|
||||||
elif c[0]=='/q' and len(c)==1:
|
elif c[0]=='/q' and len(c)==1:
|
||||||
self.outc.send('QUIT')
|
self.outc.send('QUIT')
|
||||||
break
|
break
|
||||||
elif c[0][0]=='/':
|
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):
|
class Loghandler(threading.Thread):
|
||||||
def __init__(self,inpc):
|
def __init__(self,inpc):
|
||||||
|
|
Loading…
Reference in New Issue