(lambda (source args privmsg)
(match (string-split (car args))
(("hello")
- (privmsg source "hello yourself!"))
+ (privmsg source (conc "Hello, " source "!")))
- ((",seturl" url)
+ (("seturl" url)
(set-url source url)
- (privmsg source "updated url"))
+ (privmsg source "Updated your URL. Thanks!"))
- ((",geturl" nick)
+ (("geturl" nick)
(print "in geturl")
(privmsg source
(let ((url (get-url nick)))
(if url
(conc "URL for " nick ": " url)
- (conc "No URL for " nick " in database")))))
+ (conc "No URL for " nick " in database.")))))
- ((",rmurl")
+ (("rmurl")
(clear-url source)
- (privmsg source "cleared url"))
+ (privmsg source "Deleted your nick and url from database."))
- ((",list")
+ (("list")
(if (null? url-alist)
(privmsg source "No registered phlog/gemlog/blog URLs. :(")
(begin
(privmsg source (conc " " nick ": " url))))
url-alist))))
- ((",announce")
+ (("announce")
(let ((url (get-url source)))
(if url
(privmsg "#phloggersgarage"
(conc source " has published a new post at " url "!"))
- (privmsg source "Register your *log URL first using ,seturl <URL>."))))
+ (privmsg source "Register your *log URL first using seturl <URL>."))))
(_
- (privmsg source "Beep boop! Here are the valid pgbot commands:")
- (privmsg source " ,seturl [url] : Save your *log URL for others to see")
- (privmsg source " ,rmurl : Remove your *log URL if one is saved.")
- (privmsg source " ,geturl [nick] : Retrieve the *log URL belonging to [nick].")
- (privmsg source " ,list : List all currently stored *log URLs.")
- (privmsg source " ,announce : Announce a new *log entry to #phloggersgarage! Huzzah!")))))
+ (privmsg source "Beep boop! This is pgbot, the #phloggersgarage bot.")
+ (privmsg source "To use pgbot, send it a message: \x02/msg pgbot command\x02.")
+ (privmsg source "Here are the currently-valid pgbot commands:")
+ (privmsg source " \x02seturl [url]\x02: Save your *log URL for others to see")
+ (privmsg source " \x02rmurl\x02: Remove your *log URL if one is saved.")
+ (privmsg source " \x02geturl [nick]\x02: Retrieve the *log URL belonging to [nick].")
+ (privmsg source " \x02list\x02: List all currently stored *log URLs.")
+ (privmsg source " \x02announce\x02: Announce a new *log entry to #phloggersgarage! Huzzah!")))))