summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorDor Bivas <dor1_b@walla.com>2014-02-22 15:29:58 +0200
committerDor Bivas <dor1_b@walla.com>2014-02-22 15:29:58 +0200
commite58055c60609dd1b7b9f7ac38d7ecad1d0d9af76 (patch)
tree3329110b1b173d6b1e3f907081c4d97ac059c35b
parent53cbbd63a01904b7ccb4a092e8e3b03d32cd2155 (diff)
Client clear command
-rw-r--r--src/Client/ChatClient.java10
1 files changed, 9 insertions, 1 deletions
diff --git a/src/Client/ChatClient.java b/src/Client/ChatClient.java
index 6d22d58..679d51c 100644
--- a/src/Client/ChatClient.java
+++ b/src/Client/ChatClient.java
@@ -10,6 +10,7 @@ import java.net.Socket;
+
import Server.ChatServer;
import Server.Client;
@@ -73,11 +74,18 @@ public class ChatClient
/** */
public void PRIVMSG (String line)
{
- if ((line.length() >= 7) && (line.substring(0,7)).equals(new String("/QUOTE ")))
+ String[] words = line.split("[ \t]", 2);
+ if (words[0].equalsIgnoreCase("/QUOTE"))
{
runSendline(line.substring(7, line.length()));
}
+ else if(words[0].equalsIgnoreCase("/CLEAR"))
+ {
+ ui.Clear();
+ }
+
+
else
{
runSendline("PRIVMSG " + this.CHANNEL + " :" + line);