Changeset - 81a71207d534
[Not reviewed]
0 2 0
Sarang Bharadwaj - 13 years ago 2012-06-04 14:07:39
sarang.bh@gmail.com
Improved user command parsing
2 files changed with 6 insertions and 4 deletions:
0 comments (0 inline, 0 general)
backends/twitter/Requests/HelpMessageRequest.cpp
Show inline comments
 
@@ -5,9 +5,9 @@ void HelpMessageRequest::run()
 
	std::string helpMsg = "";
 
	helpMsg = helpMsg
 
			+ "\n******************************HELP************************************\n"
 
			+ "#status:<your status> ==> Update your status\n"
 
			+ "#status <your status> ==> Update your status\n"
 
			+ "#timeline             ==> Retrieve your timeline\n"
 
			+ "@<username>:<message> ==> Send a directed message to the user <username>\n"
 
			+ "@<username> <message> ==> Send a directed message to the user <username>\n"
 
			+ "#help                 ==> Print this help message\n"
 
			+ "************************************************************************\n";
 

	
backends/twitter/TwitterPlugin.cpp
Show inline comments
 
@@ -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);
 

	
0 comments (0 inline, 0 general)