summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--protocols/IRCG/src/commandmonitor.cpp21
-rw-r--r--protocols/IRCG/src/services.cpp2
-rw-r--r--protocols/IRCG/src/tools.cpp16
3 files changed, 20 insertions, 19 deletions
diff --git a/protocols/IRCG/src/commandmonitor.cpp b/protocols/IRCG/src/commandmonitor.cpp
index 10fb63b7ff..1219816788 100644
--- a/protocols/IRCG/src/commandmonitor.cpp
+++ b/protocols/IRCG/src/commandmonitor.cpp
@@ -358,7 +358,7 @@ bool CIrcProto::OnIrc_JOIN(const CIrcMessage* pmsg)
{
if (pmsg->parameters.getCount() > 0 && pmsg->m_bIncoming && pmsg->prefix.sNick != m_info.sNick) {
CMStringW host = pmsg->prefix.sUser + L"@" + pmsg->prefix.sHost;
- DoEvent(GC_EVENT_JOIN, pmsg->parameters[0], pmsg->prefix.sNick, NULL, L"Normal", host, NULL, true, false);
+ DoEvent(GC_EVENT_JOIN, pmsg->parameters[0], pmsg->prefix.sNick, NULL, TranslateT("Normal"), host, NULL, true, false);
DoEvent(GC_EVENT_SETCONTACTSTATUS, pmsg->parameters[0], pmsg->prefix.sNick, NULL, NULL, NULL, ID_STATUS_ONLINE, FALSE, FALSE);
}
else ShowMessage(pmsg);
@@ -1270,15 +1270,16 @@ bool CIrcProto::OnIrc_ENDNAMES(const CIrcMessage* pmsg)
PostIrcMessage(L"/MODE %s", sChanName);
// register the statuses
- Chat_AddGroup(m_szModuleName, sID, L"Owner");
- Chat_AddGroup(m_szModuleName, sID, L"Admin");
- Chat_AddGroup(m_szModuleName, sID, L"Op");
- Chat_AddGroup(m_szModuleName, sID, L"Halfop");
- Chat_AddGroup(m_szModuleName, sID, L"Voice");
- Chat_AddGroup(m_szModuleName, sID, L"Normal");
+ Chat_AddGroup(m_szModuleName, sID, TranslateT("Owner"));
+ Chat_AddGroup(m_szModuleName, sID, TranslateT("Admin"));
+ Chat_AddGroup(m_szModuleName, sID, TranslateT("Op"));
+ Chat_AddGroup(m_szModuleName, sID, TranslateT("Halfop"));
+ Chat_AddGroup(m_szModuleName, sID, TranslateT("Voice"));
+ Chat_AddGroup(m_szModuleName, sID, TranslateT("Normal"));
{
int k = 0;
CMStringW sTemp = GetWord(sNamesList, k);
+ const wchar_t *pwszNormal = TranslateT("Normal");
// Fill the nicklist
while (!sTemp.IsEmpty()) {
@@ -1287,7 +1288,7 @@ bool CIrcProto::OnIrc_ENDNAMES(const CIrcMessage* pmsg)
sStat = PrefixToStatus(sTemp[0]);
// fix for networks like freshirc where they allow more than one prefix
- while (PrefixToStatus(sTemp[0]) != L"Normal")
+ while (PrefixToStatus(sTemp[0]) != pwszNormal)
sTemp.Delete(0, 1);
GCDEST gcd = { m_szModuleName, sID, GC_EVENT_JOIN };
@@ -1315,10 +1316,10 @@ bool CIrcProto::OnIrc_ENDNAMES(const CIrcMessage* pmsg)
Chat_Event(&gce);
DoEvent(GC_EVENT_SETCONTACTSTATUS, sChanName, sTemp, NULL, NULL, NULL, ID_STATUS_ONLINE, FALSE, FALSE);
// fix for networks like freshirc where they allow more than one prefix
- if (PrefixToStatus(sTemp2[0]) != L"Normal") {
+ if (PrefixToStatus(sTemp2[0]) != pwszNormal) {
sTemp2.Delete(0, 1);
sStat = PrefixToStatus(sTemp2[0]);
- while (sStat != L"Normal") {
+ while (sStat != pwszNormal) {
DoEvent(GC_EVENT_ADDSTATUS, sID, sTemp, L"system", sStat, NULL, NULL, false, false, 0);
sTemp2.Delete(0, 1);
sStat = PrefixToStatus(sTemp2[0]);
diff --git a/protocols/IRCG/src/services.cpp b/protocols/IRCG/src/services.cpp
index 9004d1beee..dc0b504209 100644
--- a/protocols/IRCG/src/services.cpp
+++ b/protocols/IRCG/src/services.cpp
@@ -206,7 +206,7 @@ int __cdecl CIrcProto::OnContactDeleted(WPARAM wp, LPARAM)
S = MakeWndID(dbv.ptszVal);
if (type == GCW_SERVER)
S = SERVERWINDOW;
- int i = Chat_Terminate(m_szModuleName, S, false);
+ int i = Chat_Terminate(m_szModuleName, S);
if (i && type == GCW_CHATROOM)
PostIrcMessage(L"/PART %s %s", dbv.ptszVal, m_userInfo);
}
diff --git a/protocols/IRCG/src/tools.cpp b/protocols/IRCG/src/tools.cpp
index 4b5159450f..b6e5344e4d 100644
--- a/protocols/IRCG/src/tools.cpp
+++ b/protocols/IRCG/src/tools.cpp
@@ -426,21 +426,21 @@ CMStringW CIrcProto::ModeToStatus(int sMode)
if (sUserModes.Find(sMode) != -1) {
switch (sMode) {
case 'q':
- return (CMStringW)L"Owner";
+ return TranslateT("Owner");
case 'o':
- return (CMStringW)L"Op";
+ return TranslateT("Op");
case 'v':
- return (CMStringW)L"Voice";
+ return TranslateT("Voice");
case 'h':
- return (CMStringW)L"Halfop";
+ return TranslateT("Halfop");
case 'a':
- return (CMStringW)L"Admin";
+ return TranslateT("Admin");
default:
- return (CMStringW)L"Unknown";
+ return TranslateT("Unknown");
}
}
- return (CMStringW)L"Normal";
+ return TranslateT("Normal");
}
CMStringW CIrcProto::PrefixToStatus(int cPrefix)
@@ -451,7 +451,7 @@ CMStringW CIrcProto::PrefixToStatus(int cPrefix)
return ModeToStatus(sUserModes[index]);
}
- return (CMStringW)L"Normal";
+ return TranslateT("Normal");
}
/////////////////////////////////////////////////////////////////////////////////////////