Edit: Ah, after looking at the scripts, it looks like this is more complicated than I'd thought. There's no way (with scripts, at least) to obtain lists of players in an area, as all the waitingrooms are on the same map.
An easy alternative is to check when a player warps to bat_room if a dual-client is on any Battlegrounds map (either a match or bat_room), and kick them appropriately. That script you would only need to add once:
- script BG_Check_IP -1,{
OnInit:
setmapflag "bat_room", mf_loadevent;
end;
// Trigger when a player enters a map with "loadevent" mapflag.
OnPCLoadMapEvent:
// Only run for map "bat_room".
if (strcharinfo(3) != "bat_room") end;
// Get list of accounts with attached character's IP address.
set .@size, query_sql("SELECT `account_id` FROM `login` WHERE `last_ip` = '"+getcharip()+"'",.@aid);
// Passed check if only the attached player is returned.
if (.@size < 2) end;
// Check all online characters using the IP address if they are on a Battlegrounds map.
set .@self, getcharid(3);
for(set .@i,0; .@i<.@size; set .@i,.@i+1) {
if (.@aid[.@i] == .@self)
continue;
if (attachrid(.@aid[.@i])) {
if (compare(strcharinfo(3),"bat_")) {
set .@name$, strcharinfo(0);
attachrid(.@self);
message strcharinfo(0),"Character "+.@name$+" is already logged into Battlegrounds with your IP.";
sleep2 2000;
warp "SavePoint",0,0;
end;
}
}
}
// Passed check.
end;
}