Signed-off-by: Jérôme Benoit <jerome.benoit@piment-noir.org>
e.printStackTrace();
}
String mess = (String)sendMessages.remove(0);
+ if (mess.length() == 0)
+ return "";
System.out.println("IHM -> message a envoyer : " + mess);
return randName + "> " + mess;
}
if (line.equals(".")) {
end = true;
}
- client.sendMsg(line);
- System.out.println(Thread.currentThread().getName() + " a envoye " + line);
+ if (line.length() != 0) {
+ client.sendMsg(line);
+ System.out.println(Thread.currentThread().getName() + " a envoye " + line);
+ }
}
}
catch (Exception e) {
if (line.equals(".")) {
end = true;
}
- client.sendMsg(line);
- System.out.println(Thread.currentThread().getName() + " a envoye " + line);
+ if (line.length() != 0) {
+ client.sendMsg(line);
+ System.out.println(Thread.currentThread().getName() + " a envoye " + line);
+ }
}
}
catch (IOException e) {
if (line.equals(".")) {
end = true;
}
- Message oMsg = new Message(randName, line, Calendar.getInstance());
- client.sendoMsg(oMsg);
- System.out.println(Thread.currentThread().getName() + " a envoye " + oMsg);
+ if (line.length() != 0) {
+ Message oMsg = new Message(randName, line, Calendar.getInstance());
+ client.sendoMsg(oMsg);
+ System.out.println(Thread.currentThread().getName() + " a envoye " + oMsg);
+ }
}
}
catch (IOException e) {