summaryrefslogtreecommitdiff
path: root/NET/worlds/network/whisperCmd.java
diff options
context:
space:
mode:
Diffstat (limited to 'NET/worlds/network/whisperCmd.java')
-rw-r--r--NET/worlds/network/whisperCmd.java125
1 files changed, 125 insertions, 0 deletions
diff --git a/NET/worlds/network/whisperCmd.java b/NET/worlds/network/whisperCmd.java
new file mode 100644
index 0000000..20fe839
--- /dev/null
+++ b/NET/worlds/network/whisperCmd.java
@@ -0,0 +1,125 @@
+/* */ package NET.worlds.network;
+/* */
+/* */ import NET.worlds.console.Console;
+/* */ import NET.worlds.console.FriendsListPart;
+/* */ import NET.worlds.console.MuteListPart;
+/* */ import NET.worlds.scape.WorldScriptManager;
+/* */ import java.text.MessageFormat;
+/* */
+/* */
+/* */
+/* */
+/* */
+/* */
+/* */
+/* */
+/* */
+/* */
+/* */
+/* */
+/* */
+/* */
+/* */
+/* */
+/* */
+/* */
+/* */
+/* */
+/* */
+/* */
+/* */
+/* */
+/* */
+/* */
+/* */
+/* */
+/* */
+/* */
+/* */
+/* */
+/* */
+/* */
+/* */
+/* */
+/* */
+/* */
+/* */
+/* */
+/* */
+/* */
+/* */
+/* */ public class whisperCmd
+/* */ extends textCmd
+/* */ {
+/* */ public static final byte WHISPERCMD = 17;
+/* */
+/* */ public whisperCmd()
+/* */ {
+/* 58 */ this._commandType = 17;
+/* */ }
+/* */
+/* */ public whisperCmd(String who, String text) {
+/* 62 */ super(text);
+/* */
+/* 64 */ WorldScriptManager.getInstance().onConversation(who, text);
+/* */
+/* 66 */ this._commandType = 17;
+/* 67 */ this._objID = new ObjID(who);
+/* */ }
+/* */
+/* 70 */ private static String rejectMsg = Console.message("not-whispers");
+/* */
+/* */ void process(WorldServer _serv) throws Exception
+/* */ {
+/* */ String name;
+/* */ String name;
+/* 76 */ if (this._senderID.longID() == null) {
+/* 77 */ Object[] arguments = { new String(String.valueOf(this._senderID
+/* 78 */ .shortID())) };
+/* 79 */ name = MessageFormat.format(Console.message("Unknown-Name"),
+/* 80 */ arguments);
+/* */ } else {
+/* 82 */ name = this._senderID.longID();
+/* 83 */ if (MuteListPart.isMuted(_serv, name)) {
+/* */ try {
+/* 85 */ _serv.sendNetworkMsg(new whisperCmd(name,
+/* 86 */ Console.message("have-you-muted")));
+/* */ }
+/* */ catch (InfiniteWaitException localInfiniteWaitException) {}catch (PacketTooLargeException localPacketTooLargeException) {}
+/* */
+/* 90 */ return;
+/* */ }
+/* 92 */ if ((!this._text.startsWith("&|+")) && (MuteListPart.isRejecting(_serv))) {
+/* */ try {
+/* 94 */ if (!this._text.equals(rejectMsg)) {
+/* 95 */ Object[] arguments = { new String(name) };
+/* 96 */ Console.println(MessageFormat.format(
+/* 97 */ Console.message("You-rejected"), arguments));
+/* 98 */ _serv.sendNetworkMsg(new whisperCmd(name, rejectMsg));
+/* */ }
+/* */ }
+/* */ catch (InfiniteWaitException localInfiniteWaitException1) {}catch (PacketTooLargeException localPacketTooLargeException1) {}
+/* */
+/* 103 */ return;
+/* */ }
+/* */ }
+/* */
+/* 107 */ FriendsListPart.processWhisper(_serv, name, this._text);
+/* 108 */ handleActionText(_serv, this._text, name, this._senderID);
+/* */
+/* 110 */ Console.printWhisper(name, FilthFilter.get().filter(this._text));
+/* */ }
+/* */
+/* */
+/* */ public String toString(WorldServer serv)
+/* */ {
+/* 116 */ return
+/* 117 */ Console.message("WHISPER") + " " + this._senderID.toString(serv) + " --> " + this._objID.toString(serv) + ": " + this._text;
+/* */ }
+/* */ }
+
+
+/* Location: C:\Program Files (x86)\Worlds Inc\WorldsPlayer - Win7\lib\worlds.jar!\NET\worlds\network\whisperCmd.class
+ * Java compiler version: 6 (50.0)
+ * JD-Core Version: 0.7.1
+ */ \ No newline at end of file