Permalink
Browse files

Fixed the fix of the say command handling (tested this time); also re…

…moved the extra API method since it proved not to work as intended.
  • Loading branch information...
CelticMinstrel committed Jul 16, 2011
1 parent 14dfd98 commit e6082d6216dd804199e00fb1272ac26c58a9eb3a
Showing with 7 additions and 27 deletions.
  1. +7 −27 com/ensifera/animosity/craftirc/CraftIRC.java
@@ -222,9 +222,12 @@ public boolean onCommand(CommandSender sender, Command command, String commandLa
RelayedMessage msg = this.newMsg(EndPoint.GAME, EndPoint.IRC);
msg.formatting = "chat";
msg.sender = "[CONSOLE]";
- msg.message = Util.combineSplit(1, args, " ");
- this.sendMessage(msg, null, "game-to-irc");
- this.getServer().broadcastMessage(ChatColor.LIGHT_PURPLE + "[Server] " + msg);
+ String message = Util.combineSplit(0, args, " ");
+ msg.message = message;
+ this.sendMessage(msg, null, "console");
+ // And replicate the default effect of the 'say' command...
+ this.getServer().broadcastMessage(ChatColor.LIGHT_PURPLE + "[Server] " + message);
+ sender.sendMessage("[CONSOLE] " + message);
}
} else
return false;
@@ -436,29 +439,6 @@ protected void sendMsgToTargetViaBot(String message, String target, int bot) {
* @param rawMessage
* @param tag
*/
- private void sendRawToBotViaTag(String rawMessage, String tag) {
- if (this.isDebug()) CraftIRC.log.info(String.format(CraftIRC.NAME + " sendRawToBot(tag=" + tag + ", message=" + rawMessage));
- //Minebot target = instances.get(bot);
- //target.sendRawLineViaQueue(message);
- }
- /**
- * CraftIRC API call - sendMessageToTag() Sends a message to an IRC tag
- * @param sender
- * (String) - The name of the message sender.
- *
- * @param message
- * (String) - The message string to send to IRC, this will pass
- * through CraftIRC formatter
- *
- * @param tag
- * (String) - The IRC target tag to receive the message
- */
- public void sendMessageToTag(String sender, String message, String tag) {
- RelayedMessage rm = newMsg(EndPoint.PLUGIN, EndPoint.IRC);
- rm.message = message;
- rm.sender = sender;
- this.sendMessage(rm, tag, null);
- }
/**
* CraftIRC API call - sendMessageToTag() Sends a message to an IRC tag
*
@@ -472,7 +452,7 @@ public void sendMessageToTag(String sender, String message, String tag) {
public void sendMessageToTag(String message, String tag) {
RelayedMessage rm = newMsg(EndPoint.PLUGIN, EndPoint.IRC);
rm.message = message;
- this.sendMessage(rm, tag, null);
+ this.sendMessage(rm, tag, "custom");
}
/** TODO: MAKE THIS

0 comments on commit e6082d6

Please sign in to comment.