The message stores don't need to access the internal network
struct, they just need network metadata such as ID and name.
This can ease moving message stores into a separate package in the
future.
git-svn-id: file:///srv/svn/repo/suika/trunk@666 f0ae65fe-ee39-954e-97ec-027ff2717ef4
Initially, before connecting to the network, the log dir will be
empty. Return an empty list of chat history targets in this case.
git-svn-id: file:///srv/svn/repo/suika/trunk@628 f0ae65fe-ee39-954e-97ec-027ff2717ef4
Because msgstore_fs writes logs in localtime, the CHATHISTORY timestamps
(UTC) must be converted to localtime prior to filtering ranges ensure
the right range is sent back to the client.
Prior to this patch, the iteration back from the BEFORE time failed to
load the hours between midnight UTC and midnight localtime in each day's
logged messages. This is because the final time to be considered in a
day's log file (the "start" time) reuses the previous start time's
locale:
start = time.Date(year, month, day, 0, 0, 0, 0, start.Location()).Add(-1)
By converting the original start and end from the CHATHISTORY commands
to localtime in Load*Time and ListTargets, we ensure we read through
midnight each day.
git-svn-id: file:///srv/svn/repo/suika/trunk@610 f0ae65fe-ee39-954e-97ec-027ff2717ef4
Make new log files group-readable by default. To retain the prior
behavior, soju can be started with a umask set to 0077.
git-svn-id: file:///srv/svn/repo/suika/trunk@558 f0ae65fe-ee39-954e-97ec-027ff2717ef4
This allows to have shorter and more future-proof IDs. This also
guarantees the IDs will only use reasonable ASCII characters (no
spaces), removing the need to encode them for PING/PONG tokens.
git-svn-id: file:///srv/svn/repo/suika/trunk@488 f0ae65fe-ee39-954e-97ec-027ff2717ef4
Allow to query the network ID and entity from the message ID regardless
of the underlying store used.
git-svn-id: file:///srv/svn/repo/suika/trunk@440 f0ae65fe-ee39-954e-97ec-027ff2717ef4
This allows for other implementations that aren't based on a filesystem.
git-svn-id: file:///srv/svn/repo/suika/trunk@439 f0ae65fe-ee39-954e-97ec-027ff2717ef4