diff options
Diffstat (limited to 'Sluift')
-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 @@ -170,6 +170,7 @@ SLUIFT_LUA_FUNCTION_WITH_HELP( Client, send_message, "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" "body the body of the message\n" @@ -183,8 +184,8 @@ SLUIFT_LUA_FUNCTION_WITH_HELP( if (lua_isstring(L, index)) { 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; } } |