mirror of
https://github.com/znc/znc.git
synced 2026-08-08 01:43:03 +02:00
Merge some work by Jens-Andre Koch
Only his changes to the core are presented here. Unfortunately, the skin itself looks ugly on Opera, and simply doesn't work on Firefox... Merge branch 'master' into znc-ation Conflicts: modules/data/lastseen/tmpl/lastseen_WebadminUser.tmpl modules/data/webadmin/tmpl/settings.tmpl
This commit is contained in:
+8
-4
@@ -330,10 +330,14 @@ void CIRCSock::ReadLine(const CString& sData) {
|
||||
// The client doesn't support multi-prefix so we need to remove
|
||||
// the other prefixes.
|
||||
|
||||
CString sNewLine = sServer + " 352 " + sLine.Token(2) + " " + \
|
||||
sLine.Token(3) + " " + sIdent + " " + sHost + " " + \
|
||||
sLine.Token(6) + " " + sNick[0] + \
|
||||
sNick.substr(sNick.find_first_not_of(GetPerms())) + " " + \
|
||||
CString sNewNick = sNick;
|
||||
size_t pos = sNick.find_first_not_of(GetPerms());
|
||||
if (pos >= 2 && pos != CString::npos) {
|
||||
sNewNick = sNick[0] + sNick.substr(pos);
|
||||
}
|
||||
CString sNewLine = sServer + " 352 " + sLine.Token(2) + " " +
|
||||
sLine.Token(3) + " " + sIdent + " " + sHost + " " +
|
||||
sLine.Token(6) + " " + sNewNick + " " +
|
||||
sLine.Token(8, true);
|
||||
m_pNetwork->PutUser(sNewLine, pClient);
|
||||
}
|
||||
|
||||
+4
-3
@@ -687,12 +687,13 @@ CWebSock::EPageReqResult CWebSock::OnPageRequestInternal(const CString& sURI, CS
|
||||
break;
|
||||
}
|
||||
|
||||
if (!pModule)
|
||||
return PAGE_NOTFOUND;
|
||||
|
||||
m_Template["ModPath"] = pModule->GetWebPath();
|
||||
m_Template["ModFilesPath"] = pModule->GetWebFilesPath();
|
||||
|
||||
if (!pModule) {
|
||||
return PAGE_NOTFOUND;
|
||||
} else if (pModule->WebRequiresLogin() && !ForceLogin()) {
|
||||
if (pModule->WebRequiresLogin() && !ForceLogin()) {
|
||||
return PAGE_PRINT;
|
||||
} else if (pModule->WebRequiresAdmin() && !GetSession()->IsAdmin()) {
|
||||
PrintErrorPage(403, "Forbidden", "You need to be an admin to access this module");
|
||||
|
||||
Reference in New Issue
Block a user