diff options
Diffstat (limited to 'protocols/IRCG/src/output.cpp')
-rw-r--r-- | protocols/IRCG/src/output.cpp | 46 |
1 files changed, 23 insertions, 23 deletions
diff --git a/protocols/IRCG/src/output.cpp b/protocols/IRCG/src/output.cpp index c86d78fb61..8ff9d2a7b8 100644 --- a/protocols/IRCG/src/output.cpp +++ b/protocols/IRCG/src/output.cpp @@ -26,26 +26,26 @@ static CMString FormatOutput(const CIrcMessage* pmsg) CMString sMessage;
if (pmsg->m_bIncoming) { // Is it an incoming message?
- if (pmsg->sCommand == _T("WALLOPS") && pmsg->parameters.getCount() > 0) {
+ if (pmsg->sCommand == L"WALLOPS" && pmsg->parameters.getCount() > 0) {
TCHAR temp[200]; *temp = '\0';
mir_sntprintf(temp, TranslateT("WallOps from %s: "), pmsg->prefix.sNick.c_str());
sMessage = temp;
for (int i = 0; i < (int)pmsg->parameters.getCount(); i++) {
sMessage += pmsg->parameters[i];
if (i != pmsg->parameters.getCount() - 1)
- sMessage += _T(" ");
+ sMessage += L" ";
}
goto THE_END;
}
- if (pmsg->sCommand == _T("INVITE") && pmsg->parameters.getCount() > 1) {
+ if (pmsg->sCommand == L"INVITE" && pmsg->parameters.getCount() > 1) {
TCHAR temp[256]; *temp = '\0';
mir_sntprintf(temp, TranslateT("%s invites you to %s"), pmsg->prefix.sNick.c_str(), pmsg->parameters[1].c_str());
sMessage = temp;
for (int i = 2; i < (int)pmsg->parameters.getCount(); i++) {
- sMessage += _T(": ") + pmsg->parameters[i];
+ sMessage += L": " + pmsg->parameters[i];
if (i != pmsg->parameters.getCount() - 1)
- sMessage += _T(" ");
+ sMessage += L" ";
}
goto THE_END;
}
@@ -56,30 +56,30 @@ static CMString FormatOutput(const CIrcMessage* pmsg) mir_sntprintf(temp, TranslateT("%s is away"), pmsg->parameters[1].c_str());
sMessage = temp;
for (int i = 2; i < (int)pmsg->parameters.getCount(); i++) {
- sMessage += _T(": ") + pmsg->parameters[i];
+ sMessage += L": " + pmsg->parameters[i];
if (i != pmsg->parameters.getCount() - 1)
- sMessage += _T(" ");
+ sMessage += L" ";
}
goto THE_END;
}
if ((index == 443 || index == 441) && pmsg->parameters.getCount() > 3)
- return pmsg->parameters[1] + _T(" ") + pmsg->parameters[3] + _T(": ") + pmsg->parameters[2];
+ return pmsg->parameters[1] + L" " + pmsg->parameters[3] + L": " + pmsg->parameters[2];
if (index == 303) { // ISON command
sMessage = TranslateT("These are online: ");
for (int i = 1; i < (int)pmsg->parameters.getCount(); i++) {
sMessage += pmsg->parameters[i];
if (i != pmsg->parameters.getCount() - 1)
- sMessage += _T(", ");
+ sMessage += L", ";
}
goto THE_END;
}
if ((index > 400 || index < 500) && pmsg->parameters.getCount() > 2 && pmsg->sCommand[0] == '4') //all error messages
- return pmsg->parameters[2] + _T(": ") + pmsg->parameters[1];
+ return pmsg->parameters[2] + L": " + pmsg->parameters[1];
}
- else if (pmsg->sCommand == _T("NOTICE") && pmsg->parameters.getCount() > 1) {
+ else if (pmsg->sCommand == L"NOTICE" && pmsg->parameters.getCount() > 1) {
TCHAR temp[500]; *temp = '\0';
int l = pmsg->parameters[1].GetLength();
@@ -89,7 +89,7 @@ static CMString FormatOutput(const CIrcMessage* pmsg) tempstr.Delete(0, 1);
tempstr.Delete(tempstr.GetLength() - 1, 1);
CMString type = GetWord(tempstr.c_str(), 0);
- if (mir_tstrcmpi(type.c_str(), _T("ping")) == 0)
+ if (mir_tstrcmpi(type.c_str(), L"ping") == 0)
mir_sntprintf(temp, TranslateT("CTCP %s reply sent to %s"), type.c_str(), pmsg->parameters[0].c_str());
else
mir_sntprintf(temp, TranslateT("CTCP %s reply sent to %s: %s"), type.c_str(), pmsg->parameters[0].c_str(), GetWordAddress(tempstr.c_str(), 1));
@@ -101,7 +101,7 @@ static CMString FormatOutput(const CIrcMessage* pmsg) for (int i = 1; i < (int)pmsg->parameters.getCount(); i++) {
sMessage += pmsg->parameters[i];
if (i != pmsg->parameters.getCount() - 1)
- sMessage += _T(" ");
+ sMessage += L" ";
}
}
goto THE_END;
@@ -111,18 +111,18 @@ static CMString FormatOutput(const CIrcMessage* pmsg) if (pmsg->m_bIncoming) {
if (pmsg->parameters.getCount() < 2 && pmsg->parameters.getCount() > 0)
- return pmsg->sCommand + _T(" : ") + pmsg->parameters[0];
+ return pmsg->sCommand + L" : " + pmsg->parameters[0];
if (pmsg->parameters.getCount() > 1)
for (int i = 1; i < (int)pmsg->parameters.getCount(); i++)
- sMessage += pmsg->parameters[i] + _T(" ");
+ sMessage += pmsg->parameters[i] + L" ";
}
else {
if (pmsg->prefix.sNick.GetLength())
- sMessage = pmsg->prefix.sNick + _T(" ");
- sMessage += pmsg->sCommand + _T(" ");
+ sMessage = pmsg->prefix.sNick + L" ";
+ sMessage += pmsg->sCommand + L" ";
for (int i = 0; i < (int)pmsg->parameters.getCount(); i++)
- sMessage += pmsg->parameters[i] + _T(" ");
+ sMessage += pmsg->parameters[i] + L" ";
}
THE_END:
@@ -134,16 +134,16 @@ BOOL CIrcProto::ShowMessage(const CIrcMessage* pmsg) CMString mess = FormatOutput(pmsg);
if (!pmsg->m_bIncoming)
- mess.Replace(_T("%%"), _T("%"));
+ mess.Replace(L"%%", L"%");
int iTemp = _ttoi(pmsg->sCommand.c_str());
//To active window
if ((iTemp > 400 || iTemp < 500) && pmsg->sCommand[0] == '4' //all error messages
- || pmsg->sCommand == _T("303") //ISON command
- || pmsg->sCommand == _T("INVITE")
- || ((pmsg->sCommand == _T("NOTICE")) && ((pmsg->parameters.getCount() > 2) ? (_tcsstr(pmsg->parameters[1].c_str(), _T("\001")) == NULL) : false)) // CTCP answers should go to m_network Log window!
- || pmsg->sCommand == _T("515")) //chanserv error
+ || pmsg->sCommand == L"303" //ISON command
+ || pmsg->sCommand == L"INVITE"
+ || ((pmsg->sCommand == L"NOTICE") && ((pmsg->parameters.getCount() > 2) ? (_tcsstr(pmsg->parameters[1].c_str(), L"\001") == NULL) : false)) // CTCP answers should go to m_network Log window!
+ || pmsg->sCommand == L"515") //chanserv error
{
DoEvent(GC_EVENT_INFORMATION, NULL, pmsg->m_bIncoming ? pmsg->prefix.sNick.c_str() : m_info.sNick.c_str(), mess.c_str(), NULL, NULL, NULL, true, pmsg->m_bIncoming ? false : true);
return TRUE;
|