Skip to content

Commit 12556b2

Browse files
committed
Prepend the caller's nick in the .cah and .cahb commands to avoid exploits
1 parent 721b260 commit 12556b2

1 file changed

Lines changed: 3 additions & 3 deletions

File tree

plugins/gnomeagainsthumanity.py

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -15,12 +15,12 @@ def shuffle_deck(bot):
1515
gnomecards = json.load(f)
1616

1717

18-
18+
1919
@hook.command('cah')
2020
def CAHwhitecard(text, message):
2121
'''Submit text to be used as a CAH whitecard'''
2222
CardText = text.strip()
23-
message(random.choice(gnomecards['black']).format(text))
23+
return random.choice(gnomecards['black']).format(text)
2424

2525

2626
@hook.command('cahb')
@@ -32,4 +32,4 @@ def blankfiller(matchobj):
3232
return random.choice(gnomecards['white'])
3333

3434
out = re.sub(r'_', blankfiller, CardText)
35-
message(out)
35+
return out

0 commit comments

Comments
 (0)