summaryrefslogtreecommitdiffstats
path: root/Sluift
diff options
context:
space:
mode:
authorRemko Tronçon <git@el-tramo.be>2014-01-18 09:54:11 (GMT)
committerRemko Tronçon <git@el-tramo.be>2014-01-18 10:44:42 (GMT)
commita3ee944ceb20bde940699fdeb7cb7f5a18e5a44f (patch)
treeef3272344ecfb9d11c0f1809aef3e13f2c2a45e8 /Sluift
parentd869b157f0d3eee5d4964878b3990df98a07e020 (diff)
downloadswift-a3ee944ceb20bde940699fdeb7cb7f5a18e5a44f.zip
swift-a3ee944ceb20bde940699fdeb7cb7f5a18e5a44f.tar.bz2
Sluift: Fix send_message
Change-Id: I96b35a905553f5b25272179eaaf6c1b12ba2cd41
Diffstat (limited to 'Sluift')
-rw-r--r--Sluift/client.cpp5
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;
}
}