File tree Expand file tree Collapse file tree 1 file changed +2
-1
lines changed
src/main/java/org/kitteh/irc/client/library/defaults Expand file tree Collapse file tree 1 file changed +2
-1
lines changed Original file line number Diff line number Diff line change 8787import javax .net .ssl .TrustManagerFactory ;
8888import java .net .InetAddress ;
8989import java .net .InetSocketAddress ;
90+ import java .nio .charset .StandardCharsets ;
9091import java .nio .file .Path ;
9192import java .util .ArrayList ;
9293import java .util .Collection ;
@@ -601,7 +602,7 @@ public void sendRawLineImmediately(@NonNull String message) {
601602
602603 private void sendRawLine (@ NonNull String message , boolean priority , boolean avoidDuplicates ) {
603604 Sanity .safeMessageCheck (message );
604- if (!message .isEmpty () && (message .length () > ((message .charAt (0 ) == '@' ) ? 1022 : 510 ))) {
605+ if (!message .isEmpty () && (message .getBytes ( StandardCharsets . UTF_8 ). length > ((( message .charAt (0 ) == '@' ) ? 4096 : 0 ) + 510 ))) {
605606 throw new IllegalArgumentException ("Message too long: " + message .length ());
606607 }
607608 synchronized (this .messageSendingLock ) {
You can’t perform that action at this time.
0 commit comments