From 7161689a97edcdeceee3d3eeeaee7eadc4e06a89 Mon Sep 17 00:00:00 2001 From: Melanie Thielker Date: Thu, 14 Aug 2008 19:59:32 +0000 Subject: Adds UserFlags and GodLevel to the user data store and plumbs then in. This will have no effect unless both the UGAI and the region are this revision or later --- OpenSim/Data/SQLite/Resources/003_UserStore.sql | 6 ++++++ OpenSim/Data/SQLite/SQLiteUserData.cs | 6 ++++++ 2 files changed, 12 insertions(+) create mode 100644 OpenSim/Data/SQLite/Resources/003_UserStore.sql (limited to 'OpenSim/Data/SQLite') diff --git a/OpenSim/Data/SQLite/Resources/003_UserStore.sql b/OpenSim/Data/SQLite/Resources/003_UserStore.sql new file mode 100644 index 0000000..6f890ee --- /dev/null +++ b/OpenSim/Data/SQLite/Resources/003_UserStore.sql @@ -0,0 +1,6 @@ +BEGIN; + +ALTER TABLE users add userFlags integer NOT NULL default 0; +ALTER TABLE users add godLevel integer NOT NULL default 0; + +COMMIT; diff --git a/OpenSim/Data/SQLite/SQLiteUserData.cs b/OpenSim/Data/SQLite/SQLiteUserData.cs index 21c9dbc..c55eee8 100644 --- a/OpenSim/Data/SQLite/SQLiteUserData.cs +++ b/OpenSim/Data/SQLite/SQLiteUserData.cs @@ -681,6 +681,8 @@ namespace OpenSim.Data.SQLite SQLiteUtil.createCol(users, "profileImage", typeof (String)); SQLiteUtil.createCol(users, "profileFirstImage", typeof (String)); SQLiteUtil.createCol(users, "webLoginKey", typeof(String)); + SQLiteUtil.createCol(users, "userFlags", typeof (Int32)); + SQLiteUtil.createCol(users, "godLevel", typeof (Int32)); // Add in contraints users.PrimaryKey = new DataColumn[] {users.Columns["UUID"]}; return users; @@ -789,6 +791,8 @@ namespace OpenSim.Data.SQLite LLUUID.TryParse((String)row["profileFirstImage"], out tmp); user.FirstLifeImage = tmp; user.WebLoginKey = new LLUUID((String) row["webLoginKey"]); + user.UserFlags = Convert.ToInt32(row["userFlags"]); + user.GodLevel = Convert.ToInt32(row["godLevel"]); return user; } @@ -829,6 +833,8 @@ namespace OpenSim.Data.SQLite row["profileImage"] = user.Image; row["profileFirstImage"] = user.FirstLifeImage; row["webLoginKey"] = user.WebLoginKey; + row["userFlags"] = user.UserFlags; + row["godLevel"] = user.GodLevel; // ADO.NET doesn't handle NULL very well foreach (DataColumn col in ds.Tables["users"].Columns) -- cgit v1.1