--- /dev/null
+:ACTION [\ 2<channel>\ 2] \ 2<message>\ 2
+Makes the bot do an action on \ 2<channel>\ 2.
+
+:ADDUSER \ 2<nick>\ 2|\ 2<mask>\ 2 \ 2<channelMask>\ 2 \ 2<level>\ 2 \ 2<prot>\ 2 \ 2<autoop>\ 2
+Adds an user to the userlist, for a nick!user@host matching the
+one given, on a channel matching the \ 2<channelMask>\ 2 given.
+The \ 2<level>\ 2 can be: | The \ 2<prot>\ 2 can be: | The \ 2<autoop>\ 2 can be:
+ 0 - No level | 0 - No protection | 0 - No auto-op
+ 1 - User | 1 - No ban | 1 - Op on join
+ 2 - Trusted User | 2 - No kick |
+ 3 - Friend | 3 - No deop |
+ 4 - Master | |
+
+:ADDSERVER \ 2<host name>\ 2|\ 2<ip address>\ 2 [\ 2<port number>\ 2]
+Adds the server specified by \ 2<host name>\ 2 or \ 2<ip address>\ 2 to
+the server list.
+
+:ADDSHIT \ 2<nick>\ 2|\ 2<mask>\ 2 \ 2<channelMask>\ 2 \ 2<level>\ 2 \ 2<time>\ 2 [\ 2<reason>\ 2]
+Adds an user to the shitlist, for a nick!user@host matching the
+one given, on a channel matching the \ 2<channelMask>\ 2 given.
+The \ 2<level>\ 2 can be:
+ 0 - No shit
+ 1 - No op
+ 2 - Kick and Ban on join
+ 3 - Kick and Ban on join, no deban
+
+:ALIAS \ 2<new name>\ 2 \ 2<old name>\ 2
+Makes an alias, and adds the function \ 2<new name>\ 2, that will do
+exactly the same command as \ 2<old name>\ 2. Useful for lazy people :-)
+
+:BAN [\ 2<channel>\ 2] \ 2<mask>\ 2|\ 2<nick>\ 2
+Bans \ 2<mask>\ 2 or \ 2<nick>\ 2 from \ 2<channel>\ 2. You need to be a trusted
+user to ban with a \ 2<mask>\ 2.
+
+:CHANGELEVEL \ 2<nick>\ 2|\ 2<mask>\ 2 \ 2<channel mask>\ 2 \ 2<new level>\ 2
+Gives \ 2<nick>\ 2 or \ 2<mask>\ 2 level \ 2<new level>\ 2 on channel(s)
+\ 2<channel mask>\ 2. Note that you can not change level for someone
+whose level is greater than yours, and that you can not give a
+level greater than yours.
+
+:CHANNELS
+Prints the channel(s) where the bot is currently.
+
+:CYCLE [\ 2<channel>\ 2]
+Makes the bot leave and join \ 2<channel>\ 2.
+
+:DCCLIST
+Gives the list of all DCC Chat connections.
+
+:DEBAN [\ 2<channel>\ 2] \ 2<mask>\ 2|\ 2<nick>\ 2
+Debans \ 2<mask>\ 2 or \ 2<nick>\ 2 from \ 2<channel>\ 2. You need to be a trusted
+user to deban with a \ 2<mask>\ 2.
+
+:DELSERVER \ 2<server number>\ 2
+Deletes server from server list whose number in the server list
+is \ 2<server number>\ 2
+
+:DELUSER \ 2<nick>\ 2|\ 2<mask>\ 2 \ 2<channelMask>\ 2
+Removes \ 2<nick>\ 2 or \ 2<mask>\ 2 from the userlist.
+
+:DELSHIT \ 2<nick>\ 2|\ 2<mask>\ 2 \ 2<channelMask>\ 2
+Removes \ 2<nick>\ 2 or \ 2<mask>\ 2 from the shitlist.
+
+:DEOP [\ 2<channel>\ 2] \ 2<mask>\ 2|\ 2<nick>\ 2
+Deops \ 2<mask>\ 2 or \ 2<nick>\ 2 on \ 2<channel>\ 2.
+
+:DIE [\ 2<reason>\ 2]
+Makes the bot stop immediately.
+
+:HELP [\ 2<topic>\ 2]
+Prints this help, or prints help about \ 2<topic>\ 2 if supplied.
+See the topics available for you with "HELP" without arguments.
+
+:IDENT \ 2<channel>\ 2 \ 2<password>\ 2
+Identifies you on the bot. Note that you should not use this
+command in public...
+
+:INVITE [\ 2<channel>\ 2] \ 2<nick>\ 2
+Invites \ 2<nick>\ 2 on \ 2<channel>\ 2.
+
+:JOIN \ 2<channel>\ 2
+Makes the bot join \ 2<channel>\ 2.
+
+:KEEP [\ 2<channel>\ 2] \ 2<modes>\ 2
+Sets the \ 2<modes> \ 2 that the bot will keep for \ 2<channel>\ 2.
+See also STATS.
+
+:KICK [\ 2<channel>\ 2] \ 2<mask>\ 2|\ 2<nick>\ 2 [\ 2<reason>\ 2]
+Kicks \ 2<mask>\ 2 or \ 2<nick>\ 2 out of \ 2<channel>\ 2, because of \ 2<reason>\ 2.
+You need to be a trusted user to use a \ 2<mask>\ 2.
+
+:KICKBAN [\ 2<channel>\ 2] \ 2<mask>\ 2|\ 2<nick>\ 2 [\ 2<reason>\ 2]
+Bans then kicks \ 2<mask>\ 2 or \ 2<nick>\ 2 out of \ 2<channel>\ 2,
+because of \ 2<reason>\ 2.
+You need to be a trusted user to use a \ 2<mask>\ 2.
+
+:LOAD
+Reloads the userlist from disk.
+
+:LOCK [\ 2<channel>\ 2]
+Locks topic on \ 2<channel>\ 2.
+
+:MODE [\ 2<channel>\ 2] \ 2<mode string>\ 2
+Sends \ 2<mode string>\ 2 as mode for \ 2<channel>\ 2.
+
+:NAMES [\ 2<channel>\ 2]
+Shows the nicknames and status of users on \ 2<channel>\ 2.
+
+:NEXTSERVER
+Makes the bot connect to the next server in its server list.
+
+:NICK \ 2<nick>\ 2
+Makes the bot use nickname \ 2<nick>\ 2.
+
+:NSLOOKUP \ 2<nick>\ 2|\ 2<host>\ 2|\ 2<ip address>\ 2
+Does a nameserver query about \ 2<nick>\ 2's host, \ 2<host>\ 2 or
+\ 2<ip address>\ 2.
+
+:OP [\ 2<channel>\ 2] \ 2<nick>\ 2
+Ops \ 2<nick>\ 2 on \ 2<channel>\ 2.
+
+:PART [\ 2<channel>\ 2]
+Makes the bot leave \ 2<channel>\ 2.
+
+:PASSWORD \ 2<password>\ 2
+Changes your password on the bot. Use "NONE" as password
+if you want to clear it.
+Do not use this command in public!
+
+:RECONNECT
+Makes the bot reconnect to its current server.
+
+:RSPYMESSAGE
+Removes you from the spy list.
+
+:SAVE
+Saves the userlist.
+
+:SAY [\ 2<channel>\ 2] \ 2<message>\ 2
+Makes the bot say \ 2<message>\ 2 on \ 2<channel>\ 2.
+
+:SERVER \ 2<server number>\ 2
+Select the server to connect to. \ 2<server number>\ 2 is the number of
+the server in the serverlist.
+
+:SERVERLIST
+Shows the bot's serverlist.
+
+:SHITLIST
+Shows the bot's shitlist.
+
+:SPYLIST
+Shows the bot's spylist.
+
+:SPYMESSAGE
+Adds you to the spylist
+
+:STATS [\ 2<channel>\ 2]
+Gives \ 2<channel>\ 2's statistics.
+
+:TBAN [\ 2<channel>\ 2] \ 2<nick>\ 2|\ 2<mask>\ 2 \ 2<time>\ 2
+Bans \ 2<nick>\ 2 or \ 2<mask>\ 2 from \ 2<channel>\ 2 for \ 2<time>\ 2 seconds.
+
+:TKBAN [\ 2<channel>\ 2] \ 2<nick>\ 2|\ 2<mask>\ 2 \ 2<time>\ 2 [\ 2<reason>\ 2]
+Bans \ 2<nick>\ 2 or \ 2<mask>\ 2 from \ 2<channel>\ 2 for \ 2<time>\ 2 seconds,
+then kicks him/them because of \ 2<reason>\ 2.
+
+:TOPIC [\ 2<channel>\ 2] [\ 2<topic>\ 2]
+If no \ 2<topic>\ 2 is given, prints \ 2<channel>\ 2's topic. Otherwise,
+the bot will change \ 2<channel>\ 2's topic to \ 2<topic>\ 2.
+
+:UNLOCK [\ 2<channel>\ 2]
+Makes the bot unlock topic on \ 2<channel>\ 2.
+
+:USERLIST
+Shows the bot's userlist.
+
+:WHO [\ 2<channel>\ 2]
+Show your level on \ 2<channel>\ 2.
+
+:WHOIS [\ 2<channel>\ 2] \ 2<nick>\ 2
+Shows information about \ 2<nick>\ 2 on \ 2<channel>\ 2.
--- /dev/null
+;;; simple logging script
+;;; Note that this doesn't get what the bot says
+;;; and logs everything to the same file :(
+
+(use-modules (ice-9 rdelim))
+
+(define log-port (open-file "channels.log" "al"))
+
+(define (time-stamp)
+ (strftime "(%H:%M:%S) " (gmtime (current-time))))
+
+(display (str-app
+ "\n== STARTING LOG [ "
+ (strftime "%F " (gmtime (current-time)))
+ (time-stamp)
+ "] ==\n") log-port)
+
+(let ((pub-func
+ (lambda (f t p)
+ (write-line (str-app
+ (string-downcase! t) " "
+ (time-stamp)
+ "<" f "> " p)
+ log-port))))
+ (bot:addhook hooks/public ".*"
+ pub-func
+ 10000 #t "log")
+ (bot:addhook hooks/send/public ".*"
+ pub-func 1000 #t "log"))
+
+(let ((act-hook
+ (lambda (f t p)
+ (write-line
+ (str-app
+ (string-downcase! t) " "
+ (time-stamp)
+ "* "
+ (car (string-split f #\!))
+ " " p)
+ log-port))))
+ (bot:addhook hooks/action ".*"
+ act-hook
+ 10000 #t "log")
+ (bot:addhook hooks/send/action ".*"
+ act-hook 10000 #t "log"))
+
+(bot:addhook hooks/join ".*.*"
+ (lambda (name channel)
+ (write-line (str-app
+ (string-downcase! channel) " "
+ (time-stamp)
+ name " joined "
+ (string-downcase! channel))
+ log-port))
+ 10000 #t "log")
+
+(bot:addhook hooks/kick ".*"
+ (lambda (who op channel reason)
+ (write-line
+ (str-app
+ (string-downcase! channel) " "
+ (time-stamp)
+ who " was kicked from " channel
+ " by " op " (" reason ")") log-port))
+ 10000 #t "log")
+
+(bot:addhook hooks/mode ".*"
+ (lambda (who channel mode)
+ (write-line
+ (str-app
+ (string-downcase! channel) " "
+ (time-stamp)
+ who " set mode " mode
+ " on " (string-downcase! channel))
+ log-port))
+ 10000 #t "log")
+
+(bot:addhook hooks/nickname ".*"
+ (lambda (orig new)
+ (write-line
+ (str-app
+ "--- "
+ (time-stamp)
+ orig " is now known as "
+ new) log-port))
+ 10000 #t "log")
+
+(bot:addhook hooks/leave ".*"
+ (lambda (who channel)
+ (write-line
+ (str-app
+ (string-downcase! channel) " "
+ (time-stamp)
+ who " has left channel "
+ (string-downcase! channel))
+ log-port))
+ 10000 #t "log")
+
+(bot:addhook hooks/signoff ".*"
+ (lambda (who rest)
+ (write-line
+ (str-app
+ "--- "
+ (time-stamp)
+ who " has left IRC ("
+ (substring rest 1 (string-length rest)) ")")
+ log-port))
+ 10000 #t "log")
+
+(bot:addhook hooks/topic ".*"
+ (lambda (op channel new-topic)
+ (write-line
+ (str-app
+ (string-downcase! channel) " "
+ (time-stamp)
+ op " has changed the topic on "
+ (string-downcase! channel)
+ " to: " new-topic)
+ log-port ))
+ 10000 #t "log")
+
+(add-hook! bot:exit-hook (lambda ()
+ (display (str-app
+ "== ENDING LOG [ "
+ (strftime "%F " (gmtime (current-time)))
+ (time-stamp)
+ "] ==\n") log-port)))
\ No newline at end of file