diff options
Diffstat (limited to '')
-rw-r--r-- | OpenSim/Data/MySQL/MySQLManager.cs | 15 |
1 files changed, 12 insertions, 3 deletions
diff --git a/OpenSim/Data/MySQL/MySQLManager.cs b/OpenSim/Data/MySQL/MySQLManager.cs index 297b1a7..5e9e259 100644 --- a/OpenSim/Data/MySQL/MySQLManager.cs +++ b/OpenSim/Data/MySQL/MySQLManager.cs | |||
@@ -587,6 +587,9 @@ namespace OpenSim.Data.MySQL | |||
587 | LLUUID.TryParse((string)reader["webLoginKey"], out tmp); | 587 | LLUUID.TryParse((string)reader["webLoginKey"], out tmp); |
588 | retval.WebLoginKey = tmp; | 588 | retval.WebLoginKey = tmp; |
589 | } | 589 | } |
590 | |||
591 | retval.UserFlags = Convert.ToInt32(reader["userFlags"].ToString()); | ||
592 | retval.GodLevel = Convert.ToInt32(reader["godLevel"].ToString()); | ||
590 | 593 | ||
591 | } | 594 | } |
592 | else | 595 | else |
@@ -728,14 +731,14 @@ namespace OpenSim.Data.MySQL | |||
728 | "`homeLocationX`, `homeLocationY`, `homeLocationZ`, `homeLookAtX`, `homeLookAtY`, `homeLookAtZ`, `created`, "; | 731 | "`homeLocationX`, `homeLocationY`, `homeLocationZ`, `homeLookAtX`, `homeLookAtY`, `homeLookAtZ`, `created`, "; |
729 | sql += | 732 | sql += |
730 | "`lastLogin`, `userInventoryURI`, `userAssetURI`, `profileCanDoMask`, `profileWantDoMask`, `profileAboutText`, "; | 733 | "`lastLogin`, `userInventoryURI`, `userAssetURI`, `profileCanDoMask`, `profileWantDoMask`, `profileAboutText`, "; |
731 | sql += "`profileFirstText`, `profileImage`, `profileFirstImage`, `webLoginKey`) VALUES "; | 734 | sql += "`profileFirstText`, `profileImage`, `profileFirstImage`, `webLoginKey`, `userFlags`, `godLevel`) VALUES "; |
732 | 735 | ||
733 | sql += "(?UUID, ?username, ?lastname, ?passwordHash, ?passwordSalt, ?homeRegion, "; | 736 | sql += "(?UUID, ?username, ?lastname, ?passwordHash, ?passwordSalt, ?homeRegion, "; |
734 | sql += | 737 | sql += |
735 | "?homeLocationX, ?homeLocationY, ?homeLocationZ, ?homeLookAtX, ?homeLookAtY, ?homeLookAtZ, ?created, "; | 738 | "?homeLocationX, ?homeLocationY, ?homeLocationZ, ?homeLookAtX, ?homeLookAtY, ?homeLookAtZ, ?created, "; |
736 | sql += | 739 | sql += |
737 | "?lastLogin, ?userInventoryURI, ?userAssetURI, ?profileCanDoMask, ?profileWantDoMask, ?profileAboutText, "; | 740 | "?lastLogin, ?userInventoryURI, ?userAssetURI, ?profileCanDoMask, ?profileWantDoMask, ?profileAboutText, "; |
738 | sql += "?profileFirstText, ?profileImage, ?profileFirstImage, ?webLoginKey)"; | 741 | sql += "?profileFirstText, ?profileImage, ?profileFirstImage, ?webLoginKey, ?userFlags, ?godLevel)"; |
739 | 742 | ||
740 | Dictionary<string, string> parameters = new Dictionary<string, string>(); | 743 | Dictionary<string, string> parameters = new Dictionary<string, string>(); |
741 | parameters["?UUID"] = uuid.ToString(); | 744 | parameters["?UUID"] = uuid.ToString(); |
@@ -761,6 +764,9 @@ namespace OpenSim.Data.MySQL | |||
761 | parameters["?profileImage"] = profileImage.ToString(); | 764 | parameters["?profileImage"] = profileImage.ToString(); |
762 | parameters["?profileFirstImage"] = firstImage.ToString(); | 765 | parameters["?profileFirstImage"] = firstImage.ToString(); |
763 | parameters["?webLoginKey"] = string.Empty; | 766 | parameters["?webLoginKey"] = string.Empty; |
767 | parameters["?userFlags"] = "0"; | ||
768 | parameters["?godLevel"] = "0"; | ||
769 | |||
764 | 770 | ||
765 | bool returnval = false; | 771 | bool returnval = false; |
766 | 772 | ||
@@ -815,7 +821,7 @@ namespace OpenSim.Data.MySQL | |||
815 | float homeLookAtX, float homeLookAtY, float homeLookAtZ, int created, int lastlogin, | 821 | float homeLookAtX, float homeLookAtY, float homeLookAtZ, int created, int lastlogin, |
816 | string inventoryURI, string assetURI, uint canDoMask, uint wantDoMask, | 822 | string inventoryURI, string assetURI, uint canDoMask, uint wantDoMask, |
817 | string aboutText, string firstText, | 823 | string aboutText, string firstText, |
818 | LLUUID profileImage, LLUUID firstImage, LLUUID webLoginKey) | 824 | LLUUID profileImage, LLUUID firstImage, LLUUID webLoginKey, int userFlags, int godLevel) |
819 | { | 825 | { |
820 | string sql = "UPDATE users SET `username` = ?username , `lastname` = ?lastname "; | 826 | string sql = "UPDATE users SET `username` = ?username , `lastname` = ?lastname "; |
821 | sql += ", `passwordHash` = ?passwordHash , `passwordSalt` = ?passwordSalt , "; | 827 | sql += ", `passwordHash` = ?passwordHash , `passwordSalt` = ?passwordSalt , "; |
@@ -827,6 +833,7 @@ namespace OpenSim.Data.MySQL | |||
827 | sql += "`profileCanDoMask` = ?profileCanDoMask , `profileWantDoMask` = ?profileWantDoMask , "; | 833 | sql += "`profileCanDoMask` = ?profileCanDoMask , `profileWantDoMask` = ?profileWantDoMask , "; |
828 | sql += "`profileAboutText` = ?profileAboutText , `profileFirstText` = ?profileFirstText, "; | 834 | sql += "`profileAboutText` = ?profileAboutText , `profileFirstText` = ?profileFirstText, "; |
829 | sql += "`profileImage` = ?profileImage , `profileFirstImage` = ?profileFirstImage , "; | 835 | sql += "`profileImage` = ?profileImage , `profileFirstImage` = ?profileFirstImage , "; |
836 | sql += "`userFlags` = ?userFlags , `godLevel` = ?godLevel , "; | ||
830 | sql += "`webLoginKey` = ?webLoginKey WHERE UUID = ?UUID"; | 837 | sql += "`webLoginKey` = ?webLoginKey WHERE UUID = ?UUID"; |
831 | 838 | ||
832 | Dictionary<string, string> parameters = new Dictionary<string, string>(); | 839 | Dictionary<string, string> parameters = new Dictionary<string, string>(); |
@@ -854,6 +861,8 @@ namespace OpenSim.Data.MySQL | |||
854 | parameters["?profileImage"] = profileImage.ToString(); | 861 | parameters["?profileImage"] = profileImage.ToString(); |
855 | parameters["?profileFirstImage"] = firstImage.ToString(); | 862 | parameters["?profileFirstImage"] = firstImage.ToString(); |
856 | parameters["?webLoginKey"] = webLoginKey.ToString(); | 863 | parameters["?webLoginKey"] = webLoginKey.ToString(); |
864 | parameters["?userFlags"] = userFlags.ToString(); | ||
865 | parameters["?godLevel"] = userFlags.ToString(); | ||
857 | 866 | ||
858 | bool returnval = false; | 867 | bool returnval = false; |
859 | try | 868 | try |