Need a unique gift idea?
A Pastebin account makes a great Christmas gift
SHARE
TWEET

block_keyx.cpp

knarzling Jan 17th, 2012 (edited) 81 Never
Upgrade to PRO!
ENDING IN00days00hours00mins00secs
 
  1. #include <znc/Modules.h>
  2. #include <znc/User.h>
  3. #include <znc/IRCNetwork.h>
  4.  
  5. class CFred : public CModule {
  6. public:
  7.         MODCONSTRUCTOR(CFred) {}
  8.  
  9.         virtual EModRet OnPrivNotice(CNick& Nick, CString& sMessage) {
  10.                 if (m_pNetwork->GetClients().empty() && sMessage.Token(0) == "DH                                                                                     1080_INIT") {
  11.                         CString sPre, sPost;
  12.  
  13.                         sPre = ":" + GetModNick() + "!" + GetModName() + "@znc.i                                                                                     n PRIVMSG ";
  14.  
  15.                         sPost = "Blocked DH1080_INIT from " + Nick.GetNickMask()                                                                                     ;
  16.                         sPost = " :" + m_pUser->AddTimestamp(sPost);
  17.  
  18.                         m_pNetwork->AddRawBuffer(sPre, sPost);
  19.                         return HALT;
  20.                 }
  21.                 return CONTINUE;
  22.         }
  23. };
  24.  
  25. MODULEDEFS(CFred, "Blocks/Logs Fish-KeyX if no Client connected v0.2")
RAW Paste Data
We use cookies for various purposes including analytics. By continuing to use Pastebin, you agree to our use of cookies as described in the Cookies Policy. OK, I Understand
 
Top