mirror of
https://github.com/znc/znc.git
synced 2026-08-08 09:52:55 +02:00
awaynick: Set awaynick on connect, not some time after that
git-svn-id: https://znc.svn.sourceforge.net/svnroot/znc/trunk@1291 726aef4b-f618-498e-8847-2d620e286838
This commit is contained in:
+11
-2
@@ -83,10 +83,19 @@ public:
|
||||
}
|
||||
}
|
||||
|
||||
virtual void OnIRCConnected() {
|
||||
virtual EModRet OnIRCRegistration(CString& sPass, CString& sNick,
|
||||
CString& sIdent, CString& sRealName) {
|
||||
if (m_pUser && !m_pUser->IsUserAttached()) {
|
||||
StartAwayNickTimer();
|
||||
CString sAwayNick = m_sFormat;
|
||||
|
||||
// ExpandString doesn't know our nick yet, so do it by hand.
|
||||
sAwayNick.Replace("%nick%", sNick);
|
||||
|
||||
// We don't limit this to NICKLEN, because we dont know
|
||||
// NICKLEN yet.
|
||||
sNick = m_pUser->ExpandString(sAwayNick);
|
||||
}
|
||||
return CONTINUE;
|
||||
}
|
||||
|
||||
virtual void OnIRCDisconnected() {
|
||||
|
||||
Reference in New Issue
Block a user