diff options
Diffstat (limited to 'src/Server')
-rw-r--r-- | src/Server/CommandsTable.java | 2 | ||||
-rw-r--r-- | src/Server/Connection.java | 8 |
2 files changed, 9 insertions, 1 deletions
diff --git a/src/Server/CommandsTable.java b/src/Server/CommandsTable.java index af423ea..f0152e2 100644 --- a/src/Server/CommandsTable.java +++ b/src/Server/CommandsTable.java @@ -80,7 +80,7 @@ class CommandPrivmsg extends Command { Connection con = iter.next(); ports += con.toString(); - this.println(client, "PRIVMSG #fixme-chan :" + line); + this.println(con.getClient(), "PRIVMSG #fixme-chan :" + line); } System.err.println("printed message to ports: " + ports); } diff --git a/src/Server/Connection.java b/src/Server/Connection.java index 92869f1..cdb02b8 100644 --- a/src/Server/Connection.java +++ b/src/Server/Connection.java @@ -48,8 +48,16 @@ public class Connection extends Thread this.soc = soc; } + public Client getClient() + { + return this.client; + } + public void shutdown() { + + ChatServer.server.connectionRemove(this); + try { if (!soc.isClosed()) |