* Fixed depreciated warning in MSSQL Manager

* Added support for user agents in the Userserver UserManager
zircon^2
Adam Frisby 2007-05-20 14:38:25 +00:00
parent b8c4e744f9
commit 60639337bd
2 changed files with 52 additions and 1 deletions

View File

@ -57,7 +57,7 @@ namespace OpenGrid.Framework.Data.MSSQL
dbcommand.CommandText = sql; dbcommand.CommandText = sql;
foreach (KeyValuePair<string, string> param in parameters) foreach (KeyValuePair<string, string> param in parameters)
{ {
dbcommand.Parameters.Add(param.Key, param.Value); dbcommand.Parameters.AddWithValue(param.Key, param.Value);
} }
return (IDbCommand)dbcommand; return (IDbCommand)dbcommand;

View File

@ -98,5 +98,56 @@ namespace OpenGridServices.UserServer
return null; return null;
} }
public UserAgentData getUserAgent(LLUUID uuid)
{
foreach (KeyValuePair<string, IUserData> plugin in _plugins)
{
try
{
return plugin.Value.getAgentByUUID(uuid);
}
catch (Exception e)
{
OpenSim.Framework.Console.MainConsole.Instance.WriteLine(OpenSim.Framework.Console.LogPriority.LOW, "Unable to find user via " + plugin.Key + "(" + e.ToString() + ")");
}
}
return null;
}
public UserAgentData getUserAgent(string name)
{
foreach (KeyValuePair<string, IUserData> plugin in _plugins)
{
try
{
return plugin.Value.getAgentByName(name);
}
catch (Exception e)
{
OpenSim.Framework.Console.MainConsole.Instance.WriteLine(OpenSim.Framework.Console.LogPriority.LOW, "Unable to find user via " + plugin.Key + "(" + e.ToString() + ")");
}
}
return null;
}
public UserAgentData getUserAgent(string fname, string lname)
{
foreach (KeyValuePair<string, IUserData> plugin in _plugins)
{
try
{
return plugin.Value.getAgentByName(fname,lname);
}
catch (Exception e)
{
OpenSim.Framework.Console.MainConsole.Instance.WriteLine(OpenSim.Framework.Console.LogPriority.LOW, "Unable to find user via " + plugin.Key + "(" + e.ToString() + ")");
}
}
return null;
}
} }
} }