little change on hilight detection

This commit is contained in:
Nicolas Coevoet 2014-11-20 19:15:16 +01:00
parent 4322a0bcf1
commit 4e2180eba3

View File

@ -3200,13 +3200,13 @@ class ChanTracker(callbacks.Plugin,plugins.ChannelDBHandler):
if limit == -1: if limit == -1:
return False return False
count = 0 count = 0
messages = message.split(' ')
users = [] users = []
msg = message.lower()
for user in list(irc.state.channels[channel].users): for user in list(irc.state.channels[channel].users):
users.append(user) if len(user) > 2:
for m in messages: users.append(user.lower())
for user in users: for user in users:
if m == user: if msg.find(user) != -1:
count = count + 1 count = count + 1
break break
return count > limit return count > limit