Skip to content

Instantly share code, notes, and snippets.

@yewton
Last active December 15, 2015 01:59
Show Gist options
  • Save yewton/5183559 to your computer and use it in GitHub Desktop.
Save yewton/5183559 to your computer and use it in GitHub Desktop.
ZNC-1.0 の Buffer Playback を Notice にする
diff -Naru znc-1.0.orig/src/Chan.cpp znc-1.0/src/Chan.cpp
--- znc-1.0.orig/src/Chan.cpp 2013-03-18 04:46:49.000000000 +0900
+++ znc-1.0/src/Chan.cpp 2013-03-18 05:20:17.000000000 +0900
@@ -548,7 +548,7 @@
NETWORKMODULECALL(OnChanBufferStarting(*this, *pUseClient), m_pNetwork->GetUser(), m_pNetwork, NULL, &bSkipStatusMsg);
if (!bSkipStatusMsg) {
- m_pNetwork->PutUser(":***[email protected] PRIVMSG " + GetName() + " :Buffer Playback...", pUseClient);
+ m_pNetwork->PutUser(":***[email protected] NOTICE " + GetName() + " :Buffer Playback...", pUseClient);
}
size_t uSize = m_Buffer.Size();
@@ -563,7 +563,7 @@
bSkipStatusMsg = pUseClient->HasServerTime();
NETWORKMODULECALL(OnChanBufferEnding(*this, *pUseClient), m_pNetwork->GetUser(), m_pNetwork, NULL, &bSkipStatusMsg);
if (!bSkipStatusMsg) {
- m_pNetwork->PutUser(":***[email protected] PRIVMSG " + GetName() + " :Playback Complete.", pUseClient);
+ m_pNetwork->PutUser(":***[email protected] NOTICE " + GetName() + " :Playback Complete.", pUseClient);
}
if (pClient)
diff -Naru znc-1.0.orig/src/Client.cpp znc-1.0/src/Client.cpp
--- znc-1.0.orig/src/Client.cpp 2013-03-18 04:46:49.000000000 +0900
+++ znc-1.0/src/Client.cpp 2013-03-18 05:33:45.000000000 +0900
@@ -352,7 +352,7 @@
CChan* pChan = m_pNetwork->FindChan(sTarget);
if ((pChan) && (!pChan->AutoClearChanBuffer() || !m_pNetwork->IsUserOnline())) {
- pChan->AddBuffer(":" + _NAMEDFMT(GetNickMask()) + " PRIVMSG " + _NAMEDFMT(sTarget) + " :{text}", sMsg);
+ pChan->AddBuffer(":" + _NAMEDFMT(GetNickMask()) + " NOTICE " + _NAMEDFMT(sTarget) + " :{text}", sMsg);
}
PutIRC("PRIVMSG " + sTarget + " :" + sMsg);
diff -Naru znc-1.0.orig/src/IRCSock.cpp znc-1.0/src/IRCSock.cpp
--- znc-1.0.orig/src/IRCSock.cpp 2013-03-18 04:46:49.000000000 +0900
+++ znc-1.0/src/IRCSock.cpp 2013-03-18 05:36:23.000000000 +0900
@@ -983,7 +983,7 @@
if (bResult) return true;
if (!pChan->AutoClearChanBuffer() || !m_pNetwork->IsUserOnline() || pChan->IsDetached()) {
- pChan->AddBuffer(":" + _NAMEDFMT(Nick.GetNickMask()) + " PRIVMSG " + _NAMEDFMT(sChan) + " :{text}", sMessage);
+ pChan->AddBuffer(":" + _NAMEDFMT(Nick.GetNickMask()) + " NOTICE " + _NAMEDFMT(sChan) + " :{text}", sMessage);
}
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment