Fetching contributors…
Cannot retrieve contributors at this time
44 lines (33 sloc) 1.44 KB
#lang racket
(require "loop.rkt"
(except-in "vars.rkt" log)
(only-in "servers.rkt" real-server)
(only-in "userinfo.rkt" *userinfo-database-directory-name*)
(only-in "iserver.rkt" make-incubot-server)
(module+ main
(let ([required-version "5.2.900.1"])
(when (not (>= (version->integer (version))
(version->integer required-version)))
(error 'freenode-main "You need at least version ~a of racket, to avoid a memory leak in sqlite" required-version)))
#:program "rudybot"
;; TODO -- the equivalent of "echo -17 > /proc/self/oom_adj", to
;; immunize this process from being killed by the dreaded oom_killer
;; (it happened once). See
(log "Main starting: ~a" (git-version))
;; (parameterize ([current-namespace (module->namespace "freenode-main.rkt")])
;; (read-eval-print-loop))
(parameterize* ([*irc-server-hostname* ""]
[*irc-server-port* 6667]
[*userinfo-database-directory-name* "userinfo.db"]
[*incubot-logger* log]
[*incubot-server* (make-incubot-server)])
(if (*nickserv-password*)
(connect-and-run real-server)
(error 'freenode-main "You didn't specify a NickServ password"))))
(provide (all-defined-out))