Merge branch 'master' of git://opensimulator.org/git/opensim
commit
f3fea81936
|
@ -83,6 +83,7 @@ what it is today.
|
||||||
* Gerhard
|
* Gerhard
|
||||||
* Godfrey
|
* Godfrey
|
||||||
* Grumly57
|
* Grumly57
|
||||||
|
* GuduleLapointe
|
||||||
* Ewe Loon
|
* Ewe Loon
|
||||||
* Fly-Man
|
* Fly-Man
|
||||||
* Flyte Xevious
|
* Flyte Xevious
|
||||||
|
|
|
@ -56,6 +56,7 @@ namespace OpenSim
|
||||||
protected bool m_gui = false;
|
protected bool m_gui = false;
|
||||||
protected string m_consoleType = "local";
|
protected string m_consoleType = "local";
|
||||||
protected uint m_consolePort = 0;
|
protected uint m_consolePort = 0;
|
||||||
|
protected string m_custom_prompt;
|
||||||
|
|
||||||
private string m_timedScript = "disabled";
|
private string m_timedScript = "disabled";
|
||||||
private Timer m_scriptTimer;
|
private Timer m_scriptTimer;
|
||||||
|
@ -85,7 +86,9 @@ namespace OpenSim
|
||||||
|
|
||||||
if (networkConfig != null)
|
if (networkConfig != null)
|
||||||
m_consolePort = (uint)networkConfig.GetInt("console_port", 0);
|
m_consolePort = (uint)networkConfig.GetInt("console_port", 0);
|
||||||
|
|
||||||
m_timedScript = startupConfig.GetString("timer_Script", "disabled");
|
m_timedScript = startupConfig.GetString("timer_Script", "disabled");
|
||||||
|
|
||||||
if (m_logFileAppender != null)
|
if (m_logFileAppender != null)
|
||||||
{
|
{
|
||||||
if (m_logFileAppender is log4net.Appender.FileAppender)
|
if (m_logFileAppender is log4net.Appender.FileAppender)
|
||||||
|
@ -108,6 +111,7 @@ namespace OpenSim
|
||||||
Util.FireAndForgetMethod = asyncCallMethod;
|
Util.FireAndForgetMethod = asyncCallMethod;
|
||||||
|
|
||||||
stpMaxThreads = startupConfig.GetInt("MaxPoolThreads", 15);
|
stpMaxThreads = startupConfig.GetInt("MaxPoolThreads", 15);
|
||||||
|
m_custom_prompt = startupConfig.GetString("custom_prompt", "Region");
|
||||||
}
|
}
|
||||||
|
|
||||||
if (Util.FireAndForgetMethod == FireAndForgetMethod.SmartThreadPool)
|
if (Util.FireAndForgetMethod == FireAndForgetMethod.SmartThreadPool)
|
||||||
|
@ -831,7 +835,7 @@ namespace OpenSim
|
||||||
|
|
||||||
string regionName = (m_sceneManager.CurrentScene == null ? "root" : m_sceneManager.CurrentScene.RegionInfo.RegionName);
|
string regionName = (m_sceneManager.CurrentScene == null ? "root" : m_sceneManager.CurrentScene.RegionInfo.RegionName);
|
||||||
MainConsole.Instance.Output(String.Format("Currently selected region is {0}", regionName));
|
MainConsole.Instance.Output(String.Format("Currently selected region is {0}", regionName));
|
||||||
m_console.DefaultPrompt = String.Format("Region ({0}) ", regionName);
|
m_console.DefaultPrompt = String.Format("{0} ({1}) ", m_custom_prompt, regionName);
|
||||||
m_console.ConsoleScene = m_sceneManager.CurrentScene;
|
m_console.ConsoleScene = m_sceneManager.CurrentScene;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
|
@ -2899,7 +2899,7 @@ namespace OpenSim.Region.Framework.Scenes
|
||||||
}
|
}
|
||||||
|
|
||||||
/// <summary>
|
/// <summary>
|
||||||
/// Update the entire rotation of the group.
|
/// Update the rotation of just the root prim of a linkset.
|
||||||
/// </summary>
|
/// </summary>
|
||||||
/// <param name="rot"></param>
|
/// <param name="rot"></param>
|
||||||
public void UpdateRootRotation(Quaternion rot)
|
public void UpdateRootRotation(Quaternion rot)
|
||||||
|
|
|
@ -2013,8 +2013,6 @@ namespace OpenSim.Region.Framework.Scenes
|
||||||
sitOrientation = avSitOrientation;
|
sitOrientation = avSitOrientation;
|
||||||
autopilot = false;
|
autopilot = false;
|
||||||
}
|
}
|
||||||
part.ParentGroup.TriggerScriptChangedEvent(Changed.LINK);
|
|
||||||
|
|
||||||
pos = part.AbsolutePosition + offset;
|
pos = part.AbsolutePosition + offset;
|
||||||
//if (Math.Abs(part.AbsolutePosition.Z - AbsolutePosition.Z) > 1)
|
//if (Math.Abs(part.AbsolutePosition.Z - AbsolutePosition.Z) > 1)
|
||||||
//{
|
//{
|
||||||
|
@ -2060,6 +2058,12 @@ namespace OpenSim.Region.Framework.Scenes
|
||||||
m_sitAtAutoTarget = autopilot;
|
m_sitAtAutoTarget = autopilot;
|
||||||
if (!autopilot)
|
if (!autopilot)
|
||||||
HandleAgentSit(remoteClient, UUID);
|
HandleAgentSit(remoteClient, UUID);
|
||||||
|
|
||||||
|
// Moved here to avoid a race with default sit anim
|
||||||
|
// The script event needs to be raised after the default sit anim is set.
|
||||||
|
if (part != null)
|
||||||
|
part.ParentGroup.TriggerScriptChangedEvent(Changed.LINK);
|
||||||
|
|
||||||
}
|
}
|
||||||
|
|
||||||
// public void HandleAgentRequestSit(IClientAPI remoteClient, UUID agentID, UUID targetID, Vector3 offset, string sitAnimation)
|
// public void HandleAgentRequestSit(IClientAPI remoteClient, UUID agentID, UUID targetID, Vector3 offset, string sitAnimation)
|
||||||
|
|
|
@ -222,7 +222,7 @@ namespace pCampBot
|
||||||
}
|
}
|
||||||
else
|
else
|
||||||
{
|
{
|
||||||
MainConsole.Instance.OutputFormat(
|
m_log.ErrorFormat(
|
||||||
"{0} {1} cannot login: {2}", FirstName, LastName, Client.Network.LoginMessage);
|
"{0} {1} cannot login: {2}", FirstName, LastName, Client.Network.LoginMessage);
|
||||||
|
|
||||||
if (OnDisconnected != null)
|
if (OnDisconnected != null)
|
||||||
|
@ -266,12 +266,12 @@ namespace pCampBot
|
||||||
}
|
}
|
||||||
else
|
else
|
||||||
{
|
{
|
||||||
MainConsole.Instance.Output(String.Format("Failed to decode {0} asset {1}", asset.AssetType, asset.AssetID));
|
m_log.WarnFormat("Failed to decode {0} asset {1}", asset.AssetType, asset.AssetID);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
catch (Exception e)
|
catch (Exception e)
|
||||||
{
|
{
|
||||||
MainConsole.Instance.Output(String.Format("Exception: {0}",e.ToString()));
|
m_log.ErrorFormat("Exception: {0}{1}", e.Message, e.StackTrace);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
@ -305,7 +305,7 @@ namespace pCampBot
|
||||||
if (wear == "yes")
|
if (wear == "yes")
|
||||||
{
|
{
|
||||||
//TODO: Implement random outfit picking
|
//TODO: Implement random outfit picking
|
||||||
MainConsole.Instance.Output("Picks a random outfit. Not yet implemented.");
|
m_log.DebugFormat("Picks a random outfit. Not yet implemented.");
|
||||||
}
|
}
|
||||||
else if (wear != "save")
|
else if (wear != "save")
|
||||||
saveDir = "MyAppearance/" + wear;
|
saveDir = "MyAppearance/" + wear;
|
||||||
|
@ -334,7 +334,9 @@ namespace pCampBot
|
||||||
listwearables.Add(item);
|
listwearables.Add(item);
|
||||||
}
|
}
|
||||||
else
|
else
|
||||||
MainConsole.Instance.Output(String.Format("Failed to create item {0}",item.Name));
|
{
|
||||||
|
m_log.WarnFormat("Failed to create item {0}", item.Name);
|
||||||
|
}
|
||||||
}
|
}
|
||||||
);
|
);
|
||||||
}
|
}
|
||||||
|
@ -356,7 +358,9 @@ namespace pCampBot
|
||||||
listwearables.Add(item);
|
listwearables.Add(item);
|
||||||
}
|
}
|
||||||
else
|
else
|
||||||
MainConsole.Instance.Output(String.Format("Failed to create item {0}",item.Name));
|
{
|
||||||
|
m_log.WarnFormat("Failed to create item {0}", item.Name);
|
||||||
|
}
|
||||||
}
|
}
|
||||||
);
|
);
|
||||||
}
|
}
|
||||||
|
@ -364,10 +368,12 @@ namespace pCampBot
|
||||||
Thread.Sleep(1000);
|
Thread.Sleep(1000);
|
||||||
|
|
||||||
if (listwearables == null || listwearables.Count == 0)
|
if (listwearables == null || listwearables.Count == 0)
|
||||||
MainConsole.Instance.Output("Nothing to send on this folder!");
|
{
|
||||||
|
m_log.DebugFormat("Nothing to send on this folder!");
|
||||||
|
}
|
||||||
else
|
else
|
||||||
{
|
{
|
||||||
MainConsole.Instance.Output(String.Format("Sending {0} wearables...",listwearables.Count));
|
m_log.DebugFormat("Sending {0} wearables...", listwearables.Count);
|
||||||
Client.Appearance.WearOutfit(listwearables, false);
|
Client.Appearance.WearOutfit(listwearables, false);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
@ -446,6 +452,10 @@ namespace pCampBot
|
||||||
}
|
}
|
||||||
|
|
||||||
for (int i = 0; i < prim.Textures.FaceTextures.Length; i++)
|
for (int i = 0; i < prim.Textures.FaceTextures.Length; i++)
|
||||||
|
{
|
||||||
|
Primitive.TextureEntryFace face = prim.Textures.FaceTextures[i];
|
||||||
|
|
||||||
|
if (face != null)
|
||||||
{
|
{
|
||||||
UUID textureID = prim.Textures.FaceTextures[i].TextureID;
|
UUID textureID = prim.Textures.FaceTextures[i].TextureID;
|
||||||
|
|
||||||
|
@ -453,11 +463,10 @@ namespace pCampBot
|
||||||
GetTexture(textureID);
|
GetTexture(textureID);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
if (prim.Sculpt.SculptTexture != UUID.Zero)
|
|
||||||
{
|
|
||||||
GetTexture(prim.Sculpt.SculptTexture);
|
|
||||||
}
|
}
|
||||||
|
|
||||||
|
if (prim.Sculpt != null && prim.Sculpt.SculptTexture != UUID.Zero)
|
||||||
|
GetTexture(prim.Sculpt.SculptTexture);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
|
@ -51,7 +51,6 @@ namespace pCampBot
|
||||||
protected CommandConsole m_console;
|
protected CommandConsole m_console;
|
||||||
protected List<Bot> m_lBot;
|
protected List<Bot> m_lBot;
|
||||||
protected Random somthing = new Random(Environment.TickCount);
|
protected Random somthing = new Random(Environment.TickCount);
|
||||||
protected int numbots = 0;
|
|
||||||
public IConfig Config { get; private set; }
|
public IConfig Config { get; private set; }
|
||||||
|
|
||||||
/// <summary>
|
/// <summary>
|
||||||
|
@ -137,7 +136,7 @@ namespace pCampBot
|
||||||
if (behaviourSwitches.Contains("g"))
|
if (behaviourSwitches.Contains("g"))
|
||||||
behaviours.Add(new GrabbingBehaviour());
|
behaviours.Add(new GrabbingBehaviour());
|
||||||
|
|
||||||
startupBot(i, this, behaviours, firstName, lastName, password, loginUri);
|
StartBot(this, behaviours, firstName, lastName, password, loginUri);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -157,22 +156,21 @@ namespace pCampBot
|
||||||
// int newlen = len + botcount;
|
// int newlen = len + botcount;
|
||||||
// for (int i = len; i < newlen; i++)
|
// for (int i = len; i < newlen; i++)
|
||||||
// {
|
// {
|
||||||
// startupBot(i, Config);
|
// startupBot(Config);
|
||||||
// }
|
// }
|
||||||
// }
|
// }
|
||||||
|
|
||||||
/// <summary>
|
/// <summary>
|
||||||
/// This starts up the bot and stores the thread for the bot in the thread array
|
/// This starts up the bot and stores the thread for the bot in the thread array
|
||||||
/// </summary>
|
/// </summary>
|
||||||
/// <param name="pos">The position in the thread array to stick the bot's thread</param>
|
|
||||||
/// <param name="bm"></param>
|
/// <param name="bm"></param>
|
||||||
/// <param name="behaviours">Behaviours for this bot to perform.</param>
|
/// <param name="behaviours">Behaviours for this bot to perform.</param>
|
||||||
/// <param name="firstName">First name</param>
|
/// <param name="firstName">First name</param>
|
||||||
/// <param name="lastName">Last name</param>
|
/// <param name="lastName">Last name</param>
|
||||||
/// <param name="password">Password</param>
|
/// <param name="password">Password</param>
|
||||||
/// <param name="loginUri">Login URI</param>
|
/// <param name="loginUri">Login URI</param>
|
||||||
public void startupBot(
|
public void StartBot(
|
||||||
int pos, BotManager bm, List<IBehaviour> behaviours,
|
BotManager bm, List<IBehaviour> behaviours,
|
||||||
string firstName, string lastName, string password, string loginUri)
|
string firstName, string lastName, string password, string loginUri)
|
||||||
{
|
{
|
||||||
Bot pb = new Bot(bm, behaviours, firstName, lastName, password, loginUri);
|
Bot pb = new Bot(bm, behaviours, firstName, lastName, password, loginUri);
|
||||||
|
@ -200,18 +198,19 @@ namespace pCampBot
|
||||||
{
|
{
|
||||||
case EventType.CONNECTED:
|
case EventType.CONNECTED:
|
||||||
m_log.Info("[" + callbot.FirstName + " " + callbot.LastName + "]: Connected");
|
m_log.Info("[" + callbot.FirstName + " " + callbot.LastName + "]: Connected");
|
||||||
numbots++;
|
|
||||||
// m_log.InfoFormat("NUMBOTS {0}", numbots);
|
|
||||||
break;
|
break;
|
||||||
case EventType.DISCONNECTED:
|
case EventType.DISCONNECTED:
|
||||||
m_log.Info("[" + callbot.FirstName + " " + callbot.LastName + "]: Disconnected");
|
m_log.Info("[" + callbot.FirstName + " " + callbot.LastName + "]: Disconnected");
|
||||||
numbots--;
|
|
||||||
// m_log.InfoFormat("NUMBOTS {0}", numbots);
|
lock (m_lBot)
|
||||||
if (numbots <= 0)
|
{
|
||||||
|
if (m_lBot.TrueForAll(b => !b.IsConnected))
|
||||||
Environment.Exit(0);
|
Environment.Exit(0);
|
||||||
|
|
||||||
break;
|
break;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
}
|
||||||
|
|
||||||
/// <summary>
|
/// <summary>
|
||||||
/// Shutting down all bots
|
/// Shutting down all bots
|
||||||
|
@ -233,9 +232,12 @@ namespace pCampBot
|
||||||
}
|
}
|
||||||
|
|
||||||
private void HandleShutdown(string module, string[] cmd)
|
private void HandleShutdown(string module, string[] cmd)
|
||||||
|
{
|
||||||
|
Util.FireAndForget(o =>
|
||||||
{
|
{
|
||||||
m_log.Warn("[BOTMANAGER]: Shutting down bots");
|
m_log.Warn("[BOTMANAGER]: Shutting down bots");
|
||||||
doBotShutdown();
|
doBotShutdown();
|
||||||
|
});
|
||||||
}
|
}
|
||||||
|
|
||||||
private void HandleShowStatus(string module, string[] cmd)
|
private void HandleShowStatus(string module, string[] cmd)
|
||||||
|
|
|
@ -230,6 +230,11 @@
|
||||||
;; by scripts have changed.
|
;; by scripts have changed.
|
||||||
; DeleteScriptsOnStartup = true
|
; DeleteScriptsOnStartup = true
|
||||||
|
|
||||||
|
;; Custom prompt
|
||||||
|
;; This value replaces the word "Region" in console prompt
|
||||||
|
;; (usualy "Region (regionName) # "
|
||||||
|
;; Useful only if you have to monitor serveral servers
|
||||||
|
; custom_prompt = "MyServer1"
|
||||||
|
|
||||||
[SMTP]
|
[SMTP]
|
||||||
;; The SMTP server enabled the email module to send email to external
|
;; The SMTP server enabled the email module to send email to external
|
||||||
|
|
Loading…
Reference in New Issue