cosmetic updates, fixed at LinksTitleHandler
This commit is contained in:
parent
a43e689a78
commit
1a9ee50874
2 changed files with 3 additions and 2 deletions
|
@ -186,7 +186,7 @@ public class SystemConsumer implements Runnable{
|
||||||
writerWorker.log(eventNum, message);
|
writerWorker.log(eventNum, message);
|
||||||
break;
|
break;
|
||||||
case "QUIT": // TODO: Do something?
|
case "QUIT": // TODO: Do something?
|
||||||
writerWorker.log(eventNum, message);
|
//writerWorker.log(eventNum, message);
|
||||||
break;
|
break;
|
||||||
case "375":
|
case "375":
|
||||||
writerWorker.log("MOTD Start:", message.replaceAll("^.+?:", ""));
|
writerWorker.log("MOTD Start:", message.replaceAll("^.+?:", ""));
|
||||||
|
|
|
@ -80,9 +80,10 @@ class LinksTitleHandler implements Runnable{
|
||||||
reader.close();
|
reader.close();
|
||||||
connection.disconnect();
|
connection.disconnect();
|
||||||
line = stringBuffer.toString();
|
line = stringBuffer.toString();
|
||||||
int from = line.indexOf("<title>")+7;
|
int from = line.indexOf("<title")+7;
|
||||||
int till = line.indexOf("</title>");
|
int till = line.indexOf("</title>");
|
||||||
String title = line.substring(from, till);
|
String title = line.substring(from, till);
|
||||||
|
title = title.substring(title.indexOf(">")+1);
|
||||||
|
|
||||||
if (title.length() > 510)
|
if (title.length() > 510)
|
||||||
title = title.substring(0, 510);
|
title = title.substring(0, 510);
|
||||||
|
|
Loading…
Reference in a new issue