Skip to content

Commit 4c8c5c8

Browse files
committed
Add PM check for rmpoint too
1 parent 561ad81 commit 4c8c5c8

1 file changed

Lines changed: 4 additions & 0 deletions

File tree

plugins/karma.py

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -65,6 +65,10 @@ def re_addpt(match, nick, chan, db, conn, notice):
6565
@hook.command("mm", "rmpoint")
6666
def rmpoint(text, nick, chan, db, conn):
6767
"""<thing> - subtracts a point from the <thing>"""
68+
if nick.casefold() == chan.casefold():
69+
# This is a PM, don't set points in a PM
70+
return
71+
6872
text = text.strip()
6973
karma = db.execute("select score from karma where name = :name and chan = :chan and thing = :thing", {'name': nick, 'chan': chan, 'thing': text.lower()}).fetchone()
7074
if karma:

0 commit comments

Comments
 (0)