forked from rDrama/rDrama
process_poll_options -> process_options
parent
28d55c1429
commit
d4d4afe866
|
@ -605,7 +605,7 @@ def execute_lawlz_actions(v, p):
|
||||||
g.db.add(ma_3)
|
g.db.add(ma_3)
|
||||||
|
|
||||||
|
|
||||||
def process_poll_options(v, target):
|
def process_options(v, target):
|
||||||
|
|
||||||
patterns = [(poll_regex, 0), (choice_regex, 1)]
|
patterns = [(poll_regex, 0), (choice_regex, 1)]
|
||||||
|
|
||||||
|
|
|
@ -302,7 +302,7 @@ def comment(v):
|
||||||
g.db.add(c)
|
g.db.add(c)
|
||||||
g.db.flush()
|
g.db.flush()
|
||||||
|
|
||||||
process_poll_options(v, c)
|
process_options(v, c)
|
||||||
|
|
||||||
execute_blackjack(v, c, c.body, "comment")
|
execute_blackjack(v, c, c.body, "comment")
|
||||||
execute_under_siege(v, c, c.body, "comment")
|
execute_under_siege(v, c, c.body, "comment")
|
||||||
|
@ -693,7 +693,7 @@ def edit_comment(cid, v):
|
||||||
if not complies_with_chud(c):
|
if not complies_with_chud(c):
|
||||||
abort(403, f'You have to include "{c.author.chud_phrase}" in your comment!')
|
abort(403, f'You have to include "{c.author.chud_phrase}" in your comment!')
|
||||||
|
|
||||||
process_poll_options(v, c)
|
process_options(v, c)
|
||||||
|
|
||||||
if v.id == c.author_id:
|
if v.id == c.author_id:
|
||||||
if int(time.time()) - c.created_utc > 60 * 3:
|
if int(time.time()) - c.created_utc > 60 * 3:
|
||||||
|
|
|
@ -593,7 +593,7 @@ def submit_post(v, hole=None):
|
||||||
|
|
||||||
execute_under_siege(v, p, p.body, 'post')
|
execute_under_siege(v, p, p.body, 'post')
|
||||||
|
|
||||||
process_poll_options(v, p)
|
process_options(v, p)
|
||||||
|
|
||||||
for text in {p.body, p.title, p.url}:
|
for text in {p.body, p.title, p.url}:
|
||||||
if execute_blackjack(v, p, text, 'post'): break
|
if execute_blackjack(v, p, text, 'post'): break
|
||||||
|
@ -1042,7 +1042,7 @@ def edit_post(pid, v):
|
||||||
|
|
||||||
p.body_html = body_html
|
p.body_html = body_html
|
||||||
|
|
||||||
process_poll_options(v, p)
|
process_options(v, p)
|
||||||
|
|
||||||
gevent.spawn(postprocess_post, p.url, p.body, p.body_html, p.id, False, True)
|
gevent.spawn(postprocess_post, p.url, p.body, p.body_html, p.id, False, True)
|
||||||
|
|
||||||
|
|
Loading…
Reference in New Issue