If a bot is not connected, show region name "(none)" instead of throwing an exception in the "show bots" command of pCampbot
parent
903cff9264
commit
ab4e6a02a5
|
@ -302,9 +302,11 @@ namespace pCampBot
|
||||||
{
|
{
|
||||||
foreach (Bot pb in m_lBot)
|
foreach (Bot pb in m_lBot)
|
||||||
{
|
{
|
||||||
|
Simulator currentSim = pb.Client.Network.CurrentSim;
|
||||||
|
|
||||||
MainConsole.Instance.OutputFormat(
|
MainConsole.Instance.OutputFormat(
|
||||||
outputFormat,
|
outputFormat,
|
||||||
pb.Name, pb.Client.Network.CurrentSim.Name, pb.IsConnected ? "Connected" : "Disconnected");
|
pb.Name, currentSim != null ? currentSim.Name : "(none)", pb.IsConnected ? "Connected" : "Disconnected");
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
Loading…
Reference in New Issue