コード例 #1
0
ファイル: DiamondAoInt.cpp プロジェクト: N3X15/Luna-Viewer
bool DiamondAoInt::AOCommand(std::string message)
{
	std::string clip = message.substr(0,3);
	if(clip == "~`~")
	{
		std::string rest = message.substr(3);
		LLSD args = JCLSLBridge::parse_string_to_list(rest, '|');
		std::string cmd = args[0].asString();
		if(cmd == "dmdAoInt")
		{
			cmd = args[1].asString();
			if(cmd == "on")
			{
				gSavedPerAccountSettings.setBOOL("PhoenixAOEnabled",TRUE);
				LLFloaterAO::run();
			}
			else if(cmd == "off")
			{
				gSavedPerAccountSettings.setBOOL("PhoenixAOEnabled",FALSE);
				LLFloaterAO::run();
			}
			else if(cmd == "status")
			{
				S32 chan = atoi(args[2].asString().c_str());
				std::string tmp="off";
				if(gSavedPerAccountSettings.getBOOL("PhoenixAOEnabled"))tmp="on";
				send_chat_to_object(tmp,chan,gAgent.getID());
			}
			else if(cmd == "regchan")
			{
				regchan = atoi(args[2].asString().c_str());
				send_chat_to_object(std::string("Channel registerd"),regchan,gAgent.getID());
			}
			else if(cmd == "loadcard")
			{
				std::string tmp = (JCLSLBridge::findInventoryByName(args[2].asString(),phoenix_category_name)).asString();
				if(LLUUID(tmp).notNull())
				{
					gSavedPerAccountSettings.setString("PhoenixAOConfigNotecardID",tmp);
					LLFloaterAO::updateLayout2(LLFloaterAO::getInstance());
				}
			}
		}
		return true;
	}
	return false;
}
コード例 #2
0
ファイル: DiamondAoInt.cpp プロジェクト: N3X15/Luna-Viewer
void DiamondAoInt::AOStatusUpdate(bool status)
{
	if(regchan != 0)
	{
		std::string tmp="off";
		if(gSavedPerAccountSettings.getBOOL("PhoenixAOEnabled"))tmp="on";
		send_chat_to_object(tmp,regchan,gAgent.getID());
	}
}
コード例 #3
0
void SHCommandHandler::send_chat_to_object(const std::string &message, int channel, LLViewerObject *pTargetObject)
{
	if(pTargetObject)
		send_chat_to_object(message,channel,pTargetObject->getID());
	
}