Skip to content

Commit

Permalink
Partly completes #71 and allows server admins to change 'Left the ser…
Browse files Browse the repository at this point in the history
…ver'

Eventually when #82 is done (which will require custom console checks) we will also have msgDisconnectEndOfStream, msgDisconnectTimeout, msgDisconnectOverflow and msgDisconnectGenericReason
  • Loading branch information
WizardCM committed Jul 31, 2013
1 parent b3b2c71 commit ca2c3d7
Show file tree
Hide file tree
Showing 2 changed files with 5 additions and 2 deletions.
5 changes: 3 additions & 2 deletions src/com/Jdbye/BukkitIRCd/IRCd.java
Original file line number Diff line number Diff line change
Expand Up @@ -130,6 +130,7 @@ public class IRCd implements Runnable {
public static String msgIRCMessageDynmap = "<{User}> {Message}";
public static String msgIRCNoticeDynmap = "-{User}- {Message}";
public static String msgDynmapMessage = "[Dynmap] {User}: {Message}";
public static String msgDisconnectQuitting = "Left the server";
public static String msgPlayerList = "^BOnline Players ({Count}):^B {Users}";

public static final long serverStartTime = System.currentTimeMillis() / 1000L;
Expand Down Expand Up @@ -1938,9 +1939,9 @@ public static boolean removeBukkitUser(int ID) {
BukkitPlayer bp = bukkitPlayers.get(ID);
if (mode == Modes.STANDALONE) {
writeAll(":" + bp.nick + Config.getIrcdIngameSuffix() + "!" + bp.nick + "@"
+ bp.host + " QUIT :Left the server");
+ bp.host + " QUIT :" + msgDisconnectQuitting);
} else if (mode == Modes.INSPIRCD) {
println(":" + bp.getUID() + " QUIT :Left the server");
println(":" + bp.getUID() + " QUIT :" + msgDisconnectQuitting);
}
bukkitPlayers.remove(ID);
return true;
Expand Down
2 changes: 2 additions & 0 deletions src/com/Jdbye/BukkitIRCd/configuration/Messages.java
Original file line number Diff line number Diff line change
Expand Up @@ -78,6 +78,7 @@ public static void loadMessages(IRCd ircd) {
IRCd.msgIRCNoticeDynmap = messages.getString("irc-notice-dynmap", IRCd.msgIRCNoticeDynmap);

IRCd.msgDynmapMessage = messages.getString("dynmap-message", IRCd.msgDynmapMessage);
IRCd.msgDisconnectQuitting = messages.getString("leave", IRCd.msgDisconnectQuitting);
IRCd.msgPlayerList = messages.getString("player-list", IRCd.msgPlayerList);

IRCd.consoleFilters = messages.getStringList("console-filters");
Expand Down Expand Up @@ -115,6 +116,7 @@ public static void loadMessages(IRCd ircd) {
IRCd.msgIRCMessageDynmap = BukkitIRCdPlugin.colorize(IRCd.msgIRCMessageDynmap);
IRCd.msgIRCNoticeDynmap = BukkitIRCdPlugin.colorize(IRCd.msgIRCNoticeDynmap);
IRCd.msgDynmapMessage = BukkitIRCdPlugin.colorize(IRCd.msgDynmapMessage);
IRCd.msgDisconnectQuitting = BukkitIRCdPlugin.colorize(IRCd.msgDisconnectQuitting);
IRCd.msgPlayerList = BukkitIRCdPlugin.colorize(IRCd.msgPlayerList);

BukkitIRCdPlugin.log.info("[BukkitIRCd] Loaded messages file." + (Config.isDebugModeEnabled() ? " Code BukkitIRCdPlugin464." : ""));
Expand Down

0 comments on commit ca2c3d7

Please sign in to comment.