mirror of
https://github.com/znc/znc.git
synced 2026-05-14 21:35:47 +02:00
Send correct away status on client login
If some client now sets "us" away via /away, new clients will be sent a 306 numeric after login to inform them that they are set /away. Thanks to nobswolf for the suggestion. git-svn-id: https://znc.svn.sourceforge.net/svnroot/znc/trunk@1655 726aef4b-f618-498e-8847-2d620e286838
This commit is contained in:
@@ -36,6 +36,7 @@ CUser::CUser(const CString& sUserName) {
|
||||
m_bUseClientIP = false;
|
||||
m_bDenyLoadMod = false;
|
||||
m_bAdmin= false;
|
||||
m_bIRCAway = false;
|
||||
m_bDenySetVHost= false;
|
||||
m_sStatusPrefix = "*";
|
||||
m_sChanPrefixes = "";
|
||||
@@ -147,6 +148,7 @@ void CUser::IRCDisconnected() {
|
||||
}
|
||||
|
||||
SetIRCServer("");
|
||||
m_bIRCAway = false;
|
||||
|
||||
// Get the reconnect going
|
||||
CheckIRCConnect();
|
||||
@@ -275,6 +277,12 @@ void CUser::UserConnected(CClient* pClient) {
|
||||
}
|
||||
}
|
||||
|
||||
if (m_bIRCAway) {
|
||||
// If they want to know their away reason they'll have to whois
|
||||
// themselves. At least we can tell them their away status...
|
||||
pClient->PutClient(":irc.znc.in 306 " + GetIRCNick().GetNick() + " :You have been marked as being away");
|
||||
}
|
||||
|
||||
const vector<CChan*>& vChans = GetChans();
|
||||
for (unsigned int a = 0; a < vChans.size(); a++) {
|
||||
if ((vChans[a]->IsOn()) && (!vChans[a]->IsDetached())) {
|
||||
|
||||
Reference in New Issue
Block a user