mirror of https://notabug.org/acetone/ircabot.git
current server is first in list
parent
55416bd06c
commit
96819fd3ce
|
@ -617,8 +617,11 @@ void HttpServer::writeMainPage(QTcpSocket *socket, QString &urlPath, bool isHead
|
|||
} else {
|
||||
replaceTag(htmlServersSection, "ONLINE_STATUS", HTML_SERVER_OFFLINE_MARKER);
|
||||
}
|
||||
|
||||
htmlServersSectionS += htmlServersSection;
|
||||
if (s.first == originalServerName) {
|
||||
htmlServersSectionS.push_front(htmlServersSection);
|
||||
} else {
|
||||
htmlServersSectionS += htmlServersSection;
|
||||
}
|
||||
}
|
||||
replaceTag(page, "SERVERS_SECTION", htmlServersSectionS);
|
||||
|
||||
|
@ -1231,8 +1234,11 @@ void HttpServer::writeRealTimeChatPage(QTcpSocket *socket, QString &urlPath, boo
|
|||
} else {
|
||||
replaceTag(htmlServersSection, "ONLINE_STATUS", HTML_SERVER_OFFLINE_MARKER);
|
||||
}
|
||||
|
||||
htmlServersSectionS += htmlServersSection;
|
||||
if (s.first == originalServerName) {
|
||||
htmlServersSectionS.push_front(htmlServersSection);
|
||||
} else {
|
||||
htmlServersSectionS += htmlServersSection;
|
||||
}
|
||||
}
|
||||
replaceTag(page, "SERVERS_SECTION", htmlServersSectionS);
|
||||
|
||||
|
@ -1387,10 +1393,6 @@ void HttpServer::writeAboutServerPage(QTcpSocket *socket, QString &urlPath, bool
|
|||
}
|
||||
replaceTag(htmlServersSection, "ABOUT_SERVER", "/serverinformation/"+s.first);
|
||||
replaceTag(htmlServersSection, "SERVER_NAME", s.first);
|
||||
if (s.first == originalServerName) {
|
||||
htmlServersSection.replace("<span style=\"font-size: 17px;\">{{ONLINE_STATUS}}",
|
||||
"<span style=\"font-size: 17px;\" id=\"serverStatus\">{{ONLINE_STATUS}}");
|
||||
}
|
||||
|
||||
QString htmlChannelLineS;
|
||||
for (const auto &c: s.second) {
|
||||
|
@ -1419,8 +1421,11 @@ void HttpServer::writeAboutServerPage(QTcpSocket *socket, QString &urlPath, bool
|
|||
} else {
|
||||
replaceTag(htmlServersSection, "ONLINE_STATUS", HTML_SERVER_OFFLINE_MARKER);
|
||||
}
|
||||
|
||||
htmlServersSectionS += htmlServersSection;
|
||||
if (s.first == originalServerName) {
|
||||
htmlServersSectionS.push_front(htmlServersSection);
|
||||
} else {
|
||||
htmlServersSectionS += htmlServersSection;
|
||||
}
|
||||
}
|
||||
replaceTag(page, "SERVERS_SECTION", htmlServersSectionS);
|
||||
page.remove(QRegularExpression("<div class=\"main_header\">.*<!-- main_middle -->", QRegularExpression::DotMatchesEverythingOption));
|
||||
|
|
Loading…
Reference in New Issue