diff --git a/backends/twitter/Requests/HelpMessageRequest.cpp b/backends/twitter/Requests/HelpMessageRequest.cpp index 8a123fd7..22848d91 100644 --- a/backends/twitter/Requests/HelpMessageRequest.cpp +++ b/backends/twitter/Requests/HelpMessageRequest.cpp @@ -5,9 +5,9 @@ void HelpMessageRequest::run() std::string helpMsg = ""; helpMsg = helpMsg + "\n******************************HELP************************************\n" - + "#status: ==> Update your status\n" + + "#status ==> Update your status\n" + "#timeline ==> Retrieve your timeline\n" - + "@: ==> Send a directed message to the user \n" + + "@ ==> Send a directed message to the user \n" + "#help ==> Print this help message\n" + "************************************************************************\n"; diff --git a/backends/twitter/TwitterPlugin.cpp b/backends/twitter/TwitterPlugin.cpp index 6c4746f7..87ee1ec2 100644 --- a/backends/twitter/TwitterPlugin.cpp +++ b/backends/twitter/TwitterPlugin.cpp @@ -102,8 +102,10 @@ void TwitterPlugin::handleMessageSendRequest(const std::string &user, const std: { if(legacyName == "twitter-account") { - std::string cmd = message.substr(0, message.find(':')); - std::string data = message.substr(message.find(':') + 1); + + std::string cmd = "", data = ""; + std::istringstream in(message.c_str()); + in >> cmd >> data; handleMessage(user, "twitter-account", cmd + " " + data);