Skip to content

Commit

Permalink
bugfix: when there are a lot of nicks on channel, IRC protocol splits…
Browse files Browse the repository at this point in the history
… NAMES response into several, so we need to handle it
  • Loading branch information
ihptru committed Jan 16, 2014
1 parent c8bc783 commit 248aafa
Showing 1 changed file with 6 additions and 5 deletions.
11 changes: 6 additions & 5 deletions irc/names_e.py
Original file line number Diff line number Diff line change
Expand Up @@ -19,11 +19,12 @@ def parse_event(self, recv):
channel = recv.split()[4]
users = " ".join(recv.split()[5:])[1:]
conn, cur = self.db_data()
sql = """DELETE FROM user_channel
WHERE channel = '"""+channel+"""'
"""
cur.execute(sql)
conn.commit()
if users[0] in ['@', '+', '%']:
sql = """DELETE FROM user_channel
WHERE channel = '"""+channel+"""'
"""
cur.execute(sql)
conn.commit()
for user in users.split():
if ( user[0] in ['@','%','+'] ):
status = user[0]
Expand Down

0 comments on commit 248aafa

Please sign in to comment.