fixed username handling and double karma for me
This commit is contained in:
parent
e0622d26b0
commit
a6b85e6298
1 changed files with 4 additions and 1 deletions
|
@ -36,8 +36,9 @@ def karma_cb(room, event):
|
||||||
return
|
return
|
||||||
|
|
||||||
for mxid in members:
|
for mxid in members:
|
||||||
alias = re.search('@([\w]+_)?([^:]+)', mxid).group(2)
|
alias = re.search('@(pnut_)?([^:]+)', mxid).group(2)
|
||||||
if alias.lower() == handle.lower():
|
if alias.lower() == handle.lower():
|
||||||
|
print('match')
|
||||||
|
|
||||||
if sign == '++':
|
if sign == '++':
|
||||||
rs.incr("partybot:k_" + event['room_id'] + "@" + handle)
|
rs.incr("partybot:k_" + event['room_id'] + "@" + handle)
|
||||||
|
@ -46,6 +47,8 @@ def karma_cb(room, event):
|
||||||
|
|
||||||
_show_karma(room, event['room_id'], handle)
|
_show_karma(room, event['room_id'], handle)
|
||||||
|
|
||||||
|
break
|
||||||
|
|
||||||
|
|
||||||
def _show_karma(room, room_id, handle):
|
def _show_karma(room, room_id, handle):
|
||||||
|
|
||||||
|
|
Loading…
Reference in a new issue