@@ -13,14 +13,7 @@ local adTimer
13
13
---- --------------------------------
14
14
addEventHandler (" onResourceStart" ,resourceRoot ,
15
15
function ()
16
- -- Is the sockets module loaded?
17
- if not sockOpen then
18
- outputServerLog (" IRC: could not start resource, the sockets module isn't loaded!" )
19
- outputServerLog (" IRC: restart the resource to retry" )
20
- return
21
- end
22
-
23
- -- Parse rights file.
16
+ -- Parse rights file.
24
17
local rightsFile = fileOpen (" scripts/rights.txt" ,true )
25
18
if rightsFile then
26
19
local missingRights = {}
@@ -98,6 +91,7 @@ addEventHandler("onResourceStart",resourceRoot,
98
91
return
99
92
end
100
93
94
+ -- parse acl file
101
95
local aclFile = xmlLoadFile (" acl.xml" )
102
96
if aclFile then
103
97
local i = 0
@@ -115,6 +109,13 @@ addEventHandler("onResourceStart",resourceRoot,
115
109
return
116
110
end
117
111
112
+ -- Is the sockets module loaded?
113
+ if not sockOpen then
114
+ outputServerLog (" IRC: could not start resource, the sockets module isn't loaded!" )
115
+ outputServerLog (" IRC: restart the resource to retry" )
116
+ return
117
+ end
118
+
118
119
-- start irc addons
119
120
for i ,resource in ipairs (getResources ()) do
120
121
local info = getResourceInfo (resource ," addon" )
@@ -123,6 +124,7 @@ addEventHandler("onResourceStart",resourceRoot,
123
124
end
124
125
end
125
126
127
+ triggerEvent (" onIRCResourceStart" ,root )
126
128
internalConnect ()
127
129
end
128
130
)
0 commit comments