Date: 2016/01/15 17:21:32 UTC-08:00
Type: Denizen Script
seenalts:
type: world
events:
on player logs in:
- wait 1t
- define IP <context.hostname.after[/].replace[.].with[_]>
- flag server <def[IP]>:->:<player>
- flag <player> seen-ip:<def[IP]>
- if <server.flag[<def[IP]>].as_list.filter[is_banned].size> != 0 {
- narrate "<&c><player.name><&r> has joined from an IP shared with banned players!" targets:<server.list_online_players.filter[has_permission[my.permission.node].global]>
}
on seenalts command:
- if <player.has_permission[my.permission.node].not> {
- narrate "<&c>You do not have the permission to do this."
- determine fulfilled
}
- if <context.args.size> != 1 {
- narrate "<&c>You must enter one argument only!"
- determine fulfilled
}
- define player <server.match_offline_player[<context.args.get[1]>]||null>
- if <def[player]> == null {
- narrate "<&c>No player found by that name!"
- determine fulfilled
}
- narrate "<&c>Accounts from the same IP address<&co> <server.flag[<def[Player].flag[seen-ip]||null>].as_list.formatted||Nobody>"
- determine fulfilled