EventNotifier should show dates/times in the client's timezone
This commit is contained in:
@@ -4,7 +4,7 @@
|
||||
#pragma semicolon 1
|
||||
#pragma newdecls required
|
||||
|
||||
#define PLUGIN_VERSION "1.1"
|
||||
#define PLUGIN_VERSION "1.2"
|
||||
#define CHAT_PREFIX "\x04[Events]\x01"
|
||||
|
||||
#define PANEL_LINE_WIDTH 60
|
||||
@@ -83,9 +83,15 @@ void ShowEventList(int client)
|
||||
if (!EventNotifier_GetEvent(i, ev))
|
||||
continue;
|
||||
|
||||
char info[16], display[EVENT_STR_LEN + 16];
|
||||
char info[16], display[EVENT_STR_LEN + 64];
|
||||
IntToString(ev.number, info, sizeof(info));
|
||||
Format(display, sizeof(display), "%d: %s", ev.number, ev.name);
|
||||
if (ev.start > 0)
|
||||
{
|
||||
char when[48];
|
||||
EventNotifier_FormatClientTime(client, ev.start, when, sizeof(when), false);
|
||||
Format(display, sizeof(display), "%s (%s)", display, when);
|
||||
}
|
||||
menu.AddItem(info, display);
|
||||
}
|
||||
|
||||
@@ -140,7 +146,7 @@ void ShowEventDetails(int client, int index)
|
||||
if (ev.start > 0)
|
||||
{
|
||||
char when[64];
|
||||
FormatTime(when, sizeof(when), "%a %d %b %Y, %H:%M %Z", ev.start);
|
||||
EventNotifier_FormatClientTime(client, ev.start, when, sizeof(when));
|
||||
Format(line, sizeof(line), "Date: %s", when);
|
||||
panel.DrawText(line);
|
||||
|
||||
|
||||
Reference in New Issue
Block a user