* Fix typos.
* Add words that are not typos to codespell's ignore words list and
ignore regex.
* Make codespell ignore URIs.
* Make `make doublecheck` throw no error.
Signed-off-by: Daniel Santos <dacs.git@brilhante.top>
Rotated log files will now be: `.local/share/profanity/logs/profanity.001.log`
We only use logrotation if we use the default log file ending with .log.
So Replacing the `.` should be fine.
User supplied log files are not rotated.
... I hope ...
We also need to create the path where the logs are stored.
Fixup of d82f2f293b
Signed-off-by: Steffen Jaeckel <jaeckel-floss@eyet-services.de>
43e5f15e66 broke the creation of the path
where chatlogs are stored. This is fixed now.
Signed-off-by: Steffen Jaeckel <jaeckel-floss@eyet-services.de>
See https://github.com/profanity-im/profanity/issues/1518
It has a good explanation of what happened:
```
Apparently, the _rotate_log_file function tried to extract user-provided
name from currently used mainlogfile and restart logging to the same
place after rotation, but currently this is interpreted as a full path
instead. As I understand, the log rotation is no longer done with
user-provided paths at all so this should be simply skipped altogether
now as passing any non-NULL value is interpreted as user-provided.
Replacing start with NULL appears to fix it for me.
```
In log_msg() we only rotate the log if not user_provided_log.
https://github.com/profanity-im/profanity/pull/1455 changed the
behaviour from user defined filename in the log dir to using full path.
98c38dc6d6
sets C99 as standard.
strdup() is not part of C99.
For now set `-D_POSIX_C_SOURCE=200809L` macro to have strdup() in C99.
Using `gnu99` instead would be another option.
We should take more care to use glib functions whenever possible.
Regards https://github.com/profanity-im/profanity/issues/1357
We now dont get the log files from the text files via chat_log_get_previous() anymore.
We use the sql backend via log_database_get_previous_chat().
So far it just has the same behaviour like chat_log_get_previous(),
except that in _chatwin_history() we don't pass the sender to
win_print_history() which should be fixed in a commit soon.
And log_database_get_previous_chat() can later easily be expanded to fix
https://github.com/profanity-im/profanity/issues/205.
If I'm not mistaken MUC PMs have not been logged at all if there was no
other client sending carbons.
This should add MUC PM logging functionality.
We still need to make sure carbons log to the same file.
Regards https://github.com/profanity-im/profanity/issues/1214
So far if one had enabled `/history` and did `/msg somenick` the history
was loaded from file and displayed like this:
```
04-04-17 15:23 - 3/4/2017:
01-01-00 10:30 - me: ....
01-01-00 10:31 - somebody: ....
01-01-00 10:32 - somebody: ....
```
So the first line contained the actual date. But the date used in each
line was always 01-01-2000. This date was for some reason hardcoded.
This commit now actually uses that date to build the proper GDateTime
instead of just printing it.
Fix https://github.com/profanity-im/profanity/issues/922
If we get a private message from a user in a MUC profanity shows this
like:
`profanity@roomsASDF.dismail.de/Martin: Hi`
This was so far logged at:
`~/.local/share/profanity/chatlogs/my-account-at-server/profanity_at_rooms.dismail.de/2019_09_04.log` as:
```
10:48:13 - profanity@rooms.dismail.de: Hi
```
So the nickname was not saved anywhere. This is due to us not knowing
whether we got a regular message from user@server.org/resource or a MUC
PM from room@server.org/user.
We now check for `<x xmlns='http://jabber.org/protocol/muc#user' />` and
add the resourcepart to the logging if we get it.
The file will be created at
`~/.local/share/profanity/chatlogs/my-account-at-server/profanity_at_rooms.dismail.de_nick` and look like:
```
23:59:43 - nick: Hi
```
Fix https://github.com/profanity-im/profanity/issues/1184