DarthGandalf does not approve

git-svn-id: https://znc.svn.sourceforge.net/svnroot/znc/trunk@2085 726aef4b-f618-498e-8847-2d620e286838
This commit is contained in:
psychon
2010-07-10 17:09:51 +00:00
parent 25fd29f594
commit e4006adc11
4 changed files with 11 additions and 13 deletions

View File

@@ -144,7 +144,6 @@ CModule::~CModule() {
void CModule::SetUser(CUser* pUser) { m_pUser = pUser; }
void CModule::SetClient(CClient* pClient) { m_pClient = pClient; }
void CModule::Unload() const { throw UNLOAD; }
bool CModule::LoadRegistry() {
//CString sPrefix = (m_pUser) ? m_pUser->GetUserName() : ".global";
@@ -247,7 +246,7 @@ bool CModule::UnlinkTimer(CTimer* pTimer) {
return false;
}
CTimer* CModule::FindTimer(const CString& sLabel) const {
CTimer* CModule::FindTimer(const CString& sLabel) {
set<CTimer*>::iterator it;
for (it = m_sTimers.begin(); it != m_sTimers.end(); ++it) {
CTimer* pTimer = *it;
@@ -335,7 +334,7 @@ bool CModule::UnlinkSocket(CSocket* pSocket) {
return false;
}
CSocket* CModule::FindSocket(const CString& sSockName) const {
CSocket* CModule::FindSocket(const CString& sSockName) {
set<CSocket*>::iterator it;
for (it = m_sSockets.begin(); it != m_sSockets.end(); ++it) {
CSocket* pSocket = *it;
@@ -456,7 +455,6 @@ CModule::EModRet CModule::OnChanNotice(CNick& Nick, CChan& Channel, CString& sMe
CModule::EModRet CModule::OnTopic(CNick& Nick, CChan& Channel, CString& sTopic) { return CONTINUE; }
CModule::EModRet CModule::OnTimerAutoJoin(CChan& Channel) { return CONTINUE; }
ModHandle CModule::GetDLL() const { return m_pDLL; }
bool CModule::PutIRC(const CString& sLine) {
return (m_pUser) ? m_pUser->PutIRC(sLine) : false;
}

View File

@@ -255,7 +255,7 @@ public:
/** This function throws CModule::UNLOAD which causes this module to be unloaded.
*/
void Unload() const;
void Unload() { throw UNLOAD; }
/** This module hook is called when a module is loaded
* @param sArgsi The arguments for the modules.
@@ -645,7 +645,7 @@ public:
*/
virtual EModRet OnTimerAutoJoin(CChan& Channel);
ModHandle GetDLL() const;
ModHandle GetDLL() { return m_pDLL; }
static double GetCoreVersion() { return VERSION; }
/** This function sends a given raw IRC line to the IRC server, if we
@@ -716,7 +716,7 @@ public:
bool RemTimer(CTimer* pTimer);
bool RemTimer(const CString& sLabel);
bool UnlinkTimer(CTimer* pTimer);
CTimer* FindTimer(const CString& sLabel) const;
CTimer* FindTimer(const CString& sLabel);
set<CTimer*>::const_iterator BeginTimers() const { return m_sTimers.begin(); }
set<CTimer*>::const_iterator EndTimers() const { return m_sTimers.end(); }
virtual void ListTimers();
@@ -727,7 +727,7 @@ public:
bool RemSocket(CSocket* pSocket);
bool RemSocket(const CString& sSockName);
bool UnlinkSocket(CSocket* pSocket);
CSocket* FindSocket(const CString& sSockName) const;
CSocket* FindSocket(const CString& sSockName);
set<CSocket*>::const_iterator BeginSockets() const { return m_sSockets.begin(); }
set<CSocket*>::const_iterator EndSockets() const { return m_sSockets.end(); }
virtual void ListSockets();
@@ -764,12 +764,12 @@ public:
* except when we are in a user-specific module hook in which
* case this is the user pointer.
*/
CUser* GetUser() const { return m_pUser; }
CUser* GetUser() { return m_pUser; }
/** @returns NULL except when we are in a client-specific module hook in
* which case this is the client for which the hook is called.
*/
CClient* GetClient() const { return m_pClient; }
CSockManager* GetManager() const { return m_pManager; }
CClient* GetClient() { return m_pClient; }
CSockManager* GetManager() { return m_pManager; }
// !Getters
protected:

View File

@@ -1175,7 +1175,7 @@ bool CUser::SetBufferCount(unsigned int u, bool bForce) {
return true;
}
void CUser::CheckIRCConnect() const {
void CUser::CheckIRCConnect() {
// Do we want to connect?
if (m_bIRCConnectEnabled && GetIRCSock() == NULL)
CZNC::Get().EnableConnectUser();

2
User.h
View File

@@ -111,7 +111,7 @@ public:
bool IsIRCConnected() const { return GetIRCSock() != NULL; }
void IRCConnected(CIRCSock* pIRCSock);
void IRCDisconnected();
void CheckIRCConnect() const;
void CheckIRCConnect();
void AddDCCBounce(CDCCBounce* p) { m_sDCCBounces.insert(p); }
void DelDCCBounce(CDCCBounce* p) { m_sDCCBounces.erase(p); }