From 9b5eb910f335388261fd4d92098cdfc1d49b8970 Mon Sep 17 00:00:00 2001 From: Alexey Sokolov Date: Thu, 15 Mar 2012 01:04:27 +0700 Subject: [PATCH] Add Show command to identfile. It should help us to debug that annoying bug of identfile aborting connections... --- modules/identfile.cpp | 9 +++++++++ 1 file changed, 9 insertions(+) diff --git a/modules/identfile.cpp b/modules/identfile.cpp index 35a548e5..02e51b5c 100644 --- a/modules/identfile.cpp +++ b/modules/identfile.cpp @@ -26,6 +26,7 @@ public: AddCommand("GetFormat", static_cast(&CIdentFileModule::GetFormat)); AddCommand("SetFormat", static_cast(&CIdentFileModule::SetFormat), ""); + AddCommand("Show", static_cast(&CIdentFileModule::Show)); } virtual ~CIdentFileModule() { @@ -52,6 +53,14 @@ public: PutModule("Format would be expanded to: " + m_pUser->ExpandString(GetNV("Format"))); } + void Show(const CString& sLine) { + PutModule("m_pISpoofLockFile = " + CString((long long)m_pISpoofLockFile)); + PutModule("m_pIRCSock = " + CString((long long)m_pIRCSock)); + if (m_pIRCSock) { + PutModule("user/network - " + m_pIRCSock->GetNetwork()->GetUser()->GetUserName() + "/" + m_pIRCSock->GetNetwork()->GetName()); + } + } + void OnModCommand(const CString& sCommand) { if (m_pUser->IsAdmin()) { HandleCommand(sCommand);