Pass the nick who send an invite with the OnInvite hook

This commit is contained in:
Kyle Fuller
2011-10-20 23:41:36 +00:00
parent 8cce595fbe
commit e11d338040
3 changed files with 6 additions and 5 deletions
+3 -2
View File
@@ -553,9 +553,10 @@ public:
*/
virtual void OnPart(const CNick& Nick, CChan& Channel, const CString& sMessage);
/** Called when user is invited into a channel
* @param Nick The nick who invited you.
* @param sChan The channel the user got invited into
*/
virtual void OnInvite(const CString& sChan);
virtual void OnInvite(const CNick& Nick, const CString& sChan);
/** Called before a channel buffer is played back to a client.
* @param Chan The channel which will be played back.
@@ -1050,7 +1051,7 @@ public:
bool OnKick(const CNick& Nick, const CString& sOpNick, CChan& Channel, const CString& sMessage);
bool OnJoin(const CNick& Nick, CChan& Channel);
bool OnPart(const CNick& Nick, CChan& Channel, const CString& sMessage);
bool OnInvite(const CString& sChan);
bool OnInvite(const CNick& Nick, const CString& sChan);
bool OnChanBufferStarting(CChan& Chan, CClient& Client);
bool OnChanBufferEnding(CChan& Chan, CClient& Client);
+1 -1
View File
@@ -712,7 +712,7 @@ void CIRCSock::ReadLine(const CString& sData) {
// Don't forward any CAP stuff to the client
return;
} else if (sCmd.Equals("INVITE")) {
NETWORKMODULECALL(OnInvite(sLine.Token(3).TrimPrefix_n(":")), m_pNetwork->GetUser(), m_pNetwork, NULL, NOTHING);
NETWORKMODULECALL(OnInvite(Nick, sLine.Token(3).TrimPrefix_n(":")), m_pNetwork->GetUser(), m_pNetwork, NULL, NOTHING);
}
}
+2 -2
View File
@@ -513,7 +513,7 @@ void CModule::OnNick(const CNick& Nick, const CString& sNewNick, const vector<CC
void CModule::OnKick(const CNick& Nick, const CString& sKickedNick, CChan& Channel, const CString& sMessage) {}
void CModule::OnJoin(const CNick& Nick, CChan& Channel) {}
void CModule::OnPart(const CNick& Nick, CChan& Channel, const CString& sMessage) {}
void CModule::OnInvite(const CString& sChan) {}
void CModule::OnInvite(const CNick& Nick, const CString& sChan) {}
CModule::EModRet CModule::OnChanBufferStarting(CChan& Chan, CClient& Client) { return CONTINUE; }
CModule::EModRet CModule::OnChanBufferEnding(CChan& Chan, CClient& Client) { return CONTINUE; }
@@ -686,7 +686,7 @@ bool CModules::OnNick(const CNick& Nick, const CString& sNewNick, const vector<C
bool CModules::OnKick(const CNick& Nick, const CString& sKickedNick, CChan& Channel, const CString& sMessage) { MODUNLOADCHK(OnKick(Nick, sKickedNick, Channel, sMessage)); return false; }
bool CModules::OnJoin(const CNick& Nick, CChan& Channel) { MODUNLOADCHK(OnJoin(Nick, Channel)); return false; }
bool CModules::OnPart(const CNick& Nick, CChan& Channel, const CString& sMessage) { MODUNLOADCHK(OnPart(Nick, Channel, sMessage)); return false; }
bool CModules::OnInvite(const CString& sChan) { MODUNLOADCHK(OnInvite(sChan)); return false; }
bool CModules::OnInvite(const CNick& Nick, const CString& sChan) { MODUNLOADCHK(OnInvite(Nick, sChan)); return false; }
bool CModules::OnChanBufferStarting(CChan& Chan, CClient& Client) { MODHALTCHK(OnChanBufferStarting(Chan, Client)); }
bool CModules::OnChanBufferEnding(CChan& Chan, CClient& Client) { MODHALTCHK(OnChanBufferEnding(Chan, Client)); }
bool CModules::OnChanBufferPlayLine(CChan& Chan, CClient& Client, CString& sLine) { MODHALTCHK(OnChanBufferPlayLine(Chan, Client, sLine)); }