Skip to content

Instantly share code, notes, and snippets.

@yewton
Created August 7, 2012 06:21
Show Gist options
  • Star 1 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save yewton/3282319 to your computer and use it in GitHub Desktop.
Save yewton/3282319 to your computer and use it in GitHub Desktop.
ZNCのPlaybackをNoticeにする
diff -Naru znc-0.206.orig/Chan.cpp znc-0.206/Chan.cpp
--- znc-0.206.orig/Chan.cpp 2012-04-06 04:25:50.000000000 +0900
+++ znc-0.206/Chan.cpp 2012-08-07 16:31:17.000000000 +0900
@@ -570,7 +570,7 @@
MODULECALL(OnChanBufferStarting(*this, *pUseClient), m_pUser, NULL, bSkipStatusMsg = true);
if (!bSkipStatusMsg) {
- m_pUser->PutUser(":***!znc@znc.in PRIVMSG " + GetName() + " :Buffer Playback...", pUseClient);
+ m_pUser->PutUser(":***!znc@znc.in NOTICE " + GetName() + " :Buffer Playback...", pUseClient);
}
for (unsigned int a = 0; a < vsBuffer.size(); a++) {
@@ -595,7 +595,7 @@
MODULECALL(OnChanBufferEnding(*this, *pUseClient), m_pUser, NULL, bSkipStatusMsg = true);
if (!bSkipStatusMsg) {
- m_pUser->PutUser(":***!znc@znc.in PRIVMSG " + GetName() + " :Playback Complete.", pUseClient);
+ m_pUser->PutUser(":***!znc@znc.in NOTICE " + GetName() + " :Playback Complete.", pUseClient);
}
if( pClient )
diff -Naru znc-0.206.orig/Client.cpp znc-0.206/Client.cpp
--- znc-0.206.orig/Client.cpp 2012-04-06 04:25:50.000000000 +0900
+++ znc-0.206/Client.cpp 2012-08-07 16:30:49.000000000 +0900
@@ -430,7 +430,7 @@
CChan* pChan = m_pUser->FindChan(sTarget);
if ((pChan) && (pChan->KeepBuffer())) {
- pChan->AddBuffer(":" + GetNickMask() + " PRIVMSG " + sTarget + " :" + m_pUser->AddTimestamp(sMsg));
+ pChan->AddBuffer(":" + GetNickMask() + " NOTICE " + sTarget + " :" + m_pUser->AddTimestamp(sMsg));
}
PutIRC("PRIVMSG " + sTarget + " :" + sMsg);
diff -Naru znc-0.206.orig/IRCSock.cpp znc-0.206/IRCSock.cpp
--- znc-0.206.orig/IRCSock.cpp 2012-04-06 04:25:50.000000000 +0900
+++ znc-0.206/IRCSock.cpp 2012-07-27 14:29:40.000000000 +0900
@@ -903,7 +903,7 @@
MODULECALL(OnChanMsg(Nick, *pChan, sMessage), m_pUser, NULL, return true);
if (pChan->KeepBuffer() || !m_pUser->IsUserAttached() || pChan->IsDetached()) {
- pChan->AddBuffer(":" + Nick.GetNickMask() + " PRIVMSG " + sChan + " :" + m_pUser->AddTimestamp(sMessage));
+ pChan->AddBuffer(":" + Nick.GetNickMask() + " NOTICE " + sChan + " :" + m_pUser->AddTimestamp(sMessage));
}
}
diff -Naru znc-0.206.orig/modules/savebuff.cpp znc-0.206/modules/savebuff.cpp
--- znc-0.206.orig/modules/savebuff.cpp 2012-04-06 04:25:50.000000000 +0900
+++ znc-0.206/modules/savebuff.cpp 2012-08-07 16:27:36.000000000 +0900
@@ -211,7 +211,7 @@
void Replay(const CString & sChan)
{
CString sFile;
- PutUser(":***!znc@znc.in PRIVMSG " + sChan + " :Buffer Playback...");
+ PutUser(":***!znc@znc.in NOTICE " + sChan + " :Buffer Playback...");
if (DecryptChannel(sChan, sFile))
{
VCString vsLines;
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment