Software /
code /
verse
Comparison
init.lua @ 162:2950079d4319
verse: Consider a plugin as failed to load only if it returns false
author | Matthew Wild <mwild1@gmail.com> |
---|---|
date | Wed, 15 Dec 2010 11:57:23 +0000 |
parent | 142:ea753bc81a33 |
child | 163:48a47bca9a63 |
comparison
equal
deleted
inserted
replaced
161:b177bcea2006 | 162:2950079d4319 |
---|---|
169 end | 169 end |
170 | 170 |
171 function stream:add_plugin(name) | 171 function stream:add_plugin(name) |
172 if require("verse.plugins."..name) then | 172 if require("verse.plugins."..name) then |
173 local ok, err = verse.plugins[name](self); | 173 local ok, err = verse.plugins[name](self); |
174 if ok then | 174 if ok ~= false then |
175 self:debug("Loaded %s plugin", name); | 175 self:debug("Loaded %s plugin", name); |
176 else | 176 else |
177 self:warn("Failed to load %s plugin: %s", name, err); | 177 self:warn("Failed to load %s plugin: %s", name, err); |
178 end | 178 end |
179 end | 179 end |