]> jfr.im git - irc/rizon/znc.git/commitdiff
Add Show command to identfile.
authorAlexey Sokolov <redacted>
Wed, 14 Mar 2012 18:04:27 +0000 (01:04 +0700)
committerKyle Fuller <redacted>
Tue, 27 Mar 2012 17:22:20 +0000 (18:22 +0100)
It should help us to debug that annoying bug of identfile aborting
connections...

modules/identfile.cpp

index a69020aff8320d9485827e0e470291e8d123c0ff..16d769b29f0d012c1954deff58ba23c6ab3d175f 100644 (file)
@@ -25,6 +25,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() {
@@ -51,6 +52,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 = " + m_pIRCSock->GetUser()->GetUserName());
+               }
+       }
+
        void OnModCommand(const CString& sCommand) {
                if (m_pUser->IsAdmin()) {
                        HandleCommand(sCommand);