]> jfr.im git - irc/quakenet/newserv.git/blame - lua/lib/bootstrap.lua
TRUSTS: require sqlite
[irc/quakenet/newserv.git] / lua / lib / bootstrap.lua
CommitLineData
72054e5b 1require("lib/class")
a098bb43
CP
2require("lib/quakenet")
3require("lib/missing")
72054e5b
CP
4require("lib/scheduler")
5require("lib/schedule-legacy")
a098bb43
CP
6require("lib/serialise")
7require("lib/country")
8require("lib/db")
9require("lib/socket")
10require("lib/json")
a098bb43
CP
11
12local LASTERROR = 0
13local NOTREPORTING = false
14
15function scripterror(err)
16 local cerror = os.time()
17 if cerror > LASTERROR then
18 LASTERROR = cerror
19 NOTREPORTING = false
20 end
21
22 if not NOTREPORTING then
23 chanmsgn(traceback(err, 2))
24
25 LASTERROR = LASTERROR + 1
26 if LASTERROR > cerror + 10 then
27 NOTREPORTING = true
28 chanmsg("Too many errors for this script -- no longer reporting")
29 end
30 end
31end
32
33math.randomseed(os.time())