Advertisement
Guest User

Untitled

a guest
May 27th, 2017
62
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
C++ 0.95 KB | None | 0 0
  1. #include "User.h"
  2.  
  3. class CCGIIRC : public CModule {
  4. private:
  5.         CString cgipass;
  6.         CString cgihost;
  7.         CString cgiip;
  8.         CString m_pUser;
  9.         CString sPass;
  10.         CString sNick;
  11.         CString sIdent;
  12.         Cstring sRealName;
  13.  
  14. public:
  15.     MODCONSTRUCTOR(CCGIIRC)
  16.     {
  17.         const
  18.     }
  19.  
  20.     virtual ~CCGIIRC()
  21.     {
  22.     }
  23.  
  24.     virtual bool OnLoad(const CString& sArgs, CString& sMessage)
  25.     {      
  26.         cgipass = GetNV("cgipass");
  27.         cgihost = GetNV("cgihost");
  28.         cgiip = GetNV("cgiip");
  29.         m_pUser = pUser;
  30.         sPass = m_sPass;
  31.         sNick = m_pUser->GetNick();
  32.         sIdent = m_pUser->GetIdent();
  33.         sRealName = m_pUser->GetRealName();
  34.     }
  35.  
  36.         virtual EModRet OnIRCRegistration(CString& sPass, CString& sNick, CString& sIdent, CString& sRealName) {
  37.        PutIRC("WEBIRC " + cgipass + " cgiirc " + m_pUser->GetUserName() + "." + cgihost + " " + cgiip);
  38.         }
  39.     }
  40. };
  41.  
  42. MODULEDEFS(CCGIIRC, "Connects using CGI:IRC so each user has thier own hostname according to thier username.")
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement