summaryrefslogtreecommitdiff
path: root/plugins/TrafficCounter
diff options
context:
space:
mode:
authorGeorge Hazan <george.hazan@gmail.com>2016-07-25 10:31:04 +0000
committerGeorge Hazan <george.hazan@gmail.com>2016-07-25 10:31:04 +0000
commit8ae3679aa1339ce9abee53adb69902bd6b7513dc (patch)
tree94ef8927e12043ed6dcc15e1e640d68a8add520e /plugins/TrafficCounter
parent1e273e28d89b5838e3d0f0cafac9676577cb71ce (diff)
hello, Unix.
phase 1: removing _T() git-svn-id: http://svn.miranda-ng.org/main/trunk@17127 1316c22d-e87f-b044-9b9b-93d7a3e3ba9c
Diffstat (limited to 'plugins/TrafficCounter')
-rw-r--r--plugins/TrafficCounter/src/TrafficCounter.cpp14
-rw-r--r--plugins/TrafficCounter/src/misc.cpp34
-rw-r--r--plugins/TrafficCounter/src/options.cpp24
-rw-r--r--plugins/TrafficCounter/src/statistics.cpp14
-rw-r--r--plugins/TrafficCounter/src/vars.cpp42
5 files changed, 64 insertions, 64 deletions
diff --git a/plugins/TrafficCounter/src/TrafficCounter.cpp b/plugins/TrafficCounter/src/TrafficCounter.cpp
index 0afa14a1e9..3dea6dd19d 100644
--- a/plugins/TrafficCounter/src/TrafficCounter.cpp
+++ b/plugins/TrafficCounter/src/TrafficCounter.cpp
@@ -42,7 +42,7 @@ _T("{I4}\x0D\x0A\x0A\
{L180}?if3(?tc_GetTime(%extratext%,now,hh:mm:ss),)\x0D\x0A\x0A\
{L230}?if3(?tc_GetTime(%extratext%,total,d hh:mm),)");
-TCHAR* TRAFFIC_COUNTER_WINDOW_CLASS = _T("TrafficCounterWnd");
+TCHAR* TRAFFIC_COUNTER_WINDOW_CLASS = L"TrafficCounterWnd";
/*-------------------------------------------------------------------------------------------------------------------*/
//TRAFFIC COUNTER
@@ -235,7 +235,7 @@ int TrafficCounterModulesLoaded(WPARAM, LPARAM)
}
else //defaults here
{
- mir_tstrcpy(Traffic_TooltipFormat, _T("Traffic Counter"));
+ mir_tstrcpy(Traffic_TooltipFormat, L"Traffic Counter");
}
Traffic_AdditionSpace = db_get_b(NULL, TRAFFIC_SETTINGS_GROUP, SETTINGS_ADDITION_SPACE, 0);
@@ -254,7 +254,7 @@ int TrafficCounterModulesLoaded(WPARAM, LPARAM)
TrafficFontID.deffontsettings.colour = GetSysColor(COLOR_BTNTEXT);
TrafficFontID.deffontsettings.size = 12;
TrafficFontID.deffontsettings.style = 0;
- mir_tstrcpy(TrafficFontID.deffontsettings.szFace, _T("Arial"));
+ mir_tstrcpy(TrafficFontID.deffontsettings.szFace, L"Arial");
TrafficFontID.order = 0;
FontRegisterT(&TrafficFontID);
@@ -487,14 +487,14 @@ int PaintTrafficCounterWindow(HWND hwnd, HDC hDC)
if (unOptions.DrawTotalTimeCounter) {
TCHAR bu[32];
- GetDurationFormatM(ProtoList[i].Total.Timer, _T("h:mm:ss"), bu, 32);
+ GetDurationFormatM(ProtoList[i].Total.Timer, L"h:mm:ss", bu, 32);
TC_AlphaText(hdc, bu, &rect, DT_SINGLELINE | DT_RIGHT | DT_TOP, ClistModernPresent);
}
// Текущее время.
if (unOptions.DrawCurrentTimeCounter) {
TCHAR bu[32];
- GetDurationFormatM(ProtoList[i].Session.Timer, _T("h:mm:ss"), bu, 32);
+ GetDurationFormatM(ProtoList[i].Session.Timer, L"h:mm:ss", bu, 32);
rect.right -= 50;
TC_AlphaText(hdc, bu, &rect, DT_SINGLELINE | DT_RIGHT | DT_TOP, ClistModernPresent);
rect.right += 50;
@@ -550,14 +550,14 @@ int PaintTrafficCounterWindow(HWND hwnd, HDC hDC)
if (unOptions.DrawTotalTimeCounter) {
TCHAR bu[32];
- GetDurationFormatM(OverallInfo.Total.Timer, _T("h:mm:ss"), bu, 32);
+ GetDurationFormatM(OverallInfo.Total.Timer, L"h:mm:ss", bu, 32);
TC_AlphaText(hdc, bu, &rect, DT_SINGLELINE | DT_RIGHT | DT_TOP, ClistModernPresent);
}
// Текущее время.
if (unOptions.DrawCurrentTimeCounter) {
TCHAR bu[32];
- GetDurationFormatM(OverallInfo.Session.Timer, _T("h:mm:ss"), bu, 32);
+ GetDurationFormatM(OverallInfo.Session.Timer, L"h:mm:ss", bu, 32);
rect.right -= 50;
TC_AlphaText(hdc, bu, &rect, DT_SINGLELINE | DT_RIGHT | DT_TOP, ClistModernPresent);
rect.right += 50;
diff --git a/plugins/TrafficCounter/src/misc.cpp b/plugins/TrafficCounter/src/misc.cpp
index ef54ae6ed1..5c23fd4541 100644
--- a/plugins/TrafficCounter/src/misc.cpp
+++ b/plugins/TrafficCounter/src/misc.cpp
@@ -47,7 +47,7 @@ WORD GetRowItems(TCHAR *InputString, RowItemInfo **RowItemsList)
*RowItemsList = (RowItemInfo*)mir_realloc(*RowItemsList, sizeof(RowItemInfo) * (c + 1));
// Разбираем тег.
- _stscanf(begin + 1, _T("%c%hd"),
+ _stscanf(begin + 1, L"%c%hd",
&((*RowItemsList)[c].Alignment),
&((*RowItemsList)[c].Interval));
@@ -122,7 +122,7 @@ size_t GetFormattedTraffic(DWORD Value, BYTE Unit, TCHAR *Buffer, size_t Size)
{
TCHAR Str1[32], szUnit[4] = { ' ', 0 };
DWORD Divider;
- NUMBERFMT nf = { 0, 1, 3, _T(","), _T(" "), 0 };
+ NUMBERFMT nf = { 0, 1, 3, L",", L" ", 0 };
TCHAR *Res; // Промежуточный результат.
switch (Unit) {
@@ -148,7 +148,7 @@ size_t GetFormattedTraffic(DWORD Value, BYTE Unit, TCHAR *Buffer, size_t Size)
return 0;
}
- mir_sntprintf(Str1, _T("%d.%d"), Value / Divider, Value % Divider);
+ mir_sntprintf(Str1, L"%d.%d", Value / Divider, Value % Divider);
size_t l = GetNumberFormat(LOCALE_USER_DEFAULT, 0, Str1, &nf, NULL, 0);
if (!l) return 0;
l += mir_tstrlen(szUnit) + 1;
@@ -197,39 +197,39 @@ size_t GetDurationFormatM(DWORD Duration, TCHAR *Format, TCHAR *Buffer, size_t S
Token[TokenIndex] = 0;
// Что получили в аккумуляторе?
- if (!mir_tstrcmp(Token, _T("d"))) {
+ if (!mir_tstrcmp(Token, L"d")) {
q = Duration / (60 * 60 * 24);
- mir_sntprintf(Token, _T("%d"), q);
+ mir_sntprintf(Token, L"%d", q);
Duration -= q * 60 * 60 * 24;
}
- else if (!mir_tstrcmp(Token, _T("h"))) {
+ else if (!mir_tstrcmp(Token, L"h")) {
q = Duration / (60 * 60);
- mir_sntprintf(Token, _T("%d"), q);
+ mir_sntprintf(Token, L"%d", q);
Duration -= q * 60 * 60;
}
- else if (!mir_tstrcmp(Token, _T("hh"))) {
+ else if (!mir_tstrcmp(Token, L"hh")) {
q = Duration / (60 * 60);
- mir_sntprintf(Token, _T("%02d"), q);
+ mir_sntprintf(Token, L"%02d", q);
Duration -= q * 60 * 60;
}
- else if (!mir_tstrcmp(Token, _T("m"))) {
+ else if (!mir_tstrcmp(Token, L"m")) {
q = Duration / 60;
- mir_sntprintf(Token, _T("%d"), q);
+ mir_sntprintf(Token, L"%d", q);
Duration -= q * 60;
}
- else if (!mir_tstrcmp(Token, _T("mm"))) {
+ else if (!mir_tstrcmp(Token, L"mm")) {
q = Duration / 60;
- mir_sntprintf(Token, _T("%02d"), q);
+ mir_sntprintf(Token, L"%02d", q);
Duration -= q * 60;
}
- else if (!mir_tstrcmp(Token, _T("s"))) {
+ else if (!mir_tstrcmp(Token, L"s")) {
q = Duration;
- mir_sntprintf(Token, _T("%d"), q);
+ mir_sntprintf(Token, L"%d", q);
Duration -= q;
}
- else if (!mir_tstrcmp(Token, _T("ss"))) {
+ else if (!mir_tstrcmp(Token, L"ss")) {
q = Duration;
- mir_sntprintf(Token, _T("%02d"), q);
+ mir_sntprintf(Token, L"%02d", q);
Duration -= q;
}
diff --git a/plugins/TrafficCounter/src/options.cpp b/plugins/TrafficCounter/src/options.cpp
index 3a4c6e8532..81fc55b629 100644
--- a/plugins/TrafficCounter/src/options.cpp
+++ b/plugins/TrafficCounter/src/options.cpp
@@ -126,15 +126,15 @@ static INT_PTR CALLBACK DlgProcPopupsTraffic(HWND hwndDlg, UINT msg, WPARAM wPar
static OPTTREE_OPTION options[] =
{
- {0, LPGENT("Display") _T("/") LPGENT("Icon"), OPTTREE_CHECK, OPTTREE_INVISIBLE, NULL, "DrawProtoIcon"},
- {0, LPGENT("Display") _T("/") LPGENT("Account name"), OPTTREE_CHECK, OPTTREE_INVISIBLE, NULL, "DrawProtoName"},
- {0, LPGENT("Display") _T("/") LPGENT("Current traffic"), OPTTREE_CHECK, OPTTREE_INVISIBLE, NULL, "DrawCurrentTraffic"},
- {0, LPGENT("Display") _T("/") LPGENT("Total traffic"), OPTTREE_CHECK, OPTTREE_INVISIBLE, NULL, "DrawTotalTraffic"},
- {0, LPGENT("Display") _T("/") LPGENT("Current online"), OPTTREE_CHECK, OPTTREE_INVISIBLE, NULL, "DrawCurrentTime"},
- {0, LPGENT("Display") _T("/") LPGENT("Total online"),OPTTREE_CHECK, OPTTREE_INVISIBLE, NULL, "DrawTotalTime"},
- {0, LPGENT("General") _T("/") LPGENT("Draw frame as skin element"), OPTTREE_CHECK, 1, NULL, "DrawFrmAsSkin"},
- {0, LPGENT("General") _T("/") LPGENT("Show tooltip in traffic window"), OPTTREE_CHECK, 1, NULL, "ShowTooltip"},
- {0, LPGENT("General") _T("/") LPGENT("\"Toggle traffic counter\" in main menu"), OPTTREE_CHECK, 1, NULL, "ShowMainMenuItem"},
+ {0, LPGENT("Display") L"/" LPGENT("Icon"), OPTTREE_CHECK, OPTTREE_INVISIBLE, NULL, "DrawProtoIcon"},
+ {0, LPGENT("Display") L"/" LPGENT("Account name"), OPTTREE_CHECK, OPTTREE_INVISIBLE, NULL, "DrawProtoName"},
+ {0, LPGENT("Display") L"/" LPGENT("Current traffic"), OPTTREE_CHECK, OPTTREE_INVISIBLE, NULL, "DrawCurrentTraffic"},
+ {0, LPGENT("Display") L"/" LPGENT("Total traffic"), OPTTREE_CHECK, OPTTREE_INVISIBLE, NULL, "DrawTotalTraffic"},
+ {0, LPGENT("Display") L"/" LPGENT("Current online"), OPTTREE_CHECK, OPTTREE_INVISIBLE, NULL, "DrawCurrentTime"},
+ {0, LPGENT("Display") L"/" LPGENT("Total online"),OPTTREE_CHECK, OPTTREE_INVISIBLE, NULL, "DrawTotalTime"},
+ {0, LPGENT("General") L"/" LPGENT("Draw frame as skin element"), OPTTREE_CHECK, 1, NULL, "DrawFrmAsSkin"},
+ {0, LPGENT("General") L"/" LPGENT("Show tooltip in traffic window"), OPTTREE_CHECK, 1, NULL, "ShowTooltip"},
+ {0, LPGENT("General") L"/" LPGENT("\"Toggle traffic counter\" in main menu"), OPTTREE_CHECK, 1, NULL, "ShowMainMenuItem"},
// Резервируем место под активные и видимые протоколы
// Максимум 16 позиций видимых и 16 активных
{0, NULL, OPTTREE_CHECK, OPTTREE_INVISIBLE, NULL, NULL},
@@ -169,8 +169,8 @@ static OPTTREE_OPTION options[] =
{0, NULL, OPTTREE_CHECK, OPTTREE_INVISIBLE, NULL, NULL},
{0, NULL, OPTTREE_CHECK, OPTTREE_INVISIBLE, NULL, NULL},
{0, NULL, OPTTREE_CHECK, OPTTREE_INVISIBLE, NULL, NULL},
- {0, LPGENT("Visible accounts")_T("/") LPGENT("Summary traffic for visible accounts"), OPTTREE_CHECK, 1, NULL, "ShowSummary"},
- {0, LPGENT("Visible accounts")_T("/") LPGENT("Overall traffic"), OPTTREE_CHECK, 1, NULL, "ShowOverall"},
+ {0, LPGENT("Visible accounts")L"/" LPGENT("Summary traffic for visible accounts"), OPTTREE_CHECK, 1, NULL, "ShowSummary"},
+ {0, LPGENT("Visible accounts")L"/" LPGENT("Overall traffic"), OPTTREE_CHECK, 1, NULL, "ShowOverall"},
};
static INT_PTR CALLBACK DlgProcTCOptions(HWND hwndDlg, UINT msg, WPARAM wParam, LPARAM lParam)
@@ -196,7 +196,7 @@ static INT_PTR CALLBACK DlgProcTCOptions(HWND hwndDlg, UINT msg, WPARAM wParam,
mir_strcpy(options[i].szSettingName, ProtoList[j].name);
size_t l = 20 + mir_tstrlen(ProtoList[j].tszAccountName);
options[i].szOptionName = (TCHAR*)mir_alloc(sizeof(TCHAR) * l);
- mir_sntprintf(options[i].szOptionName, l, _T("Visible accounts/%s"), ProtoList[j].tszAccountName);
+ mir_sntprintf(options[i].szOptionName, l, L"Visible accounts/%s", ProtoList[j].tszAccountName);
options[i].dwFlag = (ProtoList[j++].Enabled ? 1 : OPTTREE_INVISIBLE) | OPTTREE_NOTRANSLATE;
}
Initialized = 1;
diff --git a/plugins/TrafficCounter/src/statistics.cpp b/plugins/TrafficCounter/src/statistics.cpp
index 6baaf37d9b..709d7e3724 100644
--- a/plugins/TrafficCounter/src/statistics.cpp
+++ b/plugins/TrafficCounter/src/statistics.cpp
@@ -36,7 +36,7 @@ INT_PTR CALLBACK DlgProcOptStatistics(HWND hwndDlg, UINT msg, WPARAM wParam, LPA
TranslateDialogDefault(hwndDlg);
// Создаём ListBox c перечнем аккаунтов.
hListAccs = CreateWindowEx(WS_EX_CLIENTEDGE,
- _T("ListBox"),
+ L"ListBox",
NULL, WS_CHILD | WS_VISIBLE | WS_VSCROLL | WS_TABSTOP | LBS_NOINTEGRALHEIGHT | LBS_EXTENDEDSEL | LBS_NOTIFY,
2, 20, 246, 112,
hwndDlg, NULL, NULL, NULL);
@@ -187,7 +187,7 @@ INT_PTR CALLBACK DlgProcOptStatistics(HWND hwndDlg, UINT msg, WPARAM wParam, LPA
switch (unOptions.Stat_Tab) {
case 0: // Hourly
GetDateFormat(LOCALE_USER_DEFAULT, DATE_SHORTDATE, &st, NULL, szBufW, 32);
- mir_sntprintf(pdi->item.pszText, 32, _T("%s %02d:00 - %02d:59"),
+ mir_sntprintf(pdi->item.pszText, 32, L"%s %02d:00 - %02d:59",
szBufW,
ProtoList[EldestAcc].AllStatistics[Index].Hour,
ProtoList[EldestAcc].AllStatistics[Index].Hour);
@@ -206,13 +206,13 @@ INT_PTR CALLBACK DlgProcOptStatistics(HWND hwndDlg, UINT msg, WPARAM wParam, LPA
vartime += 6;
VariantTimeToSystemTime(vartime, &st);
GetDateFormat(LOCALE_USER_DEFAULT, DATE_SHORTDATE, &st, NULL, szBufW, 32);
- mir_sntprintf(pdi->item.pszText, 32, _T("%s - %s"), pdi->item.pszText, szBufW);
+ mir_sntprintf(pdi->item.pszText, 32, L"%s - %s", pdi->item.pszText, szBufW);
break;
case 3: // Monthly
GetDateFormat(LOCALE_USER_DEFAULT, DATE_YEARMONTH, &st, NULL, pdi->item.pszText, 32);
break;
case 4: // Yearly
- mir_sntprintf(pdi->item.pszText, 32, _T("%d"), st.wYear);
+ mir_sntprintf(pdi->item.pszText, 32, L"%d", st.wYear);
break;
}
return 0;
@@ -229,7 +229,7 @@ INT_PTR CALLBACK DlgProcOptStatistics(HWND hwndDlg, UINT msg, WPARAM wParam, LPA
break;
case 4: // Время
{
- TCHAR *Fmt[5] = { _T("m:ss"), _T("h:mm:ss"), _T("h:mm:ss"), _T("d hh:mm:ss"), _T("d hh:mm:ss") };
+ TCHAR *Fmt[5] = { L"m:ss", L"h:mm:ss", L"h:mm:ss", L"d hh:mm:ss", L"d hh:mm:ss" };
GetDurationFormatM(Value, Fmt[unOptions.Stat_Tab], pdi->item.pszText, 32);
}
break;
@@ -300,9 +300,9 @@ void Stat_ReadFile(BYTE n)
TCHAR FileName[MAX_PATH], *pszPath;
SYSTEMTIME stNow;
- pszPath = Utils_ReplaceVarsT(_T("%miranda_userdata%\\statistics"));
+ pszPath = Utils_ReplaceVarsT(L"%miranda_userdata%\\statistics");
CreateDirectoryTreeT(pszPath);
- mir_sntprintf(FileName, _T("%s\\%S.stat"), pszPath, ProtoList[n].name);
+ mir_sntprintf(FileName, L"%s\\%S.stat", pszPath, ProtoList[n].name);
mir_free(pszPath);
GetLocalTime(&stNow);
ProtoList[n].hFile = CreateFile(FileName, GENERIC_READ | GENERIC_WRITE,
diff --git a/plugins/TrafficCounter/src/vars.cpp b/plugins/TrafficCounter/src/vars.cpp
index 5f55778802..62da3f32f7 100644
--- a/plugins/TrafficCounter/src/vars.cpp
+++ b/plugins/TrafficCounter/src/vars.cpp
@@ -30,7 +30,7 @@ static TCHAR* GetTraffic(ARGUMENTSINFO *ai)
if (ai->argc != 5) return NULL;
- if (!mir_tstrcmp(ai->targv[1], _T("overall")))
+ if (!mir_tstrcmp(ai->targv[1], L"overall"))
{
tmpsn = OverallInfo.CurrentSentTraffic;
tmprn = OverallInfo.CurrentRecvTraffic;
@@ -38,7 +38,7 @@ static TCHAR* GetTraffic(ARGUMENTSINFO *ai)
tmprt = OverallInfo.TotalRecvTraffic;
}
else
- if (!mir_tstrcmp(ai->targv[1], _T("summary")))
+ if (!mir_tstrcmp(ai->targv[1], L"summary"))
{
for (ed = 0; ed < NumberOfAccounts; ed++)
if (ProtoList[ed].Visible)
@@ -68,34 +68,34 @@ static TCHAR* GetTraffic(ARGUMENTSINFO *ai)
if (tmp != 0xAA) return NULL;
}
- if (!mir_tstrcmp(ai->targv[2], _T("now")))
+ if (!mir_tstrcmp(ai->targv[2], L"now"))
{
- if (!mir_tstrcmp(ai->targv[3], _T("sent"))) tmp = tmpsn;
+ if (!mir_tstrcmp(ai->targv[3], L"sent")) tmp = tmpsn;
else
- if (!mir_tstrcmp(ai->targv[3], _T("received"))) tmp = tmprn;
+ if (!mir_tstrcmp(ai->targv[3], L"received")) tmp = tmprn;
else
- if (!mir_tstrcmp(ai->targv[3], _T("both"))) tmp = tmprn + tmpsn;
+ if (!mir_tstrcmp(ai->targv[3], L"both")) tmp = tmprn + tmpsn;
else return NULL;
}
else
- if (!mir_tstrcmp(ai->targv[2], _T("total")))
+ if (!mir_tstrcmp(ai->targv[2], L"total"))
{
- if (!mir_tstrcmp(ai->targv[3], _T("sent"))) tmp = tmpst;
+ if (!mir_tstrcmp(ai->targv[3], L"sent")) tmp = tmpst;
else
- if (!mir_tstrcmp(ai->targv[3], _T("received"))) tmp = tmprt;
+ if (!mir_tstrcmp(ai->targv[3], L"received")) tmp = tmprt;
else
- if (!mir_tstrcmp(ai->targv[3], _T("both"))) tmp = tmprt + tmpst;
+ if (!mir_tstrcmp(ai->targv[3], L"both")) tmp = tmprt + tmpst;
else return NULL;
}
else return NULL;
- if (!mir_tstrcmp(ai->targv[4], _T("b"))) ed = 0;
+ if (!mir_tstrcmp(ai->targv[4], L"b")) ed = 0;
else
- if (!mir_tstrcmp(ai->targv[4], _T("k"))) ed = 1;
+ if (!mir_tstrcmp(ai->targv[4], L"k")) ed = 1;
else
- if (!mir_tstrcmp(ai->targv[4], _T("m"))) ed = 2;
+ if (!mir_tstrcmp(ai->targv[4], L"m")) ed = 2;
else
- if (!mir_tstrcmp(ai->targv[4], _T("d"))) ed = 3;
+ if (!mir_tstrcmp(ai->targv[4], L"d")) ed = 3;
else return NULL;
// Получаем форматированную строку и возвращаем указатель на неё.
@@ -126,21 +126,21 @@ static TCHAR* GetTime(ARGUMENTSINFO *ai)
if (!mir_tstrcmp(buf, ai->targv[1]))
{
flag = 0xAA;
- if (!mir_tstrcmp(ai->targv[2], _T("now")))
+ if (!mir_tstrcmp(ai->targv[2], L"now"))
Duration = ProtoList[ed].Session.Timer;
- else if (!mir_tstrcmp(ai->targv[2], _T("total")))
+ else if (!mir_tstrcmp(ai->targv[2], L"total"))
Duration = ProtoList[ed].Total.Timer;
else flag = 0;
break;
}
mir_free(buf);
}
- if ( (flag != 0xAA) && !mir_tstrcmp(ai->targv[1], _T("summary")) )
+ if ( (flag != 0xAA) && !mir_tstrcmp(ai->targv[1], L"summary") )
{
flag = 0xAA;
- if (!mir_tstrcmp(ai->targv[2], _T("now")))
+ if (!mir_tstrcmp(ai->targv[2], L"now"))
Duration = OverallInfo.Session.Timer;
- else if (!mir_tstrcmp(ai->targv[2], _T("total")))
+ else if (!mir_tstrcmp(ai->targv[2], L"total"))
Duration = OverallInfo.Total.Timer;
else flag = 0;
}
@@ -167,14 +167,14 @@ void RegisterVariablesTokens(void)
trs.cbSize = sizeof(TOKENREGISTER);
// Функция, возвращающая трафик
- trs.tszTokenString = _T("tc_GetTraffic");
+ trs.tszTokenString = L"tc_GetTraffic";
trs.parseFunctionT = GetTraffic;
trs.szHelpText = "Traffic counter\t(A,B,C,D)\tGet traffic counter value. A: <ProtocolName> OR overall OR summary; B: now OR total; C: sent OR received OR both; D: b - in bytes, k - in kilobytes, m - in megabytes, d - dynamic";
trs.flags = TRF_TCHAR | TRF_PARSEFUNC | TRF_FUNCTION | TRF_FREEMEM;
trs.memType = TR_MEM_MIRANDA;
CallService(MS_VARS_REGISTERTOKEN, 0, (LPARAM)&trs);
// Функция, возвращающая время
- trs.tszTokenString = _T("tc_GetTime");
+ trs.tszTokenString = L"tc_GetTime";
trs.parseFunctionT = GetTime;
trs.szHelpText = "Traffic counter\t(A,B,C)\tGet time counter value. A: <ProtocolName> OR summary; B: now OR total; C: format";
CallService(MS_VARS_REGISTERTOKEN, 0, (LPARAM)&trs);