Skip to content
Browse files

Honor per-network nick in awaynick and keepnick.

  • Loading branch information...
1 parent f7919bb commit cd1192e01fe6672d28afbf0eb7be00514700418a Alexey Sokolov committed Sep 17, 2011
Showing with 7 additions and 7 deletions.
  1. +6 −6 modules/awaynick.cpp
  2. +1 −1 modules/keepnick.cpp
View
12 modules/awaynick.cpp
@@ -35,7 +35,7 @@ class CBackNickTimer : public CTimer {
CIRCNetwork* pNetwork = m_Module.GetNetwork();
if (pNetwork->IsUserAttached() && pNetwork->IsIRCConnected()) {
- CString sConfNick = pNetwork->GetUser()->GetNick();
+ CString sConfNick = pNetwork->GetNick();
m_Module.PutIRC("NICK " + sConfNick);
}
}
@@ -80,7 +80,7 @@ class CAwayNickMod : public CModule {
CIRCSock* pIRCSock = m_pNetwork->GetIRCSock();
if (pIRCSock) {
- CString sConfNick = m_pUser->GetNick();
+ CString sConfNick = m_pNetwork->GetNick();
if (pIRCSock->GetNick().Equals(m_sAwayNick.Left(pIRCSock->GetNick().length()))) {
RemTimer("BackNickTimer");
@@ -91,7 +91,7 @@ class CAwayNickMod : public CModule {
virtual EModRet OnIRCRegistration(CString& sPass, CString& sNick,
CString& sIdent, CString& sRealName) {
- if (m_pUser && !m_pUser->IsUserAttached()) {
+ if (m_pNetwork && !m_pNetwork->IsUserAttached()) {
m_sAwayNick = m_sFormat;
// ExpandString doesn't know our nick yet, so do it by hand.
@@ -114,7 +114,7 @@ class CAwayNickMod : public CModule {
}
virtual void OnClientDisconnect() {
- if (!m_pUser->IsUserAttached()) {
+ if (!m_pNetwork->IsUserAttached()) {
StartAwayNickTimer();
}
}
@@ -132,7 +132,7 @@ class CAwayNickMod : public CModule {
SetNV("nick", m_sFormat);
}
- if (m_pUser) {
+ if (m_pNetwork) {
CString sExpanded = GetAwayNick();
CString sMsg = "AwayNick is set to [" + m_sFormat + "]";
@@ -143,7 +143,7 @@ class CAwayNickMod : public CModule {
PutModule(sMsg);
}
} else if (sCommand.Equals("SHOW")) {
- if (m_pUser) {
+ if (m_pNetwork) {
CString sExpanded = GetAwayNick();
CString sMsg = "AwayNick is set to [" + m_sFormat + "]";
View
2 modules/keepnick.cpp
@@ -58,7 +58,7 @@ class CKeepNickMod : public CModule {
}
CString GetNick() {
- CString sConfNick = m_pUser->GetNick();
+ CString sConfNick = m_pNetwork->GetNick();
CIRCSock* pIRCSock = m_pNetwork->GetIRCSock();
if (pIRCSock)

0 comments on commit cd1192e

Please sign in to comment.
Something went wrong with that request. Please try again.