mirror of
https://github.com/znc/znc.git
synced 2026-05-09 06:44:40 +02:00
Move discon_kick, blockuser and lastseen out of extra/
discon_kick is renamed to disconkick, seems more consistent with the other modules. git-svn-id: https://znc.svn.sourceforge.net/svnroot/znc/trunk@1923 726aef4b-f618-498e-8847-2d620e286838
This commit is contained in:
@@ -0,0 +1,30 @@
|
||||
/*
|
||||
* Copyright (C) 2004-2010 See the AUTHORS file for details.
|
||||
*
|
||||
* This program is free software; you can redistribute it and/or modify it
|
||||
* under the terms of the GNU General Public License version 2 as published
|
||||
* by the Free Software Foundation.
|
||||
*/
|
||||
|
||||
|
||||
#include "Modules.h"
|
||||
#include "User.h"
|
||||
#include "Chan.h"
|
||||
|
||||
class CKickClientOnIRCDisconnect: public CModule {
|
||||
public:
|
||||
MODCONSTRUCTOR(CKickClientOnIRCDisconnect) {}
|
||||
|
||||
void OnIRCDisconnected()
|
||||
{
|
||||
const vector<CChan*>& vChans = m_pUser->GetChans();
|
||||
|
||||
for(vector<CChan*>::const_iterator it = vChans.begin(); it != vChans.end(); ++it)
|
||||
{
|
||||
PutUser(":ZNC!znc@znc.in KICK " + (*it)->GetName() + " " + m_pUser->GetIRCNick().GetNick()
|
||||
+ " :You have been disconnected from the IRC server");
|
||||
}
|
||||
}
|
||||
};
|
||||
|
||||
MODULEDEFS(CKickClientOnIRCDisconnect, "Kicks the client from all channels when the connection to the IRC server is lost")
|
||||
Reference in New Issue
Block a user