mirror of
https://github.com/znc/znc.git
synced 2026-06-29 22:41:39 +02:00
Introduce time zone (string) setting.
Presently unused but intended to supersede the current time zone offset. The advantage of a string is that it can be set to something like Europe/Copenhagen and thereby adapt to daylight savings time.
This commit is contained in:
@@ -59,6 +59,7 @@ class CAdminMod : public CModule {
|
||||
{"Password", str},
|
||||
{"JoinTries", integer},
|
||||
{"MaxJoins", integer},
|
||||
{"Timezone", str},
|
||||
{"TimezoneOffset", doublenum},
|
||||
{"Admin", boolean},
|
||||
{"AppendTimestamp", boolean},
|
||||
@@ -158,6 +159,8 @@ class CAdminMod : public CModule {
|
||||
PutModule("MaxJoins = " + CString(pUser->MaxJoins()));
|
||||
else if (sVar == "jointries")
|
||||
PutModule("JoinTries = " + CString(pUser->JoinTries()));
|
||||
else if (sVar == "timezone")
|
||||
PutModule("Timezone = " + pUser->GetTimezone());
|
||||
else if (sVar == "timezoneoffset")
|
||||
PutModule("TimezoneOffset = " + CString(pUser->GetTimezoneOffset()));
|
||||
else if (sVar == "appendtimestamp")
|
||||
@@ -276,6 +279,10 @@ class CAdminMod : public CModule {
|
||||
pUser->SetJoinTries(i);
|
||||
PutModule("JoinTries = " + CString(pUser->JoinTries()));
|
||||
}
|
||||
else if (sVar == "timezone") {
|
||||
pUser->SetTimezone(sValue);
|
||||
PutModule("Timezone = " + pUser->GetTimezone());
|
||||
}
|
||||
else if (sVar == "timezoneoffset") {
|
||||
double d = sValue.ToDouble();
|
||||
pUser->SetTimezoneOffset(d);
|
||||
|
||||
Reference in New Issue
Block a user