Listen for joins and leaves on IRC and broadcast them to minecraft
This commit is contained in:
parent
26b0263459
commit
f009c8fb62
|
@ -62,8 +62,14 @@ public class Bot {
|
|||
Bukkit.broadcastMessage(ChatColor.BLUE + "[IRC] <" + user + "> " + ChatColor.WHITE + message);
|
||||
} else if (line.contains("PING")) {
|
||||
chat.sendToServer(bw, line.replaceFirst("I", "O"));
|
||||
} else if (line.contains("JOIN")) {
|
||||
String user = line.substring(1, line.indexOf("!"));
|
||||
|
||||
hasRespondedToFirstPing = true;
|
||||
Bukkit.broadcastMessage(ChatColor.YELLOW + "" + ChatColor.ITALIC + "[IRC] " + user + " has joined the channel");
|
||||
} else if (line.contains("QUIT") || line.contains("PART")) {
|
||||
String user = line.substring(1, line.indexOf("!"));
|
||||
|
||||
Bukkit.broadcastMessage(ChatColor.RED + "" + ChatColor.ITALIC + "[IRC] " + user + " has left the channel");
|
||||
}
|
||||
|
||||
// This will join the channel once and then not again
|
||||
|
|
Loading…
Reference in a new issue