Banned IP Match
Only ping once with the name of all associated banned players.reminder
parent
4cd9d12914
commit
c9d5546386
|
@ -268,10 +268,13 @@ class PluginAPI(View):
|
||||||
player.last_seen = timezone.now().strftime("%Y-%m-%d")
|
player.last_seen = timezone.now().strftime("%Y-%m-%d")
|
||||||
player.save()
|
player.save()
|
||||||
if new_player and ip.associated:
|
if new_player and ip.associated:
|
||||||
|
associated = []
|
||||||
for assoc in ip.associated:
|
for assoc in ip.associated:
|
||||||
if assoc.uuid is not player.uuid and assoc.is_banned:
|
if assoc.uuid is not player.uuid and assoc.is_banned:
|
||||||
mcm_api.plugin("staff", "Server {0}'s IP matches the banned player {1}".format(player.username, assoc.username))
|
associated.append(assoc)
|
||||||
mcm_api.discord_notification("{0}'s IP matches the banned player {1}".format(player.username, assoc.username), ping=True)
|
if associated:
|
||||||
|
mcm_api.plugin("staff", "Server {0}'s IP matches the banned player(s) {1}".format(player.username, ", ".join([assoc.username for assoc in associated])))
|
||||||
|
mcm_api.discord_notification("{0}'s IP matches the banned player(s) {1}".format(player.username, ", ".join([assoc.username for assoc in associated])), ping=True)
|
||||||
json['status'] = True
|
json['status'] = True
|
||||||
json['message'] = "Updated {0}".format(post['username'])
|
json['message'] = "Updated {0}".format(post['username'])
|
||||||
elif "register" == keyword:
|
elif "register" == keyword:
|
||||||
|
|
Loading…
Reference in New Issue