mirror of
https://github.com/znc/znc.git
synced 2026-08-07 17:33:34 +02:00
Fixed some issues when modules were not defined
git-svn-id: https://znc.svn.sourceforge.net/svnroot/znc/trunk@632 726aef4b-f618-498e-8847-2d620e286838
This commit is contained in:
@@ -187,12 +187,13 @@ void CChan::OnWho(const CString& sNick, const CString& sIdent, const CString& sH
|
||||
}
|
||||
|
||||
void CChan::ModeChange(const CString& sModes, const CString& sOpNick) {
|
||||
CNick* pOpNick = FindNick(sOpNick);
|
||||
CString sModeArg = sModes.Token(0);
|
||||
CString sArgs = sModes.Token(1, true);
|
||||
bool bAdd = true;
|
||||
|
||||
#ifdef _MODULES
|
||||
CNick* pOpNick = FindNick(sOpNick);
|
||||
|
||||
if (pOpNick) {
|
||||
VOIDMODULECALL(OnRawMode(*pOpNick, *this, sModeArg, sArgs));
|
||||
}
|
||||
@@ -210,7 +211,6 @@ void CChan::ModeChange(const CString& sModes, const CString& sOpNick) {
|
||||
CNick* pNick = FindNick(sArg);
|
||||
if (pNick) {
|
||||
unsigned char uPerm = m_pUser->GetIRCSock()->GetPermFromMode(uMode);
|
||||
bool bNoChange = (pNick->HasPerm(uPerm) == bAdd);
|
||||
|
||||
if (uPerm) {
|
||||
if (bAdd) {
|
||||
@@ -231,6 +231,7 @@ void CChan::ModeChange(const CString& sModes, const CString& sOpNick) {
|
||||
}
|
||||
}
|
||||
#ifdef _MODULES
|
||||
bool bNoChange = (pNick->HasPerm(uPerm) == bAdd);
|
||||
|
||||
if (uMode && pOpNick) {
|
||||
VOIDMODULECALL(OnChanPermission(*pOpNick, *pNick, *this, uMode, bAdd, bNoChange));
|
||||
|
||||
Reference in New Issue
Block a user