Skip to content

Commit

Permalink
Fixed bug with /channels polling, now clearing list before each loop
Browse files Browse the repository at this point in the history
  • Loading branch information
reillychase committed Oct 25, 2016
1 parent b22c216 commit 7a503fa
Showing 1 changed file with 3 additions and 2 deletions.
5 changes: 3 additions & 2 deletions main.py
Original file line number Diff line number Diff line change
Expand Up @@ -490,6 +490,7 @@ def catch_textedit_chat(self, msg, color):
if re.findall('^ -----------name----------- users ----admin/operator----', msg):
self.list_channels.clear()
self.channels = []
self.logged_on_admins = []
msg_2 = msg.splitlines()
for line in msg_2:

Expand All @@ -501,7 +502,7 @@ def catch_textedit_chat(self, msg, color):

chan_admins = re.findall('^ .+ .?.?.?.?.?.?.?.?.? - (.+)', line)[0]
chan_admins = chan_admins.split(' ,')
print chan_admins


for admin in chan_admins:
admin_level = admin[-2]
Expand All @@ -512,12 +513,12 @@ def catch_textedit_chat(self, msg, color):
channel_admin_list.append(chan)
channel_admin_list.append(admin[:-3])
self.logged_on_admins.append(channel_admin_list)
print self.logged_on_admins

if self.print_channels == 1:
line = '<span style="color: #ffff00;">' + line + '</span>'
self.textedit_chat.append(str(line).decode('string_escape'))

print self.logged_on_admins
self.channels.pop(0)
for channel in self.channels:
self.list_channels.addItem(channel)
Expand Down

0 comments on commit 7a503fa

Please sign in to comment.