This commit is contained in:
Dmitry Isaenko 2020-11-01 19:49:58 +03:00
parent 0197f00250
commit 4340038a91
3 changed files with 5 additions and 5 deletions

View file

@ -55,7 +55,7 @@ public class BotStart {
final Option configurationOption = Option.builder("c") final Option configurationOption = Option.builder("c")
.longOpt("configuration") .longOpt("configuration")
.desc("Start with configuration") .desc("Start with configuration")
.hasArg(true) .hasArgs()
.build(); .build();
final Option generateOption = Option.builder("g") final Option generateOption = Option.builder("g")

View file

@ -39,7 +39,6 @@ public class CTCPHelper {
public void handleCtcpReply(String serverReplied, String whoReplied, String whatReplied){ public void handleCtcpReply(String serverReplied, String whoReplied, String whatReplied){
LocalDateTime currentTime = LocalDateTime.now(); LocalDateTime currentTime = LocalDateTime.now();
if (! waitersQueue.containsKey(serverReplied)) if (! waitersQueue.containsKey(serverReplied))
return; return;

View file

@ -12,11 +12,12 @@ public class StreamProvider {
public static synchronized void writeToStream(String server, String message){ public static synchronized void writeToStream(String server, String message){
try { try {
if (message.matches("(^.+?\\s)INNA")) {
SystemConsumer.getSystemConsumer(server).add("INNA "+message);
return;
}
srvStreamMap.get(server).write(message+"\n"); srvStreamMap.get(server).write(message+"\n");
srvStreamMap.get(server).flush(); srvStreamMap.get(server).flush();
if (message.startsWith("PRIVMSG ")) {
SystemConsumer.getSystemConsumer(server).add("INNA "+message);
}
} catch (IOException e){ } catch (IOException e){
System.out.println("Internal issue: StreamProvider->writeToStream() caused I/O exception:\n\t"+e.getMessage()); System.out.println("Internal issue: StreamProvider->writeToStream() caused I/O exception:\n\t"+e.getMessage());
} }