Made it possible to automaticaly execute commands on startup using startcmd.txt
This commit is contained in:
parent
78903fb097
commit
3a5966e13d
|
@ -1,3 +1,4 @@
|
||||||
msgs.txt
|
msgs.txt
|
||||||
trusted.txt
|
trusted.txt
|
||||||
|
startcmd.txt
|
||||||
*.pyc
|
*.pyc
|
||||||
|
|
|
@ -97,6 +97,8 @@ def parse((line,irc)):
|
||||||
msglock.release()
|
msglock.release()
|
||||||
elif line[3]==':#help':
|
elif line[3]==':#help':
|
||||||
irc.send('PRIVMSG %s :%s'%(chan,help(' '.join(line[4:]))))
|
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,'):
|
elif line[3][1:] in ('oonbotti:', 'oonbotti', 'oonbotti,', 'oonbotti2', 'oonbotti2:', 'oonbotti2,'):
|
||||||
irc.send('PRIVMSG %s :%s: %s'%(chan,nick,doctor.respond(' '.join(line[4:]))))
|
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':
|
elif line[1]=='NOTICE' and line[0].split('!')[0]==':NickServ' and line[4]=='ACC':
|
||||||
|
|
BIN
botcmd.pyc
BIN
botcmd.pyc
Binary file not shown.
|
@ -54,7 +54,13 @@ class Connhandler(threading.Thread):
|
||||||
|
|
||||||
self.send('NICK %s'%self.nick)
|
self.send('NICK %s'%self.nick)
|
||||||
self.send('USER %s a a :%s'%(self.nick,self.name))
|
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=''
|
buf=''
|
||||||
while True:
|
while True:
|
||||||
|
|
Loading…
Reference in New Issue