It can be useful to use a trigger to cause a player to drop since if you just use defeat, players with hacks can remain in the game indefinitely and annoy/spam/lag/etc you. There are many ways to do this, but I will demonstrate one basic way (if you are reading this and know a simpler way, let me know).
display "B A N N E D" to the banned player 11+ times to fill their text screen completely
use the defeat trigger, and other optional things like killing all their units
use EUD to detect the B A N N E D text, then add 1 ore to all players. (Memory(186879, exactly, 541139010) in scmdraft2)
Some things to note about this. "B A N N E D" is chosen because the text only bothers to check the first 4 characters, "B A " which cannot be accidentally seen since no battle.net username can start with "B ". This will cause defeat and drop to the banned player. Even though triggers are not run for defeated players, that players computer still processes triggers for the other players, it will be the other players triggers that run +1 ore (but only from the banned player's perspective). This player will then drop because starcraft checks sync (one of many ways) by comparing resources. The "B A N N E D" message needs to be displayed 11+ times to ensure that it is on at least the one line that the text detection checks. You could ofcourse use different text and only display it once, but you would need more triggers to detect it.
Below are some triggers that implement this that you can just copy exactly and will work (if you change the force names). Note that these triggers are for team games (where you would normally not unally a player). Since banning is initiated by the host unallying a player (it actually does this for the first trigger player, but you could change this so it is only a certain player, remove 2nd trigger and run 3rd only for 1 player). You could also switch this to use a voting system or a more tradition unit at location banning. It also displays to all other players why the player has dropped.
Trigger("players"){
Conditions:
Deaths("players", "Jump Gate", at most, 0);
Actions:
Set Deaths("current player", "Jump Gate", set to, 1);
}
Trigger("players"){
Conditions:
Deaths("current player", "Jump Gate", at least, 1);
Actions:
Preserve Trigger();
Set Deaths("Foes", "Independent Starport", set to, 1);
}
Trigger("players"){
Conditions:
Deaths("current player", "Independent Starport", at least, 1);
Actions:
Display Text Message(always display, "B A N N E D");
Display Text Message(always display, "B A N N E D");
Display Text Message(always display, "B A N N E D");
Display Text Message(always display, "B A N N E D");
Display Text Message(always display, "B A N N E D");
Display Text Message(always display, "B A N N E D");
Display Text Message(always display, "B A N N E D");
Display Text Message(always display, "B A N N E D");
Display Text Message(always display, "B A N N E D");
Display Text Message(always display, "B A N N E D");
Display Text Message(always display, "B A N N E D");
Display Text Message(always display, "B A N N E D");
Display Text Message(always display, "B A N N E D");
Kill Unit("current player", "any unit");
Set Deaths("all players", "Independent Command Center", add, 1);
Set Deaths("current player", "Independent Command Center", subtract, 1);
Defeat();
}
Trigger("players"){
Conditions:
Deaths("current player", "Independent Command Center", at least, 1);
Actions:
Set Deaths("current player", "Independent Command Center", subtract, 1);
Display Text Message(always display, "<4>player banned, reason: host doesn't like you");
preserve trigger();
}
Trigger("players"){
Conditions:
Memory(186879, exactly, 541139010);
Actions:
Set Resources("current player", add, 1, ore);
}
None.