Changed all references to std::string over to CString

git-svn-id: https://znc.svn.sourceforge.net/svnroot/znc/trunk@240 726aef4b-f618-498e-8847-2d620e286838
This commit is contained in:
prozacx
2005-05-05 18:11:04 +00:00
parent 7f0215de40
commit beb5b49b3f
36 changed files with 990 additions and 982 deletions
+16 -16
View File
@@ -7,7 +7,7 @@ CNick::CNick() {
m_bIsVoice = false;
}
CNick::CNick(const string& sNick) {
CNick::CNick(const CString& sNick) {
Parse(sNick);
m_bIsOp = false;
m_bIsVoice = false;
@@ -15,14 +15,14 @@ CNick::CNick(const string& sNick) {
CNick::~CNick() {}
void CNick::Parse(const string& sNickMask) {
void CNick::Parse(const CString& sNickMask) {
if (sNickMask.empty()) {
return;
}
string::size_type uPos = sNickMask.find('!');
CString::size_type uPos = sNickMask.find('!');
if (uPos == string::npos) {
if (uPos == CString::npos) {
m_sNick = sNickMask.substr((sNickMask[0] == ':'));
return;
}
@@ -30,7 +30,7 @@ void CNick::Parse(const string& sNickMask) {
m_sNick = sNickMask.substr((sNickMask[0] == ':'), uPos);
m_sHost = sNickMask.substr(uPos +1);
if ((uPos = m_sHost.find('@')) != string::npos) {
if ((uPos = m_sHost.find('@')) != CString::npos) {
m_sIdent = m_sHost.substr(0, uPos);
m_sHost = m_sHost.substr(uPos +1);
}
@@ -43,9 +43,9 @@ unsigned int CNick::GetCommonChans(vector<CChan*>& vRetChans, CUser* pUser) cons
for (unsigned int a = 0; a < vChans.size(); a++) {
CChan* pChan = vChans[a];
const map<string,CNick*>& msNicks = pChan->GetNicks();
const map<CString,CNick*>& msNicks = pChan->GetNicks();
for (map<string,CNick*>::const_iterator it = msNicks.begin(); it != msNicks.end(); it++) {
for (map<CString,CNick*>::const_iterator it = msNicks.begin(); it != msNicks.end(); it++) {
if (strcasecmp(it->first.c_str(), m_sNick.c_str()) == 0) {
vRetChans.push_back(pChan);
continue;
@@ -56,21 +56,21 @@ unsigned int CNick::GetCommonChans(vector<CChan*>& vRetChans, CUser* pUser) cons
return vRetChans.size();
}
void CNick::SetNick(const string& s) { m_sNick = s; }
void CNick::SetIdent(const string& s) { m_sIdent = s; }
void CNick::SetHost(const string& s) { m_sHost = s; }
void CNick::SetNick(const CString& s) { m_sNick = s; }
void CNick::SetIdent(const CString& s) { m_sIdent = s; }
void CNick::SetHost(const CString& s) { m_sHost = s; }
void CNick::SetOp(bool b) { m_bIsOp = b; }
void CNick::SetVoice(bool b) { m_bIsVoice = b; }
bool CNick::IsOp() const { return m_bIsOp; }
bool CNick::IsVoice() const { return m_bIsVoice; }
const string& CNick::GetNick() const { return m_sNick; }
const string& CNick::GetIdent() const { return m_sIdent; }
const string& CNick::GetHost() const { return m_sHost; }
string CNick::GetNickMask() const { return m_sNick + "!" + m_sIdent + "@" + m_sHost; }
const CString& CNick::GetNick() const { return m_sNick; }
const CString& CNick::GetIdent() const { return m_sIdent; }
const CString& CNick::GetHost() const { return m_sHost; }
CString CNick::GetNickMask() const { return m_sNick + "!" + m_sIdent + "@" + m_sHost; }
string CNick::GetHostMask() const {
string sRet = m_sNick;
CString CNick::GetHostMask() const {
CString sRet = m_sNick;
if (!m_sIdent.empty()) {
sRet += "!" + m_sIdent;