mirror of
https://github.com/znc/znc.git
synced 2026-03-28 17:42:41 +01:00
Added better support for channels
git-svn-id: https://znc.svn.sourceforge.net/svnroot/znc/trunk@500 726aef4b-f618-498e-8847-2d620e286838
This commit is contained in:
@@ -35,6 +35,8 @@ public:
|
||||
|
||||
void ListUsersPage(CString& sPageRet);
|
||||
bool SettingsPage(CString& sPageRet);
|
||||
bool ChanPage(CString& sPageRet, CChan* = NULL);
|
||||
bool DelChan(CString& sPageRet);
|
||||
bool UserPage(CString& sPageRet, CUser* pUser = NULL);
|
||||
CUser* GetNewUser(CString& sPageRet, CUser* pUser);
|
||||
|
||||
@@ -294,6 +296,53 @@ bool CWebAdminSock::OnPageRequest(const CString& sURI, CString& sPageRet) {
|
||||
} else {
|
||||
GetErrorPage(sPageRet, "No such username");
|
||||
}
|
||||
} else if (sURI == "/editchan") {
|
||||
if (!m_pUser) {
|
||||
m_pUser = m_pModule->GetZNC()->FindUser(GetParam("user"));
|
||||
}
|
||||
|
||||
if (!m_pUser) {
|
||||
GetErrorPage(sPageRet, "No such username");
|
||||
return true;
|
||||
}
|
||||
|
||||
CChan* pChan = m_pUser->FindChan(GetParam("chan"));
|
||||
if (!pChan) {
|
||||
GetErrorPage(sPageRet, "No such channel");
|
||||
cerr << "==== [" << GetParam("chan") << "] == [" << (int) pChan << "]" << endl;
|
||||
return true;
|
||||
}
|
||||
|
||||
if (!ChanPage(sPageRet, pChan)) {
|
||||
DEBUG_ONLY(cout << "- 302 Redirect" << endl);
|
||||
return false;
|
||||
}
|
||||
} else if (sURI == "/addchan") {
|
||||
if (!m_pUser) {
|
||||
m_pUser = m_pModule->GetZNC()->FindUser(GetParam("user"));
|
||||
}
|
||||
|
||||
if (m_pUser) {
|
||||
if (!ChanPage(sPageRet)) {
|
||||
DEBUG_ONLY(cout << "- 302 Redirect" << endl);
|
||||
return false;
|
||||
}
|
||||
} else {
|
||||
GetErrorPage(sPageRet, "No such username");
|
||||
}
|
||||
} else if (sURI == "/delchan") {
|
||||
if (!m_pUser) {
|
||||
m_pUser = m_pModule->GetZNC()->FindUser(GetParam("user"));
|
||||
}
|
||||
|
||||
if (m_pUser) {
|
||||
if (!DelChan(sPageRet)) {
|
||||
DEBUG_ONLY(cout << "- 302 Redirect" << endl);
|
||||
return false;
|
||||
}
|
||||
} else {
|
||||
GetErrorPage(sPageRet, "No such username");
|
||||
}
|
||||
} else if (sURI == "/listusers") {
|
||||
if (!IsAdmin()) {
|
||||
return false;
|
||||
@@ -439,6 +488,116 @@ bool CWebAdminSock::SettingsPage(CString& sPageRet) {
|
||||
return false;
|
||||
}
|
||||
|
||||
bool CWebAdminSock::ChanPage(CString& sPageRet, CChan* pChan) {
|
||||
if (!m_pUser) {
|
||||
GetErrorPage(sPageRet, "That user doesn't exist");
|
||||
}
|
||||
|
||||
if (!GetParam("submitted").ToUInt()) {
|
||||
sPageRet = Header(CString((pChan) ? "Edit" : "Add") + " Channel" + CString((pChan) ? (" [" + pChan->GetName() + "]") : "") + " for User [" + m_pUser->GetUserName() + "]");
|
||||
sPageRet += "<br><form action='" + CString((pChan) ? "/editchan" : "/addchan") + "' method='POST'>\r\n"
|
||||
"<input type='hidden' name='submitted' value='1'>\r\n"
|
||||
"<input type='hidden' name='user' value='" + m_pUser->GetUserName().Escape_n(CString::EHTML) + "'>\r\n";
|
||||
if (pChan) {
|
||||
sPageRet += "<input type='hidden' name='chan' value='" + pChan->GetName().Escape_n(CString::EHTML) + "'>\r\n";
|
||||
}
|
||||
|
||||
sPageRet += "<div style='white-space: nowrap; margin-top: -8px; margin-right: 8px; margin-left: 8px; padding: 1px 5px 1px 5px; float: left; border: 1px solid #000; font-size: 16px; font-weight: bold; background: #ff9;'>Channel Info</div><div style='padding: 25px 5px 5px 15px; border: 2px solid #000; background: #cc9;'><div style='clear: both;'>\r\n"
|
||||
"<table border='0' cellpadding='12' cellspacing='0'>\r\n"
|
||||
"<tr>\r\n"
|
||||
"<td><small><b>Channel Name:</b></small><br>\r\n";
|
||||
|
||||
if (pChan) {
|
||||
sPageRet += "<input type='hidden' name='name' value='" + pChan->GetName().Escape_n(CString::EHTML) + "'>" + pChan->GetName().Escape_n(CString::EHTML) + "</td>\r\n";
|
||||
} else {
|
||||
sPageRet += "<input type='text' name='name' value='' size='32'></td>\r\n";
|
||||
}
|
||||
|
||||
sPageRet += "<td><small><b>Buffer Count:</b></small><br>\r\n"
|
||||
"<input type='text' name='buffercount' value='" + CString((pChan) ? CString::ToString(pChan->GetBufferCount()) : "50") + "' size='8'></td>\r\n"
|
||||
|
||||
"<td><small><b>Default Modes:</b></small><br>\r\n"
|
||||
"<input type='text' name='defmodes' value='" + CString((pChan) ? pChan->GetDefaultModes().Escape_n(CString::EHTML) : "+stn") + "' size='16'></td>\r\n"
|
||||
"</tr>\r\n"
|
||||
|
||||
"<tr>\r\n"
|
||||
"<td><small><b>Save:</b></small><br>\r\n"
|
||||
"<label><input type='checkbox' name='save' value='true'" + CString((!pChan || pChan->InConfig()) ? " CHECKED" : "") + "> Save to config</label></td>\r\n"
|
||||
|
||||
"<td colspan='2'><small><b>Options:</b></small><br>\r\n"
|
||||
"<label><input type='checkbox' name='autocycle' value='true'" + CString((!pChan || pChan->AutoCycle()) ? " CHECKED" : "") + "> AutoCycle</label>\r\n"
|
||||
"<label><input type='checkbox' name='keepbuffer' value='true'" + CString((!pChan || pChan->KeepBuffer()) ? " CHECKED" : "") + "> KeepBuffer</label>\r\n"
|
||||
"<label><input type='checkbox' name='detached' value='true'" + CString((pChan && pChan->IsDetached()) ? " CHECKED" : "") + "> Detached</label>\r\n"
|
||||
"</td>\r\n"
|
||||
"</tr>\r\n"
|
||||
"</table>\r\n"
|
||||
"</div></div><br><br>\r\n"
|
||||
|
||||
"<input type='submit' value='" + CString((pChan) ? "Save" : "Add Channel") + "'>\r\n"
|
||||
"</form>\r\n";
|
||||
|
||||
sPageRet += Footer();
|
||||
return true;
|
||||
}
|
||||
|
||||
CString sChanName = GetParam("name");
|
||||
|
||||
if (!pChan) {
|
||||
if (sChanName.empty()) {
|
||||
GetErrorPage(sPageRet, "Channel name is a required argument");
|
||||
return true;
|
||||
}
|
||||
|
||||
pChan = new CChan(sChanName, m_pUser, true);
|
||||
m_pUser->AddChan(pChan);
|
||||
}
|
||||
|
||||
pChan->SetDefaultModes(GetParam("defmodes"));
|
||||
pChan->SetBufferCount(GetParam("buffercount").ToUInt());
|
||||
pChan->SetInConfig(GetParam("save").ToBool());
|
||||
pChan->SetAutoCycle(GetParam("autocycle").ToBool());
|
||||
pChan->SetKeepBuffer(GetParam("keepbuffer").ToBool());
|
||||
|
||||
bool bDetached = GetParam("detached").ToBool();
|
||||
|
||||
if (pChan->IsDetached() != bDetached) {
|
||||
if (bDetached) {
|
||||
pChan->DetachUser();
|
||||
} else {
|
||||
pChan->AttachUser();
|
||||
}
|
||||
}
|
||||
|
||||
if (!m_pModule->GetZNC()->WriteConfig()) {
|
||||
GetErrorPage(sPageRet, "Channel added/modified, but config was not written");
|
||||
return true;
|
||||
}
|
||||
|
||||
Redirect("/edituser?user=" + m_pUser->GetUserName().Escape_n(CString::EURL));
|
||||
return false;
|
||||
}
|
||||
|
||||
bool CWebAdminSock::DelChan(CString& sPageRet) {
|
||||
CString sChan = GetParam("chan");
|
||||
|
||||
if (!m_pUser) {
|
||||
GetErrorPage(sPageRet, "That user doesn't exist");
|
||||
return true;
|
||||
}
|
||||
|
||||
if (sChan.empty()) {
|
||||
GetErrorPage(sPageRet, "That channel doesn't exist for this user");
|
||||
return true;
|
||||
}
|
||||
|
||||
m_pUser->DelChan(sChan);
|
||||
m_pUser->PutIRC("PART " + sChan);
|
||||
|
||||
Redirect("/edituser?user=" + m_pUser->GetUserName().Escape_n(CString::EURL));
|
||||
|
||||
return false;
|
||||
}
|
||||
|
||||
bool CWebAdminSock::UserPage(CString& sPageRet, CUser* pUser) {
|
||||
if (!GetParam("submitted").ToUInt()) {
|
||||
sPageRet = Header((pUser) ? CString("Edit User [" + pUser->GetUserName() + "]") : CString("Add User"));
|
||||
@@ -490,17 +649,17 @@ bool CWebAdminSock::UserPage(CString& sPageRet, CUser* pUser) {
|
||||
|
||||
"<div style='white-space: nowrap; margin-top: -8px; margin-right: 8px; margin-left: 8px; padding: 1px 5px 1px 5px; float: left; border: 1px solid #000; font-size: 16px; font-weight: bold; background: #ff9;'>IRC Information</div><div style='padding: 25px 5px 5px 15px; border: 2px solid #000; background: #cc9;'><div style='clear: both;'>\r\n"
|
||||
"<div style='float: left; margin-right: 10px;'><small><b>Nick:</b></small><br>\r\n"
|
||||
"<input type='text' name='nick' value='" + CString((pUser) ? pUser->GetNick().Escape_n(CString::EHTML) : "") + "' size='32' maxlength='128'></div>\r\n"
|
||||
"<input type='text' name='nick' value='" + CString((pUser) ? pUser->GetNick().Escape_n(CString::EHTML) : "") + "' size='22' maxlength='128'></div>\r\n"
|
||||
"<div style='float: left; margin-right: 10px;'><small><b>AltNick:</b></small><br>\r\n"
|
||||
"<input type='text' name='altnick' value='" + CString((pUser) ? pUser->GetAltNick().Escape_n(CString::EHTML) : "") + "' size='32' maxlength='128'></div>\r\n"
|
||||
"<input type='text' name='altnick' value='" + CString((pUser) ? pUser->GetAltNick().Escape_n(CString::EHTML) : "") + "' size='22' maxlength='128'></div>\r\n"
|
||||
"<div style='float: left; margin-right: 10px;'><small><b>AwaySuffix:</b></small><br>\r\n"
|
||||
"<input type='text' name='awaysuffix' value='" + CString((pUser) ? pUser->GetAwaySuffix().Escape_n(CString::EHTML) : "") + "' size='32' maxlength='128'></div>\r\n"
|
||||
"<input type='text' name='awaysuffix' value='" + CString((pUser) ? pUser->GetAwaySuffix().Escape_n(CString::EHTML) : "") + "' size='18' maxlength='128'></div>\r\n"
|
||||
"<div><small><b>StatusPrefix:</b></small><br>\r\n"
|
||||
"<input type='text' name='statusprefix' value='" + CString((pUser) ? pUser->GetStatusPrefix().Escape_n(CString::EHTML) : "*") + "' size='14' maxlength='5'></div><br>\r\n"
|
||||
"<input type='text' name='statusprefix' value='" + CString((pUser) ? pUser->GetStatusPrefix().Escape_n(CString::EHTML) : "*") + "' size='16' maxlength='5'></div><br>\r\n"
|
||||
"<div style='float: left; margin-right: 10px;'><small><b>Ident:</b></small><br>\r\n"
|
||||
"<input type='text' name='ident' value='" + CString((pUser) ? pUser->GetIdent().Escape_n(CString::EHTML) : "") + "' size='32' maxlength='128'></div>\r\n"
|
||||
"<input type='text' name='ident' value='" + CString((pUser) ? pUser->GetIdent().Escape_n(CString::EHTML) : "") + "' size='22' maxlength='128'></div>\r\n"
|
||||
"<div><small><b>RealName:</b></small><br>\r\n"
|
||||
"<input type='text' name='realname' value='" + CString((pUser) ? pUser->GetRealName().Escape_n(CString::EHTML) : "") + "' size='90' maxlength='256'></div><br>\r\n";
|
||||
"<input type='text' name='realname' value='" + CString((pUser) ? pUser->GetRealName().Escape_n(CString::EHTML) : "") + "' size='68' maxlength='256'></div><br>\r\n";
|
||||
|
||||
const VCString& vsVHosts = m_pModule->GetZNC()->GetVHosts();
|
||||
|
||||
@@ -516,7 +675,7 @@ bool CWebAdminSock::UserPage(CString& sPageRet, CUser* pUser) {
|
||||
}
|
||||
|
||||
sPageRet += "<small><b>QuitMsg:</b></small><br>\r\n"
|
||||
"<input type='text' name='quitmsg' value='" + CString((pUser) ? pUser->GetQuitMsg().Escape_n(CString::EHTML) : "") + "' size='128' maxlength='256'><br><br>\r\n"
|
||||
"<input type='text' name='quitmsg' value='" + CString((pUser) ? pUser->GetQuitMsg().Escape_n(CString::EHTML) : "") + "' size='96' maxlength='256'><br><br>\r\n"
|
||||
"<div><small><b>Servers:</b></small><br>\r\n"
|
||||
"<textarea name='servers' cols='40' rows='5'>" + sServers.Escape_n(CString::EHTML) + "</textarea></div>\r\n"
|
||||
"<br></div></div><br><br>\r\n"
|
||||
@@ -532,7 +691,7 @@ bool CWebAdminSock::UserPage(CString& sPageRet, CUser* pUser) {
|
||||
|
||||
for (set<CModInfo>::iterator it = ssUserMods.begin(); it != ssUserMods.end(); it++) {
|
||||
const CModInfo& Info = *it;
|
||||
sPageRet += "<tr style='background: " + CString((uIdx++ %2) ? "#ffc" : "#cc9") + "'><td style='border: 1px solid #000;'><label><input type='checkbox' name='loadmod' value='" + Info.GetName().Escape_n(CString::EHTML) + "'" + CString((pUser && pUser->GetModules().FindModule(Info.GetName())) ? " CHECKED" : "") + CString((!IsAdmin() && pUser && pUser->DenyLoadMod()) ? " DISABLED" : "") + "> " + Info.GetName().Escape_n(CString::EHTML) + "</label></td>";
|
||||
sPageRet += "<tr style='background: " + CString((uIdx++ %2) ? "#ffc" : "#cc9") + ";'><td style='border: 1px solid #000;'><label><input type='checkbox' name='loadmod' value='" + Info.GetName().Escape_n(CString::EHTML) + "'" + CString((pUser && pUser->GetModules().FindModule(Info.GetName())) ? " CHECKED" : "") + CString((!IsAdmin() && pUser && pUser->DenyLoadMod()) ? " DISABLED" : "") + "> " + Info.GetName().Escape_n(CString::EHTML) + "</label></td>";
|
||||
|
||||
if (!IsAdmin() && pUser && pUser->DenyLoadMod()) {
|
||||
CString sArgs = GetModArgs(Info.GetName()).Escape_n(CString::EHTML);
|
||||
@@ -549,26 +708,61 @@ bool CWebAdminSock::UserPage(CString& sPageRet, CUser* pUser) {
|
||||
sPageRet += "<td style='border: 1px solid #000;'>" + Info.GetDescription().Escape_n(CString::EHTML) + "</td></tr>";
|
||||
}
|
||||
|
||||
CString sURL = "/addchan?user=" + pUser->GetUserName().Escape_n(CString::EURL);
|
||||
|
||||
sPageRet += "</table><br></div></div><br><br>\r\n"
|
||||
"<div style='white-space: nowrap; margin-top: -8px; margin-right: 8px; margin-left: 8px; padding: 1px 5px 1px 5px; float: left; border: 1px solid #000; font-size: 16px; font-weight: bold; background: #ff9;'>Channels</div><div style='padding: 25px 5px 5px 15px; border: 2px solid #000; background: #cc9;'><div style='clear: both;'>\r\n"
|
||||
"<small><b>Default Modes:</b></small><br>\r\n"
|
||||
"<input type='text' name='chanmodes' value='" + CString((pUser) ? pUser->GetDefaultChanModes().Escape_n(CString::EHTML) : "") + "' size='32' maxlength='32'><br><br>\r\n"
|
||||
"<div><small><b>Channels:</b></small><br>\r\n"
|
||||
"<textarea name='channels' cols='40' rows='5'>" + sChans.Escape_n(CString::EHTML) + "</textarea></div>\r\n"
|
||||
"<br></div></div><br><br>\r\n"
|
||||
"<table cellspacing='0' cellpadding='3' style='border: 1px solid #000;'>\r\n"
|
||||
"<tr style='font-weight: bold; background: #ff9;'>\r\n"
|
||||
"<td style='border: 1px solid #000;'>[<a href='" + sURL.Escape_n(CString::EHTML) + "'>Add</a>] </td>\r\n";
|
||||
|
||||
const vector<CChan*>& Channels = pUser->GetChans();
|
||||
|
||||
if (!Channels.size()) {
|
||||
sPageRet += "<td style='border: 1px solid #000;'> <- Add a channel (opens in same page) </td>\r\n";
|
||||
} else {
|
||||
sPageRet += "<td style='border: 1px solid #000;'>Save</td>\r\n"
|
||||
"<td style='border: 1px solid #000;'>Name</td>\r\n"
|
||||
"<td style='border: 1px solid #000;'>CurModes</td>\r\n"
|
||||
"<td style='border: 1px solid #000;'>DefModes</td>\r\n"
|
||||
"<td style='border: 1px solid #000;'>BufferCount</td>\r\n"
|
||||
"<td style='border: 1px solid #000;'>Options</td>\r\n";
|
||||
}
|
||||
|
||||
sPageRet += "</tr>\r\n";
|
||||
|
||||
for (unsigned int a = 0; a < Channels.size(); a++) {
|
||||
CChan* pChan = Channels[a];
|
||||
CString sURL = "user=" + pUser->GetUserName().Escape_n(CString::EURL) + "&chan=" + pChan->GetName().Escape_n(CString::EURL);
|
||||
|
||||
sPageRet += "<tr style='background: " + CString((a %2) ? "#ffc" : "#cc9") + ";'>"
|
||||
"<td style='border: 1px solid #000;'>"
|
||||
"<input type='hidden' name='channel' value='" + pChan->GetName().Escape_n(CString::EHTML) + "'>\r\n"
|
||||
"[<a href='/editchan?" + sURL.Escape_n(CString::EHTML) + "'>Edit</a>] [<a href='/delchan?" + sURL.Escape_n(CString::EHTML) + "'>Del</a>] </td>\r\n"
|
||||
"<td style='border: 1px solid #000;'><input type='checkbox' name='save_" + pChan->GetName().Escape_n(CString::EHTML) + "'" + CString((pChan->InConfig()) ? " CHECKED" : "") + "> </td>\r\n"
|
||||
"<td style='border: 1px solid #000;'>" + CString(pChan->GetPermStr() + pChan->GetName()).Escape_n(CString::EHTML) + " </td>\r\n"
|
||||
"<td style='border: 1px solid #000;'>" + pChan->GetModeString().Escape_n(CString::EHTML) + " </td>\r\n"
|
||||
"<td style='border: 1px solid #000;'>" + pChan->GetDefaultModes().Escape_n(CString::EHTML) + " </td>\r\n"
|
||||
"<td style='border: 1px solid #000;'>" + CString::ToString(pChan->GetBufferCount()) + " </td>\r\n"
|
||||
"<td style='border: 1px solid #000;'>" + pChan->GetOptions().Escape_n(CString::EHTML) + " </td>\r\n"
|
||||
"</tr>\r\n";
|
||||
}
|
||||
|
||||
sPageRet += "</table><br></div></div><br><br>\r\n"
|
||||
"<div style='white-space: nowrap; margin-top: -8px; margin-right: 8px; margin-left: 8px; padding: 1px 5px 1px 5px; float: left; border: 1px solid #000; font-size: 16px; font-weight: bold; background: #ff9;'>ZNC Behavior</div><div style='padding: 25px 5px 5px 15px; border: 2px solid #000; background: #cc9;'><div style='clear: both;'>\r\n"
|
||||
"<small><b>Playback Buffer Size:</b></small><br>\r\n"
|
||||
"<input type='text' name='bufsize' value='" + CString((pUser) ? CString::ToString(pUser->GetBufferCount()) : "") + "' size='32' maxlength='9'><br><br>\r\n"
|
||||
"<small><b>Options:</b></small><br>\r\n"
|
||||
"<label><input type='checkbox' name='keepbuffer' value='1'" + CString((!pUser || pUser->KeepBuffer()) ? " CHECKED" : "") + ">Keep Buffer</label> \r\n"
|
||||
"<label><input type='checkbox' name='autocycle' value='1'" + CString((!pUser || pUser->AutoCycle()) ? " CHECKED" : "") + ">Auto Cycle</label> \r\n"
|
||||
"<label><input type='checkbox' name='keepnick' value='1'" + CString((!pUser || pUser->GetKeepNick()) ? " CHECKED" : "") + ">Keep Nick</label> \r\n"
|
||||
"<label><input type='checkbox' name='bouncedccs' value='1'" + CString((!pUser || pUser->BounceDCCs()) ? " CHECKED" : "") + ">Bounce DCCs</label> \r\n"
|
||||
"<label><input type='checkbox' name='useclientip' value='1'" + CString((pUser && pUser->UseClientIP()) ? " CHECKED" : "") + ">Use Client IP</label> \r\n";
|
||||
"<span style='white-space: nowrap;'><label><input type='checkbox' name='keepbuffer' value='1'" + CString((!pUser || pUser->KeepBuffer()) ? " CHECKED" : "") + ">Keep Buffer</label></span> \r\n"
|
||||
"<span style='white-space: nowrap;'><label><input type='checkbox' name='autocycle' value='1'" + CString((!pUser || pUser->AutoCycle()) ? " CHECKED" : "") + ">Auto Cycle</label></span> \r\n"
|
||||
"<span style='white-space: nowrap;'><label><input type='checkbox' name='keepnick' value='1'" + CString((!pUser || pUser->GetKeepNick()) ? " CHECKED" : "") + ">Keep Nick</label></span> \r\n"
|
||||
"<span style='white-space: nowrap;'><label><input type='checkbox' name='bouncedccs' value='1'" + CString((!pUser || pUser->BounceDCCs()) ? " CHECKED" : "") + ">Bounce DCCs</label></span> \r\n"
|
||||
"<span style='white-space: nowrap;'><label><input type='checkbox' name='useclientip' value='1'" + CString((pUser && pUser->UseClientIP()) ? " CHECKED" : "") + ">Use Client IP</label></span> \r\n";
|
||||
|
||||
if (IsAdmin()) {
|
||||
sPageRet += "<label><input type='checkbox' name='denyloadmod' value='1'" + CString((pUser && pUser->DenyLoadMod()) ? " CHECKED" : "") + ">Deny LoadMod</label> \r\n";
|
||||
sPageRet += "<span style='white-space: nowrap;'><label><input type='checkbox' name='denyloadmod' value='1'" + CString((pUser && pUser->DenyLoadMod()) ? " CHECKED" : "") + ">Deny LoadMod</label></span> \r\n";
|
||||
}
|
||||
|
||||
sPageRet += "<br><br>"
|
||||
@@ -737,10 +931,10 @@ CUser* CWebAdminSock::GetNewUser(CString& sPageRet, CUser* pUser) {
|
||||
pNewUser->SetDenyLoadMod(pUser->DenyLoadMod());
|
||||
}
|
||||
|
||||
GetParam("channels").Split("\n", vsArgs);
|
||||
|
||||
GetParamValues("channel", vsArgs);
|
||||
for (a = 0; a < vsArgs.size(); a++) {
|
||||
pNewUser->AddChan(vsArgs[a].TrimRight_n("\r"), true);
|
||||
const CString& sChan = vsArgs[a];
|
||||
pNewUser->AddChan(sChan.TrimRight_n("\r"), GetParam("save_" + sChan).ToBool());
|
||||
}
|
||||
|
||||
return pNewUser;
|
||||
|
||||
Reference in New Issue
Block a user