Kopachris / seshet

Modular, dynamic Python IRC bot
BSD 3-Clause "New" or "Revised" License
1 stars 1 forks source link

Text logging for private messages #6

Closed Kopachris closed 9 years ago

Kopachris commented 9 years ago

The default configuration uses the event's target as part of the file name for text logs. This will mean that private messages directed to Seshet rather than a channel will be logged in a file named Seshet-mmddyy.log. This is inconvenient because if Seshet replies to those messages (or otherwise sends private messages), the replies will be logged in a file with the nick of the user Seshet is replying to.

The correct behavior would be to check if target == self.nickname and if so assign target = source before opening the log file. This behavior should only be implemented in _log_to_file(), as we still want actual event details in SQL logs.