diff options
-rw-r--r-- | src/Server/Client.java | 6 | ||||
-rw-r--r-- | src/Server/CommandsTable.java | 5 |
2 files changed, 11 insertions, 0 deletions
diff --git a/src/Server/Client.java b/src/Server/Client.java index 315c363..73e5b3d 100644 --- a/src/Server/Client.java +++ b/src/Server/Client.java @@ -18,6 +18,12 @@ public class Client this.output = output; this.con = con; } + /** returning if an Connection is my'n */ + public boolean IfMyCon (Connection con) + { + return con == this.con; + } + /** returning the nick name */ public String getNick() { diff --git a/src/Server/CommandsTable.java b/src/Server/CommandsTable.java index ead56d9..d9b4110 100644 --- a/src/Server/CommandsTable.java +++ b/src/Server/CommandsTable.java @@ -79,6 +79,11 @@ class CommandPrivmsg extends Command while (iter.hasNext()) { Connection con = iter.next(); + + if (client.IfMyCon(con)) + { + continue; + } ports += con.toString(); this.println(con.getClient(), "PRIVMSG " + starr[0] + " :" + line); } |