mirror of
https://github.com/znc/znc.git
synced 2026-05-08 22:34:45 +02:00
Move OnWrite{User,Chan}Config() to CModule
That way, user modules can write stuff to the user section, too. OnWriteConfig() is still a global module call. A later commit will have to make OnConfigLine() a user module hook... git-svn-id: https://znc.svn.sourceforge.net/svnroot/znc/trunk@1848 726aef4b-f618-498e-8847-2d620e286838
This commit is contained in:
+4
-10
@@ -401,6 +401,8 @@ void CModule::OnIRCConnected() {}
|
||||
CModule::EModRet CModule::OnIRCConnecting(CIRCSock *IRCSock) { return CONTINUE; }
|
||||
CModule::EModRet CModule::OnIRCRegistration(CString& sPass, CString& sNick, CString& sIdent, CString& sRealName) { return CONTINUE; }
|
||||
CModule::EModRet CModule::OnBroadcast(CString& sMessage) { return CONTINUE; }
|
||||
void CModule::OnWriteUserConfig(CFile& Config) {}
|
||||
void CModule::OnWriteChanConfig(CFile& Config, CChan& Chan) {}
|
||||
|
||||
CModule::EModRet CModule::OnDCCUserSend(const CNick& RemoteNick, unsigned long uLongIP, unsigned short uPort, const CString& sFile, unsigned long uFileSize) { return CONTINUE; }
|
||||
|
||||
@@ -497,8 +499,6 @@ bool CModule::PutModNotice(const CString& sLine, const CString& sIdent, const CS
|
||||
///////////////////
|
||||
CModule::EModRet CGlobalModule::OnConfigLine(const CString& sName, const CString& sValue, CUser* pUser, CChan* pChan) { return CONTINUE; }
|
||||
CModule::EModRet CGlobalModule::OnWriteConfig(CFile& Config) { return CONTINUE; }
|
||||
void CGlobalModule::OnWriteUserConfig(CFile& Config, CUser& User) {}
|
||||
void CGlobalModule::OnWriteChanConfig(CFile& Config, CChan& Chan) {}
|
||||
CModule::EModRet CGlobalModule::OnAddUser(CUser& User, CString& sErrorRet) { return CONTINUE; }
|
||||
CModule::EModRet CGlobalModule::OnDeleteUser(CUser& User) { return CONTINUE; }
|
||||
void CGlobalModule::OnClientConnect(CClient* pClient, const CString& sHost, unsigned short uPort) {}
|
||||
@@ -546,6 +546,8 @@ bool CModules::OnIRCConnected() { MODUNLOADCHK(OnIRCConnected()); return false;
|
||||
bool CModules::OnIRCConnecting(CIRCSock *pIRCSock) { MODHALTCHK(OnIRCConnecting(pIRCSock)); }
|
||||
bool CModules::OnIRCRegistration(CString& sPass, CString& sNick, CString& sIdent, CString& sRealName) { MODHALTCHK(OnIRCRegistration(sPass, sNick, sIdent, sRealName)); }
|
||||
bool CModules::OnBroadcast(CString& sMessage) { MODHALTCHK(OnBroadcast(sMessage)); }
|
||||
bool CModules::OnWriteUserConfig(CFile& Config) { MODUNLOADCHK(OnWriteUserConfig(Config)); return false; }
|
||||
bool CModules::OnWriteChanConfig(CFile& Config, CChan& Chan) { MODUNLOADCHK(OnWriteChanConfig(Config, Chan)); return false; }
|
||||
bool CModules::OnIRCDisconnected() { MODUNLOADCHK(OnIRCDisconnected()); return false; }
|
||||
bool CModules::OnDCCUserSend(const CNick& RemoteNick, unsigned long uLongIP, unsigned short uPort, const CString& sFile, unsigned long uFileSize) { MODHALTCHK(OnDCCUserSend(RemoteNick, uLongIP, uPort, sFile, uFileSize)); }
|
||||
bool CModules::OnChanPermission(const CNick& OpNick, const CNick& Nick, CChan& Channel, unsigned char uMode, bool bAdded, bool bNoChange) { MODUNLOADCHK(OnChanPermission(OpNick, Nick, Channel, uMode, bAdded, bNoChange)); return false; }
|
||||
@@ -606,14 +608,6 @@ bool CGlobalModules::OnWriteConfig(CFile& Config) {
|
||||
GLOBALMODHALTCHK(OnWriteConfig(Config));
|
||||
}
|
||||
|
||||
void CGlobalModules::OnWriteUserConfig(CFile& Config, CUser& User) {
|
||||
GLOBALMODCALL(OnWriteUserConfig(Config, User));
|
||||
}
|
||||
|
||||
void CGlobalModules::OnWriteChanConfig(CFile& Config, CChan& Chan) {
|
||||
GLOBALMODCALL(OnWriteChanConfig(Config, Chan));
|
||||
}
|
||||
|
||||
bool CGlobalModules::OnAddUser(CUser& User, CString& sErrorRet) {
|
||||
GLOBALMODHALTCHK(OnAddUser(User, sErrorRet));
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user