mirror of
https://github.com/znc/znc.git
synced 2026-03-28 17:42:41 +01:00
Remove OnDCCUserSend module hook
This commit is contained in:
@@ -418,8 +418,6 @@ void CClient::ReadLine(const CString& sData) {
|
||||
}
|
||||
|
||||
m_pUser->GetFile(GetNick(), CUtils::GetIP(uLongIP), uPort, sAbsolutePath, uFileSize);
|
||||
} else {
|
||||
MODULECALL(OnDCCUserSend(CString(m_pUser->GetStatusPrefix() + sTarget), uLongIP, uPort, sFile, uFileSize), m_pUser, this, return);
|
||||
}
|
||||
} else {
|
||||
unsigned short uBNCPort = CDCCBounce::DCCRequest(sTarget, uLongIP, uPort, sFile, false, m_pUser, "");
|
||||
|
||||
@@ -473,8 +473,6 @@ void CModule::OnIRCConnectionError(CIRCSock *IRCSock) {}
|
||||
CModule::EModRet CModule::OnIRCRegistration(CString& sPass, CString& sNick, CString& sIdent, CString& sRealName) { return CONTINUE; }
|
||||
CModule::EModRet CModule::OnBroadcast(CString& sMessage) { return CONTINUE; }
|
||||
|
||||
CModule::EModRet CModule::OnDCCUserSend(const CNick& RemoteNick, unsigned long uLongIP, unsigned short uPort, const CString& sFile, unsigned long uFileSize) { return CONTINUE; }
|
||||
|
||||
void CModule::OnChanPermission(const CNick& OpNick, const CNick& Nick, CChan& Channel, unsigned char uMode, bool bAdded, bool bNoChange) {}
|
||||
void CModule::OnOp(const CNick& OpNick, const CNick& Nick, CChan& Channel, bool bNoChange) {}
|
||||
void CModule::OnDeop(const CNick& OpNick, const CNick& Nick, CChan& Channel, bool bNoChange) {}
|
||||
@@ -634,7 +632,6 @@ bool CModules::OnIRCConnectionError(CIRCSock *pIRCSock) { MODUNLOADCHK(OnIRCConn
|
||||
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::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; }
|
||||
bool CModules::OnOp(const CNick& OpNick, const CNick& Nick, CChan& Channel, bool bNoChange) { MODUNLOADCHK(OnOp(OpNick, Nick, Channel, bNoChange)); return false; }
|
||||
bool CModules::OnDeop(const CNick& OpNick, const CNick& Nick, CChan& Channel, bool bNoChange) { MODUNLOADCHK(OnDeop(OpNick, Nick, Channel, bNoChange)); return false; }
|
||||
|
||||
@@ -413,11 +413,6 @@ public:
|
||||
*/
|
||||
virtual EModRet OnBroadcast(CString& sMessage);
|
||||
|
||||
/** This module hook is called when a user sends a DCC SEND request to
|
||||
* your module fake-nickname.
|
||||
*/
|
||||
virtual EModRet OnDCCUserSend(const CNick& RemoteNick, unsigned long uLongIP, unsigned short uPort, const CString& sFile, unsigned long uFileSize);
|
||||
|
||||
/** This module hook is called when a user mode on a channel changes.
|
||||
* @param OpNick The nick who sent the mode change.
|
||||
* @param Nick The nick whose channel mode changes.
|
||||
@@ -894,8 +889,6 @@ public:
|
||||
bool OnIRCRegistration(CString& sPass, CString& sNick, CString& sIdent, CString& sRealName);
|
||||
bool OnBroadcast(CString& sMessage);
|
||||
|
||||
bool OnDCCUserSend(const CNick& RemoteNick, unsigned long uLongIP, unsigned short uPort, const CString& sFile, unsigned long uFileSize);
|
||||
|
||||
bool OnChanPermission(const CNick& OpNick, const CNick& Nick, CChan& Channel, unsigned char uMode, bool bAdded, bool bNoChange);
|
||||
bool OnOp(const CNick& OpNick, const CNick& Nick, CChan& Channel, bool bNoChange);
|
||||
bool OnDeop(const CNick& OpNick, const CNick& Nick, CChan& Channel, bool bNoChange);
|
||||
|
||||
@@ -123,16 +123,14 @@ public:
|
||||
}
|
||||
}
|
||||
|
||||
virtual EModRet OnDCCUserSend(const CNick& RemoteNick, unsigned long uLongIP, unsigned short uPort, const CString& sFile, unsigned long uFileSize) {
|
||||
if (RemoteNick.GetNick().Equals(GetModNick())) {
|
||||
CString sLocalFile = CDir::ChangeDir(m_sPath, sFile, CZNC::Get().GetHomePath());
|
||||
|
||||
virtual void OnModCTCP(const CString& sMessage) {
|
||||
if (sMessage.Equals("DCC SEND ", false, 9)) {
|
||||
CString sLocalFile = CDir::ChangeDir(m_sPath, sMessage.Token(2), CZNC::Get().GetHomePath());
|
||||
unsigned long uLongIP = sMessage.Token(3).ToULong();
|
||||
unsigned short uPort = sMessage.Token(4).ToUShort();
|
||||
unsigned long uFileSize = sMessage.Token(5).ToULong();
|
||||
m_pUser->GetFile(m_pUser->GetCurNick(), CUtils::GetIP(uLongIP), uPort, sLocalFile, uFileSize, GetModName());
|
||||
|
||||
return HALT;
|
||||
}
|
||||
|
||||
return CONTINUE;
|
||||
}
|
||||
|
||||
void PutShell(const CString& sMsg) {
|
||||
|
||||
@@ -13,7 +13,6 @@ EModRet OnIRCConnecting(CIRCSock *pIRCSock)
|
||||
void OnIRCConnectionError(CIRCSock *pIRCSock)
|
||||
EModRet OnIRCRegistration(CString& sPass, CString& sNick, CString& sIdent, CString& sRealName)
|
||||
EModRet OnBroadcast(CString& sMessage)
|
||||
EModRet OnDCCUserSend(const CNick& RemoteNick, unsigned long uLongIP, unsigned short uPort, const CString& sFile, unsigned long uFileSize)
|
||||
void OnChanPermission(const CNick& OpNick, const CNick& Nick, CChan& Channel, unsigned char uMode, bool bAdded, bool bNoChange)
|
||||
void OnOp(const CNick& OpNick, const CNick& Nick, CChan& Channel, bool bNoChange)
|
||||
void OnDeop(const CNick& OpNick, const CNick& Nick, CChan& Channel, bool bNoChange)
|
||||
|
||||
@@ -36,7 +36,6 @@ public:
|
||||
virtual void OnIRCConnectionError(CIRCSock *pIRCSock);
|
||||
virtual EModRet OnIRCRegistration(CString& sPass, CString& sNick, CString& sIdent, CString& sRealName);
|
||||
virtual EModRet OnBroadcast(CString& sMessage);
|
||||
virtual EModRet OnDCCUserSend(const CNick& RemoteNick, unsigned long uLongIP, unsigned short uPort, const CString& sFile, unsigned long uFileSize);
|
||||
virtual void OnChanPermission(const CNick& OpNick, const CNick& Nick, CChan& Channel, unsigned char uMode, bool bAdded, bool bNoChange);
|
||||
virtual void OnOp(const CNick& OpNick, const CNick& Nick, CChan& Channel, bool bNoChange);
|
||||
virtual void OnDeop(const CNick& OpNick, const CNick& Nick, CChan& Channel, bool bNoChange);
|
||||
|
||||
@@ -298,7 +298,6 @@ sub OnIRCConnecting {}
|
||||
sub OnIRCConnectionError {}
|
||||
sub OnIRCRegistration {}
|
||||
sub OnBroadcast {}
|
||||
sub OnDCCUserSend {}
|
||||
sub OnChanPermission {}
|
||||
sub OnOp {}
|
||||
sub OnDeop {}
|
||||
|
||||
@@ -13,7 +13,6 @@ EModRet OnIRCConnecting(CIRCSock *pIRCSock)
|
||||
void OnIRCConnectionError(CIRCSock *pIRCSock)
|
||||
EModRet OnIRCRegistration(CString& sPass, CString& sNick, CString& sIdent, CString& sRealName)
|
||||
EModRet OnBroadcast(CString& sMessage)
|
||||
EModRet OnDCCUserSend(const CNick& RemoteNick, unsigned long uLongIP, unsigned short uPort, const CString& sFile, unsigned long uFileSize)
|
||||
void OnChanPermission(const CNick& OpNick, const CNick& Nick, CChan& Channel, unsigned char uMode, bool bAdded, bool bNoChange)
|
||||
void OnOp(const CNick& OpNick, const CNick& Nick, CChan& Channel, bool bNoChange)
|
||||
void OnDeop(const CNick& OpNick, const CNick& Nick, CChan& Channel, bool bNoChange)
|
||||
|
||||
@@ -58,7 +58,6 @@ public:
|
||||
virtual void OnIRCConnectionError(CIRCSock *pIRCSock);
|
||||
virtual EModRet OnIRCRegistration(CString& sPass, CString& sNick, CString& sIdent, CString& sRealName);
|
||||
virtual EModRet OnBroadcast(CString& sMessage);
|
||||
virtual EModRet OnDCCUserSend(const CNick& RemoteNick, unsigned long uLongIP, unsigned short uPort, const CString& sFile, unsigned long uFileSize);
|
||||
virtual void OnChanPermission(const CNick& OpNick, const CNick& Nick, CChan& Channel, unsigned char uMode, bool bAdded, bool bNoChange);
|
||||
virtual void OnOp(const CNick& OpNick, const CNick& Nick, CChan& Channel, bool bNoChange);
|
||||
virtual void OnDeop(const CNick& OpNick, const CNick& Nick, CChan& Channel, bool bNoChange);
|
||||
|
||||
@@ -221,9 +221,6 @@ class Module:
|
||||
def OnBroadcast(self, sMessage):
|
||||
pass
|
||||
|
||||
def OnDCCUserSend(self, RemoteNick, uLongIP, uPort, sFile, uFileSize):
|
||||
pass
|
||||
|
||||
def OnChanPermission(self, OpNick, Nick, Channel, uMode, bAdded,
|
||||
bNoChange):
|
||||
pass
|
||||
@@ -366,7 +363,6 @@ class Module:
|
||||
def OnEmbeddedWebRequest(self, WebSock, sPageName, Tmpl):
|
||||
pass
|
||||
|
||||
|
||||
def make_inherit(cl, parent, attr):
|
||||
def make_caller(parent, name, attr):
|
||||
return lambda self, *a: parent.__dict__[name](self.__dict__[attr], *a)
|
||||
|
||||
Reference in New Issue
Block a user