(index ("config" 0) ("$" 851) ("debug" 982) ("call-with-connection" 1114) ("start" 1283) ("command" 1525) ("message-handler" 2585) ("plugin" 2876) ("reply-to" 3095) ("whisper-to" 3858) ("say" 4052) ("add-finalizer" 4277) ("after-connect" 4449))
(def (sig (parameter "(config [SETTINGS])" (id config))) (p "The current vandusen instance's configuration settings. " (tt "SETTINGS") " is an alist of setting symbols and values. By default the following settings are available:") (dl (dt (tt "debug")) (dd "boolean, whether to log debug information (default: " (tt "#f") ")") (dt (tt "host")) (dd "string, the irc server host to connect to") (dt (tt "nick")) (dd "string, the nick name to use (default: " (tt "\"vandusen\"") ")") (dt (tt "channels")) (dd "list of strings, channels to join after connecting (default: " (tt "()") ")") (dt (tt "operators")) (dd "list of strings, users who are allowed to control vandusen (default: " (tt "()") ")") (dt (tt "allow-query")) (dd "boolean, whether to respond to queries (default: " (tt "#f") ")")) (p "Note that plugins may define additional settings."))
(def (sig (procedure "($ SETTING [VALUE])" (id $))) (p "Convenience procedure for accessing and setting configuration settings."))
(def (sig (procedure "(debug MESSAGE)" (id debug))) (p "Log debug message (only when " (tt "debug") " setting is " (tt "#t") ")."))
(def (sig (procedure "(call-with-connection PROC)" (id call-with-connection))) (p "Calls " (tt "PROC") " with the current " (int-link "/egg/irc" "irc") " connection."))
(def (sig (procedure "(start CONFIG-FILE)" (id start))) (p "Start vandusen with configuration read from " (tt "CONFIG-FILE") ". This allows running vandusen from inside your own program i.e. without the " (tt "vandusen") " driver program."))
(def (sig (procedure "(command NAME MATCHER HANDLER #!key PUBLIC)" (id command))) (p "Defines a command " (tt "NAME") " (a symbol) which is executed when " (tt "MATCHER") " (an unanchored regular expression) matches a message directed at vandusen (i.e. it was prefixed with \"vandusen: \" in a channel or sent via query and the " (tt "allow-query") " setting is " (tt "#t") "). " (tt "HANDLER") " is a procedure that accepts the matched " (int-link "/egg/irc" "irc") " message record and all possible submatches in " (tt "MATCHER") " as additional arguments. " (tt "PUBLIC") " is a boolean that determines whether this command is available for everyone (" (tt "#t") ") or only for operators (" (tt "#f") ") and is " (tt "#f") " by default.") (p "Commands are tried in the order they have been defined up until one matches. By default, only two commands are available: " (tt "reload") " which causes the config file to be reloaded and " (tt "authorize USER") " which adds " (tt "USER") " to the " (tt "operators") " list for the duration of the current run."))
(def (sig (procedure "(message-handler PROC #!key COMMAND SENDER RECEIVER BODY TAG CODE)" (id message-handler))) (p "This procedure merely calls the " (int-link "/egg/irc" "irc egg's") " " (tt "irc:add-message-handler!") " procedure with the first argument set to the current connection."))
(def (sig (procedure "(plugin NAME THUNK)" (id plugin))) (p "Registers plugin " (tt "NAME") " (symbol) and executes " (tt "THUNK") " when vandusen is (re-)initialized. " (tt "THUNK") " would usually define commands."))
(def (sig (procedure "(reply-to MESSAGE TEXT #!key METHOD PREFIXED)" (id reply-to))) (p "Sends " (tt "TEXT") " as a reply to an " (int-link "/egg/irc" "irc") " message. It will send the reply to where it was received from, i.e. when " (tt "MESSAGE") " came from a channel the reply will be sent back to that channel, as well, and when it came from a query the reply will be sent via query to the sender. " (tt "PREFIXED") " determines whether to prefix " (tt "TEXT") " with \"<sender>: \" when " (tt "MESSAGE") " came from a channel. It is " (tt "#t") " by default when " (tt "METHOD") " is " (tt "irc:say") ", that means " (tt "METHOD") " is a procedure like " (tt "irc:say") " (the default) or " (tt "irc:action") " determining the type of reply to be sent."))
(def (sig (procedure "(whisper-to NICK MESSAGE [METHOD])" (id whisper-to))) (p "Sends " (tt "MESSAGE") " to " (tt "NICK") " via query using " (tt "METHOD") " (" (tt "irc:say") " by default)."))
(def (sig (procedure "(say MESSAGE DESTINATION ...)" (id say))) (p "This procedure merely calls the " (int-link "/egg/irc" "irc egg's") " " (tt "irc:say") " procedure with the first argument set to the current connection."))
(def (sig (procedure "(add-finalizer THUNK)" (id add-finalizer))) (p "Adds " (tt "THUNK") " to the list of finalizers which are called right before a re-initialization."))
(def (sig (parameter "(after-connect [THUNK])" (id after-connect))) (p (tt "THUNK") " is a procedure that is called right after the IRC connection has been established. Useful for authenticating the nick name or things like that."))
