Bugfixes for loading list of trusted nicks and auth systen
This commit is contained in:
parent
875ecf2b15
commit
612891ba3e
|
@ -25,7 +25,7 @@ msglock.release()
|
||||||
|
|
||||||
def loadtrusted():
|
def loadtrusted():
|
||||||
trustedlock.acquire()
|
trustedlock.acquire()
|
||||||
trusted=[]
|
while len(trusted)>1: trusted.pop() #I'm really sorry but trusted=[] created trusted as local variable
|
||||||
f=open('trusted.txt','r')
|
f=open('trusted.txt','r')
|
||||||
for line in f:
|
for line in f:
|
||||||
while len(line)>0 and line[-1]=='\n': line=line[:-1]
|
while len(line)>0 and line[-1]=='\n': line=line[:-1]
|
||||||
|
@ -106,7 +106,8 @@ def parse((line,irc)):
|
||||||
for i in authcmds.pop(line[3][1:]):
|
for i in authcmds.pop(line[3][1:]):
|
||||||
irc.send(i)
|
irc.send(i)
|
||||||
else:
|
else:
|
||||||
authcmds.pop(line[3][1:])
|
if line[3][1:] in authcmds:
|
||||||
|
authcmds.pop(line[3][1:])
|
||||||
trustedlock.release()
|
trustedlock.release()
|
||||||
authcmdlock.release()
|
authcmdlock.release()
|
||||||
elif line[1]=='482':
|
elif line[1]=='482':
|
||||||
|
@ -126,7 +127,7 @@ def execcmd(cmdline):
|
||||||
f.write('%s\t%s\t%s\n'%(receiver,sender,msg))
|
f.write('%s\t%s\t%s\n'%(receiver,sender,msg))
|
||||||
f.close()
|
f.close()
|
||||||
msglock.release()
|
msglock.release()
|
||||||
if cmdline[0]=='/lt':
|
elif cmdline[0]=='/lt':
|
||||||
loadtrusted()
|
loadtrusted()
|
||||||
|
|
||||||
def help(cmd):
|
def help(cmd):
|
||||||
|
|
BIN
botcmd.pyc
BIN
botcmd.pyc
Binary file not shown.
Loading…
Reference in New Issue