mirror of https://notabug.org/acetone/ircabot.git
real time mode url edited
parent
78c6a24355
commit
804b4714cf
|
@ -257,7 +257,7 @@ void HttpServer::reader()
|
|||
else if (urlPath.startsWith("/ajax/")) {
|
||||
writeAjaxAnswer(socket, urlPath, isHeadRequest);
|
||||
}
|
||||
else if (urlPath.startsWith("/realtime/")) {
|
||||
else if (urlPath.startsWith("/realtimereadingchat/")) {
|
||||
writeRealTimeChatPage(socket, urlPath, isHeadRequest);
|
||||
}
|
||||
// plaint dynamic page
|
||||
|
@ -627,7 +627,7 @@ void HttpServer::writeMainPage(QTcpSocket *socket, QString &urlPath, bool isHead
|
|||
|
||||
replaceTag(page, "CHANNEL_TOPIC", m_channelsTopic[originalServerName][originalChannelName].replace('\"', """));
|
||||
replaceTag(page, "MAIN_HEADER", originalChannelName);
|
||||
replaceTag(page, "REALTIME_LINK", "/realtime/"+server+"/"+channel);
|
||||
replaceTag(page, "REALTIME_LINK", "/realtimereadingchat/"+server+"/"+channel);
|
||||
replaceTag(page, "AIRPLAIN_TITLE", "Real time reading");
|
||||
|
||||
QString middlePath = "<a style=\"text-decoration: none\" href=\"/"+server+"/"+channel+"\">" + "/" + "</a>";
|
||||
|
@ -1128,7 +1128,7 @@ void HttpServer::writeRealTimeChatPage(QTcpSocket *socket, QString &urlPath, boo
|
|||
|
||||
auto renderStart = QDateTime::currentMSecsSinceEpoch();
|
||||
|
||||
urlPath.remove(QRegularExpression("^/realtime/"));
|
||||
urlPath.remove(QRegularExpression("^/realtimereadingchat/"));
|
||||
QString server = getWordFromPath(urlPath);
|
||||
if (server.isEmpty()) {
|
||||
writeErrorPage(socket, "SERVER VALUE IS MISSING");
|
||||
|
@ -1207,7 +1207,7 @@ void HttpServer::writeRealTimeChatPage(QTcpSocket *socket, QString &urlPath, boo
|
|||
|
||||
QString channelNameForUrl {c.first};
|
||||
channelNameForUrl.remove('#');
|
||||
QString channelLink = "/realtime/" + global::toLowerAndNoSpaces(s.first) + "/" + channelNameForUrl;
|
||||
QString channelLink = "/realtimereadingchat/" + global::toLowerAndNoSpaces(s.first) + "/" + channelNameForUrl;
|
||||
replaceTag(htmlChannelLine, "CHANNEL_LINK", channelLink);
|
||||
|
||||
htmlChannelLineS += htmlChannelLine;
|
||||
|
|
Loading…
Reference in New Issue