diff options
-rw-r--r-- | Sluift/client.cpp | 5 |
1 files changed, 3 insertions, 2 deletions
diff --git a/Sluift/client.cpp b/Sluift/client.cpp index cdbc591..1a64eea 100644 --- a/Sluift/client.cpp +++ b/Sluift/client.cpp @@ -171,4 +171,5 @@ SLUIFT_LUA_FUNCTION_WITH_HELP( "Send a message.", "self\n" + "to the JID to send the message to\n" "body the body of the message. Can alternatively be specified using the `body` option\n", "to the JID to send the message to\n" @@ -184,6 +185,6 @@ SLUIFT_LUA_FUNCTION_WITH_HELP( to = std::string(lua_tostring(L, index)); ++index; - if (!lua_isstring(L, index)) { - std::string body = lua_tostring(L, index); + if (lua_isstring(L, index)) { + body = lua_tostring(L, index); ++index; } |