A logging plugin for yaib that simply connects all the standard chat callbacks to the persistence layer.
The only thing required is a properly configured persistence module (Yaib comes
configured with a working local sqlite database out of the box - change the
persistence.connection string in config.json to change database connections.
Consult the Yaib and SQLAlchemy docs for more info.
This plugin creates two tables in the database, Log and Activity. Chat
messages, actions, private messages, and commands are all put into the Log
table, while general server activity like joining and leaving channels,
kicking/being kicked, and quitting the server are recorded in the Activity
table.
Rows in the Log table can have any of the following values in the log_type
column.
message- regular messages from a user or yaibpm- a private message from a user to yaibaction- an action by a user (eg, /me does an thing)command- a command run by a useradmin_command- an admin level command run by a user
Rows in the Activity table can have any of the following values in the
activity_type column:
user_joined- a user joins a channeluser_left- a user leaves a channeluser_quit- a user leaves the serveruser_kick- a user is kicked (the user and nick columns are the kicker, info1 is the kickee, info2 is the kick message)user_renamed- a user changes nickjoined- yaib joins a channelleft- yaib leaves a channelkick- yaib is kicked from a channel (the user and nick columns are the kicker)nick_change- yaib changes nicks