forked from MarseyWorld/MarseyWorld
a much better approach to last commit
parent
ee6c0f9a6f
commit
9e147029d5
|
@ -156,11 +156,7 @@ def NOTIFY_USERS(text, v, oldtext=None, ghost=False, log_cost=None, followers_pi
|
||||||
cost = 0
|
cost = 0
|
||||||
coin_receivers = set()
|
coin_receivers = set()
|
||||||
|
|
||||||
groups = group_mention_regex.finditer(text)
|
for i in group_mention_regex.finditer(text):
|
||||||
if len(list(groups)) > 5:
|
|
||||||
abort(403, "You can only ping a maximum of 5 ping groups!")
|
|
||||||
|
|
||||||
for i in groups:
|
|
||||||
if oldtext and i.group(1) in oldtext:
|
if oldtext and i.group(1) in oldtext:
|
||||||
continue
|
continue
|
||||||
|
|
||||||
|
@ -212,6 +208,9 @@ def NOTIFY_USERS(text, v, oldtext=None, ghost=False, log_cost=None, followers_pi
|
||||||
if SITE == 'rdrama.net' and v.id in {256, 9287, 10489, 18701}:
|
if SITE == 'rdrama.net' and v.id in {256, 9287, 10489, 18701}:
|
||||||
notify_users.discard(AEVANN_ID)
|
notify_users.discard(AEVANN_ID)
|
||||||
|
|
||||||
|
if len(notify_users) > 200:
|
||||||
|
abort(403, "You can only notify a maximum of 200 users.")
|
||||||
|
|
||||||
return notify_users - BOT_IDs - {v.id, 0} - v.all_twoway_blocks
|
return notify_users - BOT_IDs - {v.id, 0} - v.all_twoway_blocks
|
||||||
|
|
||||||
|
|
||||||
|
|
Loading…
Reference in New Issue