Add Show command to identfile.

It should help us to debug that annoying bug of identfile aborting
connections...
This commit is contained in:
Alexey Sokolov
2012-03-15 01:04:27 +07:00
parent ddb1af86fd
commit 9b5eb910f3

View File

@@ -26,6 +26,7 @@ public:
AddCommand("GetFormat", static_cast<CModCommand::ModCmdFunc>(&CIdentFileModule::GetFormat));
AddCommand("SetFormat", static_cast<CModCommand::ModCmdFunc>(&CIdentFileModule::SetFormat),
"<format>");
AddCommand("Show", static_cast<CModCommand::ModCmdFunc>(&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);