mirror of
https://github.com/znc/znc.git
synced 2026-08-08 18:03:22 +02:00
Added ISpoofFormat config option for defining the output of the ispoof file
git-svn-id: https://znc.svn.sourceforge.net/svnroot/znc/trunk@328 726aef4b-f618-498e-8847-2d620e286838
This commit is contained in:
@@ -16,6 +16,7 @@
|
||||
CZNC::CZNC() {
|
||||
m_uListenPort = 0;
|
||||
m_bISpoofLocked = false;
|
||||
m_sISpoofFormat = "global { reply \"%\" }";
|
||||
}
|
||||
|
||||
CZNC::~CZNC() {
|
||||
@@ -86,7 +87,8 @@ int CZNC::Loop() {
|
||||
}
|
||||
|
||||
if (File.Open(O_WRONLY | O_TRUNC | O_CREAT)) {
|
||||
File.Write(pUser->GetIdent() + "\r\n");
|
||||
CString sData = m_sISpoofFormat.Token(0, false, '%') + pUser->GetIdent() + m_sISpoofFormat.Token(1, true, '%');
|
||||
File.Write(sData + "\n");
|
||||
File.Close();
|
||||
}
|
||||
|
||||
@@ -734,6 +736,9 @@ bool CZNC::ParseConfig(const CString& sConfig) {
|
||||
|
||||
CUtils::PrintStatus(true);
|
||||
|
||||
continue;
|
||||
} else if (sName.CaseCmp("ISpoofFormat") == 0) {
|
||||
m_sISpoofFormat = sValue;
|
||||
continue;
|
||||
} else if (sName.CaseCmp("ISpoofFile") == 0) {
|
||||
m_sISpoofFile = sValue;
|
||||
|
||||
Reference in New Issue
Block a user