linux - Setting up an IRC server with persistent chat history and timestamps on Raspbian?

07
2014-07
  • Soullesswaffle

    I have bought a Raspberry Pi which I intend to use as a 24/7 IRC server, probably using IRCD-Hybrid. Ideally, this server would have a persistent chat history (where new people joining the channel(s?) should automatically see the chat's last x messages) as well as working timestamps. If possible, users would be able to see this chat history regardless of the IRC client they're using, but if this requires me to host some sort of modified web client alongside the IRC server then that's no problem.

    I have seen several similar questions on SU (see this and this), but I was wondering if this is specifically possible in Linux with a self-hosted IRC server, and if so, how best to do it.

    Any advice would be immensely appreciated.

  • Answers
  • ultrasawblade

    IRC itself doesn't record chat history, it only forwards messages between users. Some ircd's may have a logging facility that dumps every message going past it, but unless you have IRC bots running in every channel, which is not a feasible or scalable solution when any user can create their own channels, "replaying" the channel history to users is not possible.

    A bouncer can do this, but this is something that typically the end user has complete control over, if you're wanting to keep chat logs for auditing purposes or something like that.

    However, PHP Free Chat works like you want, only requires Apache and PHP, and the end user doesn't have to worry about installing a client.


  • Related Question

    osx - Viewing the full Skype chat history
  • hekevintran

    I have Skype 2.8 on Mac OS X 10.5.8.

    Under the the chat menu is an option called "Recent Chats". This allows me to see logs of recent chats, but not of older ones.

    I know the older ones are stored because they are in ~/Library/Application Support/Skype/username/chatmsg256.dbb. This file when put in a text editor has text chat information from all my previous Skype chats. It is however stored in an unknown file format that I do not know how to parse.

    Does Skype have a built-in log viewer (like Adium's) that I can use to access these older logs?


  • Related Answers
  • 8088

    I'm not sure if this shows the entire history, but try the following. Whether the contact is online or offline, pop up the chat window.

    Click blue chat button

    Then click "All" under "View earlier messages:".

    Click all

    Alternatively, click the gear icon for the contact and select "View Chat History". That generates an html file that is opened in your web browser window.

    The reason I'm not sure if this shows all the history is because I can't fully remember when my chat history began on this computer.

  • Daniel Beck

    Skype stores its chat history in a SQLite database: ~/Library/Application Support/Skype/YourSkypeName/main.db. You can use the command line sqlite3 tool to view the chat logs.

    Find out user names of your chat partners

    The following command in Terminal (I'm assuming you're using the bash shell) lists all your chat partners' user names:

    sqlite3 /Users/danielbeck/Library/Application\ Support/Skype/YourSkypeName/main.db 'SELECT DISTINCT(dialog_partner) FROM Messages;'

    Extract all messages to and from a specific chat partner

    Option A. Write to terminal

    To print all messages to and from a certain chat partner (theOtherPersonsUserName), use the following command:

    sqlite3 /Users/danielbeck/Library/Application\ Support/Skype/YourSkypeName/main.db "SELECT author, from_dispname, datetime(timestamp, 'unixepoch') as date, body_xml FROM Messages where dialog_partner = 'theOtherPersonsUserName' ORDER BY timestamp;"

    This will print one message per line, chronologically, with sending username, display name, date, and text, like the following:

    danielbecks-username|Daniel Beck|2012-02-03 08:47:53|Just testing something

    Option B. Write to file

    You can write this chat log directly to a file. Run the following to write the log with theOtherPersonsUserName to the file theOtherPersonsUserName.log:

    sqlite3 /Users/danielbeck/Library/Application\ Support/Skype/YourSkypeName/main.db "SELECT author, from_dispname, datetime(timestamp, 'unixepoch') as date, body_xml FROM Messages where dialog_partner = 'theOtherPersonsUserName' ORDER BY timestamp;" > "theOtherPersonsUserName.log"


    Of course, you can also open main.db in any SQLite database viewer and go from there.

  • Jeff

    I found a Mac tool that can help you: http://g-recorder.com/for-mac-users-en/ It exports chat history in Gmail, quite useful for later search and backup. Although there is Windows version as well.

  • 8088

    Try SkypeHistoryViewer.

    A small program that will allow the user to open all history of Skype activity that is on a PC, check your kids usage, who there talking to what there saying or check on a cheating partner. Currently for Windows Vista and 7.