| 4228 | } |
| 4229 | |
| 4230 | static int internal_getCommandHelp(lua_State *L) |
| 4231 | { |
| 4232 | const PluginCommand *pc = getPluginCommand(luaL_checkstring(L, 1)); |
| 4233 | if (!pc) |
| 4234 | { |
| 4235 | lua_pushnil(L); |
| 4236 | return 1; |
| 4237 | } |
| 4238 | |
| 4239 | string help = pc->description; |
| 4240 | if (help.size() && help[help.size()-1] != '.') |
| 4241 | help += "."; |
| 4242 | if (pc->usage.size()) |
| 4243 | help += "\n" + pc->usage; |
| 4244 | lua_pushstring(L, help.c_str()); |
| 4245 | return 1; |
| 4246 | } |
| 4247 | |
| 4248 | static int internal_getCommandDescription(lua_State *L) |
| 4249 | { |
nothing calls this directly
no test coverage detected