Copyright
maiden-chatlog is licensed under the Artistic license. © Nicolas Hafner <shinmera@tymoon.eu> . This library can be obtained on https://github.com/Shinmera/maiden.Package Index
-
MAIDEN-CHATLOG (ORG.SHIRAKUMO.MAIDEN.AGENTS.CHATLOG)
-
class ACTIVATE
-
class ACTIVATE-ON
-
class CHATLOG
This agent handles the recording of messages and activity in a channel to a database, potentially for public viewing on the web.
-
class DEACTIVATE
-
class DEACTIVATE-ON
-
class INITIALIZE
-
accessor (
CONNECTION
DESIGNATOR
)
Accessor to the connection information. Returns a list of six values as expected by the postmodern interface. When set, it expects a plist where the values to set are given by their respective keyword-value pairs.
-
function (
ADD-CHANNEL
CHANNEL-ISH
)
Adds the channel for logging. If the channel is already being logged, an error is signalled. See CHANNEL-DESIGNATOR See WITH-DB
-
function (
DEL-CHANNEL
CHANNEL-ISH
)
Removes the channel from logging. The actual data that was logged on the channel is not removed, however. If the channel is not being logged, an error is signalled. See CHANNEL-DESIGNATOR See WITH-DB
-
function (
INITIALIZE-DATABASE
&REST ARGS &KEY DATABASE USER PASSWORD HOST PORT
)
Set up the necessary tables on the database. The tables created will be called "channels" and "chatlog", along with an index called "chatlog_channel-id_index". The tables are not created if they already exist. See WITH-DB
-
function (
MAYBE-RECORD-MESSAGE
C TYPE CHANNEL USER MESSAGE &REST FORMAT-ARGS
)
Records the message, if the connection to the database can be established. Push the message to record onto the back-queue of the client, and then try to process the client's back-queue if possible.
-
function (
PREPARED-STATEMENT
STATEMENT &REST VARIABLES
)
Execute a prepared statement. See CL-POSTGRES:PREPARE-QUERY See CL-POSTGRES:EXEC-PREPARED
-
function (
PROCESS-BACK-QUEUE
C
)
Process the queue on the consumer and record all messages, if possible. See MAYBE-RECORD-MESSAGE
-
function (
RECORD-MESSAGE
TYPE CHANNEL USER TIME MESSAGE &REST FORMAT-ARGS
)
Record a message of a given type in the database. TYPE must be an acceptable type as by TYPE->CHAR See TYPE->CHAR See CHANNEL-DESIGNATOR See USER-DESIGNATOR
-
macro (
WITH-DB
&REST ARGS
)
Call the body with an active database connection. If a connection is already active, nothing is done aside from evaluating the body. See POSTMODERN:*DATABASE* See POSTMODERN:WITH-CONNECTION See CONNECTION
-
command activate chatlog
Activate chat logging for the current channel.
-
command (
activate chatlog on
CLIENT CHANNEL
)
Activate logging on a specific client's channel.
-
command deactivate chatlog
Deactivate chat logging on the current channel.
-
command (
deactivate chatlog on
CLIENT CHANNEL
)
Deactivate chat logging on a specific client's channel.
-
command (
initialize chatlog
&KEY (HOST "localhost") (DB "chatlog") (USER "chatlog") PASSWORD (PORT 5432)
)
Set up the chatlog's postgres connection details.
-