Created
February 4, 2013 22:48
-
-
Save amyreese/4710462 to your computer and use it in GitHub Desktop.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
diff -urN '--exclude=CVS' '--exclude=.svn' '--exclude=.git*' '--exclude=*.swp' znc-1.0/src/Client.cpp znc-1.0-query-buffer/src/Client.cpp | |
--- znc-1.0/src/Client.cpp 2012-11-06 08:02:20.000000000 -0800 | |
+++ znc-1.0-query-buffer/src/Client.cpp 2013-02-04 14:30:49.240504205 -0800 | |
@@ -306,17 +306,29 @@ | |
} | |
// Relay to the rest of the clients that may be connected to this user | |
- if (m_pNetwork->IsChan(sTarget)) { | |
+ //if (m_pNetwork->IsChan(sTarget)) { | |
vector<CClient*>& vClients = GetClients(); | |
for (unsigned int a = 0; a < vClients.size(); a++) { | |
CClient* pClient = vClients[a]; | |
- if (pClient != this) { | |
- pClient->PutClient(":" + GetNickMask() + " PRIVMSG " + sTarget + " :\001" + sCTCP + "\001"); | |
+ //if (pClient != this) { | |
+ //pClient->PutClient(":" + GetNickMask() + " PRIVMSG " + sTarget + " :\001" + sCTCP + "\001"); | |
+ //} | |
+ | |
+ if (m_pNetwork->IsChan(sTarget)) { | |
+ if (pClient != this) { | |
+ pClient->PutClient(":" + GetNickMask() + " PRIVMSG " + sTarget + " :\001" + sCTCP + "\001"); | |
+ } | |
+ } else { | |
+ if (pClient == this) { | |
+ m_pNetwork->AddQueryBuffer(":" + sTarget + " PRIVMSG ", GetNick() + " :\001ACTION <***> * " + GetNick() + " " + m_pUser->AddTimestamp(sMessage) + "\001"); | |
+ } else { | |
+ pClient->PutClient(":" + sTarget + " PRIVMSG " + GetNick() + " :\001ACTION <***> * " + GetNick() + " " + sMessage + "\001"); | |
+ } | |
} | |
} | |
- } | |
+ //} | |
} else { | |
NETWORKMODULECALL(OnUserCTCP(sTarget, sCTCP), m_pUser, m_pNetwork, this, &bReturn); | |
if (bReturn) return; | |
@@ -359,17 +371,29 @@ | |
// Relay to the rest of the clients that may be connected to this user | |
- if (m_pNetwork->IsChan(sTarget)) { | |
+ //if (m_pNetwork->IsChan(sTarget)) { | |
vector<CClient*>& vClients = GetClients(); | |
for (unsigned int a = 0; a < vClients.size(); a++) { | |
CClient* pClient = vClients[a]; | |
- if (pClient != this) { | |
- pClient->PutClient(":" + GetNickMask() + " PRIVMSG " + sTarget + " :" + sMsg); | |
+ //if (pClient != this) { | |
+ //pClient->PutClient(":" + GetNickMask() + " PRIVMSG " + sTarget + " :" + sMsg); | |
+ //} | |
+ | |
+ if (m_pNetwork->IsChan(sTarget)) { | |
+ if (pClient != this) { | |
+ pClient->PutClient(":" + GetNickMask() + " PRIVMSG " + sTarget + " :" + sMsg); | |
+ } | |
+ } else { | |
+ if (pClient == this) { | |
+ m_pNetwork->AddQueryBuffer(":" + sTarget + " PRIVMSG ", GetNick() + " :<***> <" + GetNick() + "> " + m_pUser->AddTimestamp(sMsg)); | |
+ } else { | |
+ pClient->PutClient(":" + sTarget + " PRIVMSG " + GetNick() + " :<***> <" + GetNick() + "> " + sMsg); | |
+ } | |
} | |
} | |
- } | |
+ //} | |
} | |
return; | |
diff -urN '--exclude=CVS' '--exclude=.svn' '--exclude=.git*' '--exclude=*.swp' znc-1.0/src/IRCSock.cpp znc-1.0-query-buffer/src/IRCSock.cpp | |
--- znc-1.0/src/IRCSock.cpp 2012-11-06 08:02:20.000000000 -0800 | |
+++ znc-1.0-query-buffer/src/IRCSock.cpp 2013-02-04 14:34:51.013845327 -0800 | |
@@ -853,10 +853,10 @@ | |
IRCSOCKMODULECALL(OnPrivAction(Nick, sMessage), &bResult); | |
if (bResult) return true; | |
- if (!m_pNetwork->IsUserOnline()) { | |
+ //if (!m_pNetwork->IsUserOnline()) { | |
// If the user is detached, add to the buffer | |
m_pNetwork->AddQueryBuffer(":" + _NAMEDFMT(Nick.GetNickMask()) + " PRIVMSG {target} :\001ACTION {text}\001", sMessage); | |
- } | |
+ //} | |
sMessage = "ACTION " + sMessage; | |
} | |
@@ -914,10 +914,10 @@ | |
IRCSOCKMODULECALL(OnPrivNotice(Nick, sMessage), &bResult); | |
if (bResult) return true; | |
- if (!m_pNetwork->IsUserOnline()) { | |
+ //if (!m_pNetwork->IsUserOnline()) { | |
// If the user is detached, add to the buffer | |
m_pNetwork->AddQueryBuffer(":" + _NAMEDFMT(Nick.GetNickMask()) + " NOTICE {target} :{text}", sMessage); | |
- } | |
+ //} | |
return false; | |
} | |
@@ -927,10 +927,10 @@ | |
IRCSOCKMODULECALL(OnPrivMsg(Nick, sMessage), &bResult); | |
if (bResult) return true; | |
- if (!m_pNetwork->IsUserOnline()) { | |
+ //if (!m_pNetwork->IsUserOnline()) { | |
// If the user is detached, add to the buffer | |
m_pNetwork->AddQueryBuffer(":" + _NAMEDFMT(Nick.GetNickMask()) + " PRIVMSG {target} :{text}", sMessage); | |
- } | |
+ //} | |
return false; | |
} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Also, if I quit the "last" connected client and reconnect, I get a query with empty chat messages ... this looks weird. Bugged?