diff --git a/.gitignore b/.gitignore index a737147..af481ac 100644 --- a/.gitignore +++ b/.gitignore @@ -1,3 +1,4 @@ msgs.txt trusted.txt +startcmd.txt *.pyc diff --git a/botcmd.py b/botcmd.py index e1c1d60..e28eaa5 100644 --- a/botcmd.py +++ b/botcmd.py @@ -97,6 +97,8 @@ def parse((line,irc)): msglock.release() elif line[3]==':#help': irc.send('PRIVMSG %s :%s'%(chan,help(' '.join(line[4:])))) + elif line[3]==':#esoteric' and chan=='#esoteric': + irc.send('PRIVMSG %s :Nothing here'%chan) elif line[3][1:] in ('oonbotti:', 'oonbotti', 'oonbotti,', 'oonbotti2', 'oonbotti2:', 'oonbotti2,'): irc.send('PRIVMSG %s :%s: %s'%(chan,nick,doctor.respond(' '.join(line[4:])))) elif line[1]=='NOTICE' and line[0].split('!')[0]==':NickServ' and line[4]=='ACC': diff --git a/botcmd.pyc b/botcmd.pyc index 41ea9b6..88448e2 100644 Binary files a/botcmd.pyc and b/botcmd.pyc differ diff --git a/ircbot.py b/ircbot.py index 8c70f18..38812c9 100644 --- a/ircbot.py +++ b/ircbot.py @@ -54,7 +54,13 @@ class Connhandler(threading.Thread): self.send('NICK %s'%self.nick) self.send('USER %s a a :%s'%(self.nick,self.name)) - self.send('JOIN %s'%(self.chan)) + f=open('startcmd.txt','r') + for i in f: + if i[-1]=='\n': i=i[:-1] + self.send(i) + f.close() + for i in self.chan.split(' '): + self.send('JOIN %s'%(i)) buf='' while True: