From 0f6567d5b78218fd4a1a62f2452d22643d52080e Mon Sep 17 00:00:00 2001 From: Dor Bivas Date: Sat, 29 Mar 2014 21:54:10 +0300 Subject: Client: do join the channel automatically. --- src/Client/ChatClient.java | 9 ++++----- 1 file changed, 4 insertions(+), 5 deletions(-) diff --git a/src/Client/ChatClient.java b/src/Client/ChatClient.java index fe70742..283e983 100644 --- a/src/Client/ChatClient.java +++ b/src/Client/ChatClient.java @@ -57,7 +57,6 @@ public class ChatClient { if (!this.isConnected) return; - writer.sendLine(line); } @@ -67,7 +66,7 @@ public class ChatClient writer.sendLine(line); } - /** if the line is special command privmsg will handle it, else it will send the lien as a privmsg. + /** if the line is special command privmsg will handle it, else it will send the line as a privmsg. * @param the line.*/ public void PRIVMSG (String line) { @@ -82,10 +81,9 @@ public class ChatClient ui.Clear(); } - else { - runSendline("PRIVMSG " + this.CHANNEL + " :" + line); + runSendline("PRIVMSG " + ChatClient.CHANNEL + " :" + line); } } @@ -106,8 +104,9 @@ public class ChatClient public void joinChannel() { // 0: mode (nothing special). *: unused in RFC 2812, server name in RFC 1459 - runSendline("JOIN " + this.CHANNEL); this.setConnected(); // FIXME: Not sure yet if client is connected. + runSendline("JOIN " + ChatClient.CHANNEL); + } /** closing the socket*/ -- cgit v1.2.3