allow bot to appear in group logs
This commit is contained in:
parent
004ffd7d5a
commit
c390fd0b35
6 changed files with 105 additions and 10 deletions
|
@ -123,5 +123,26 @@ namespace Bot.CommandSystem
|
|||
MHE(source, client, "secondlife:///app/agent/" + MainConfiguration.Instance.BotAdmins.ElementAt(i).Key.ToString() + "/about [" + MainConfiguration.Instance.BotAdmins.ElementAt(i).Value.ToString() + "] " + MainConfiguration.Instance.BotAdmins.ElementAt(i).Key.ToString());
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
[CommandGroup("terminate_bot", 5, 0, "", MessageHandler.Destinations.DEST_LOCAL | MessageHandler.Destinations.DEST_AGENT | MessageHandler.Destinations.DEST_CONSOLE_INFO | MessageHandler.Destinations.DEST_DISCORD)]
|
||||
public void PerformExit(UUID client, int level, GridClient grid, string[] additionalArgs, MessageHandler.MessageHandleEvent MHE, MessageHandler.Destinations source, CommandRegistry registry, UUID agentKey, string agentName)
|
||||
{
|
||||
MHE(source, client, "Bot exit initiated.");
|
||||
MHE(MessageHandler.Destinations.DEST_ACTION, UUID.Zero, "{'type':'exit'}");
|
||||
}
|
||||
// !!help
|
||||
[CommandGroup("!help", 0, 0, "Prints the entire help registry", MessageHandler.Destinations.DEST_AGENT | MessageHandler.Destinations.DEST_LOCAL | MessageHandler.Destinations.DEST_GROUP | MessageHandler.Destinations.DEST_CONSOLE_INFO)]
|
||||
[CommandGroup("bot.help", 0, 0, "Alias to !help", MessageHandler.Destinations.DEST_AGENT | MessageHandler.Destinations.DEST_LOCAL | MessageHandler.Destinations.DEST_GROUP)]
|
||||
public void PrintAllHelp(UUID client, int level, GridClient grid, string[] additionalArgs, MessageHandler.MessageHandleEvent MHE, MessageHandler.Destinations source, CommandRegistry registry, UUID agentKey, string agentName)
|
||||
{
|
||||
MHE(source, client, "All commands viewable at: https://zontreck.dev:35591/help");
|
||||
}
|
||||
// !help "command"
|
||||
[CommandGroup("help", 0, 1, "Prints help for one command", MessageHandler.Destinations.DEST_AGENT | MessageHandler.Destinations.DEST_LOCAL | MessageHandler.Destinations.DEST_GROUP | MessageHandler.Destinations.DEST_CONSOLE_INFO)]
|
||||
public void PrintHelp(UUID client, int level, GridClient grid, string[] additionalArgs, MessageHandler.MessageHandleEvent MHE, MessageHandler.Destinations source, CommandRegistry registry, UUID agentKey, string agentName)
|
||||
{
|
||||
registry.PrintHelp(source, additionalArgs[0], client);
|
||||
}
|
||||
}
|
||||
}
|
||||
|
|
|
@ -78,8 +78,15 @@ namespace Bot.CommandSystem
|
|||
string GroupName = client.Groups.GroupName2KeyCache[fromID];
|
||||
|
||||
GroupLog.Instance.WriteLogEntry(GroupName, "secondlife:///app/agent/" + agentKey.ToString() + "/about (" + agentName + ") : " + request);
|
||||
|
||||
|
||||
if (agentKey == client.Self.AgentID) return false;
|
||||
}
|
||||
else {
|
||||
agentKey = fromID;
|
||||
|
||||
if (agentKey == client.Self.AgentID) return false;
|
||||
}
|
||||
else { agentKey = fromID; }
|
||||
|
||||
if (request.Substring(0, 1) != "!")
|
||||
{
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue