cosmetic updates, fixed at LinksTitleHandler

This commit is contained in:
Dmitry Isaenko 2020-11-05 19:21:35 +03:00
parent a43e689a78
commit 1a9ee50874
2 changed files with 3 additions and 2 deletions

View file

@ -186,7 +186,7 @@ public class SystemConsumer implements Runnable{
writerWorker.log(eventNum, message);
break;
case "QUIT": // TODO: Do something?
writerWorker.log(eventNum, message);
//writerWorker.log(eventNum, message);
break;
case "375":
writerWorker.log("MOTD Start:", message.replaceAll("^.+?:", ""));

View file

@ -80,9 +80,10 @@ class LinksTitleHandler implements Runnable{
reader.close();
connection.disconnect();
line = stringBuffer.toString();
int from = line.indexOf("<title>")+7;
int from = line.indexOf("<title")+7;
int till = line.indexOf("</title>");
String title = line.substring(from, till);
title = title.substring(title.indexOf(">")+1);
if (title.length() > 510)
title = title.substring(0, 510);