Handle errors in the config better
luaA_loadrc() now returns a failure when executing the config file causes an error. Previously it returned a success which meant the next config file wasn't tried. Signed-off-by: Uli Schlachter <psychon@znc.in>
This commit is contained in:
parent
a6f2c73c67
commit
64855b41cd
4
luaa.c
4
luaa.c
|
@ -862,8 +862,10 @@ luaA_loadrc(const char *confpath, bool run)
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
else
|
else
|
||||||
|
{
|
||||||
lua_pop(globalconf.L, 1);
|
lua_pop(globalconf.L, 1);
|
||||||
return true;
|
return true;
|
||||||
|
}
|
||||||
}
|
}
|
||||||
else
|
else
|
||||||
fprintf(stderr, "%s\n", lua_tostring(globalconf.L, -1));
|
fprintf(stderr, "%s\n", lua_tostring(globalconf.L, -1));
|
||||||
|
|
Loading…
Reference in New Issue