mirror of https://notabug.org/acetone/ircabot.git
realtimereadingchat url changed
parent
4e72961c05
commit
4bbc155ce1
|
@ -327,7 +327,7 @@ void HttpServer::reader()
|
|||
writeAjaxAnswer(socket, urlPath, isHeadRequest);
|
||||
}
|
||||
}
|
||||
else if (urlPath.startsWith("/realtimereadingchat/")) {
|
||||
else if (urlPath.startsWith("/~realtime/")) {
|
||||
if (m_ajaxIsDisabled) {
|
||||
writeErrorPage(socket, "DISABLED"
|
||||
"<p>No JS, no AJAX, no real time reading!</p>");
|
||||
|
@ -860,7 +860,7 @@ void HttpServer::writeRegularPage(QTcpSocket *socket, QString &urlPath, bool isH
|
|||
page.remove("<a href=\"{{REALTIME_LINK}}\" title=\"{{AIRPLAIN_TITLE}}\" class=\"main_header__title_airplaine\"></a>");
|
||||
}
|
||||
else {
|
||||
replaceTag(page, "REALTIME_LINK", "/realtimereadingchat/"+server+"/"+channel);
|
||||
replaceTag(page, "REALTIME_LINK", "/~realtime/"+server+"/"+channel);
|
||||
replaceTag(page, "AIRPLAIN_TITLE", "Read in real time");
|
||||
}
|
||||
|
||||
|
@ -1663,7 +1663,7 @@ void HttpServer::writeRealTimeChatPage(QTcpSocket *socket, QString &urlPath, boo
|
|||
|
||||
auto renderStart = QDateTime::currentMSecsSinceEpoch();
|
||||
|
||||
urlPath.remove(QRegularExpression("^/realtimereadingchat/"));
|
||||
urlPath.remove(QRegularExpression("^/~realtime/"));
|
||||
QString server = getWordFromPath(urlPath);
|
||||
if (server.isEmpty()) {
|
||||
writeErrorPage(socket, "SERVER VALUE IS MISSING");
|
||||
|
@ -1743,7 +1743,7 @@ void HttpServer::writeRealTimeChatPage(QTcpSocket *socket, QString &urlPath, boo
|
|||
|
||||
QString channelNameForUrl {c.first};
|
||||
channelNameForUrl.remove('#');
|
||||
QString channelLink = "/realtimereadingchat/" + global::toLowerAndNoSpaces(s.first) + "/" + channelNameForUrl;
|
||||
QString channelLink = "/~realtime/" + global::toLowerAndNoSpaces(s.first) + "/" + channelNameForUrl;
|
||||
replaceTag(htmlChannelLine, "CHANNEL_LINK", channelLink);
|
||||
|
||||
htmlChannelLineS += htmlChannelLine;
|
||||
|
|
Loading…
Reference in New Issue