コード例 #1
0
 public Dictionary<string, object> Fill(WebInterface webInterface, string filename, OSHttpRequest httpRequest,
     OSHttpResponse httpResponse, Dictionary<string, object> requestParameters,
     ITranslator translator, out string response)
 {
     response = null;
     var vars = new Dictionary<string, object>();
     IGenericsConnector connector = Framework.Utilities.DataManager.RequestPlugin<IGenericsConnector>();
     if (httpRequest.Query.Contains("delete"))
     {
         string newsID = httpRequest.Query["delete"].ToString();
         connector.RemoveGeneric(UUID.Zero, "WebGridNews", newsID);
         vars["Success"] = "Successfully deleted the news item";
     }
     else
         vars["Success"] = "";
     var newsItems = connector.GetGenerics<GridNewsItem>(UUID.Zero, "WebGridNews");
     vars.Add("News", newsItems.ConvertAll<Dictionary<string, object>>(item => item.ToDictionary()));
     vars.Add("NewsManager", translator.GetTranslatedString("NewsManager"));
     vars.Add("EditNewsItem", translator.GetTranslatedString("EditNewsItem"));
     vars.Add("AddNewsItem", translator.GetTranslatedString("AddNewsItem"));
     vars.Add("DeleteNewsItem", translator.GetTranslatedString("DeleteNewsItem"));
     vars.Add("NewsTitleText", translator.GetTranslatedString("NewsTitleText"));
     vars.Add("NewsDateText", translator.GetTranslatedString("NewsDateText"));
     vars.Add("EditNewsText", translator.GetTranslatedString("EditNewsText"));
     vars.Add("DeleteNewsText", translator.GetTranslatedString("DeleteNewsText"));
     return vars;
 }
コード例 #2
0
        public Dictionary<string, object> Fill(WebInterface webInterface, string filename, OSHttpRequest httpRequest,
            OSHttpResponse httpResponse, Dictionary<string, object> requestParameters,
            ITranslator translator, out string response)
        {
            response = null;
            var vars = new Dictionary<string, object>();

            // Style Switcher
            vars.Add("styles1", translator.GetTranslatedString("styles1"));
            vars.Add("styles2", translator.GetTranslatedString("styles2"));
            vars.Add("styles3", translator.GetTranslatedString("styles3"));
            vars.Add("styles4", translator.GetTranslatedString("styles4"));
            vars.Add("styles5", translator.GetTranslatedString("styles5"));

            vars.Add("StyleSwitcherStylesText", translator.GetTranslatedString("StyleSwitcherStylesText"));
            vars.Add("StyleSwitcherLanguagesText", translator.GetTranslatedString("StyleSwitcherLanguagesText"));
            vars.Add("StyleSwitcherChoiceText", translator.GetTranslatedString("StyleSwitcherChoiceText"));

            // Language Switcher
            vars.Add("en", translator.GetTranslatedString("en"));
            vars.Add("fr", translator.GetTranslatedString("fr"));
            vars.Add("de", translator.GetTranslatedString("de"));
            vars.Add("it", translator.GetTranslatedString("it"));
            vars.Add("es", translator.GetTranslatedString("es"));
            vars.Add("nl", translator.GetTranslatedString("nl"));

            return vars;
        }
コード例 #3
0
 public bool AttemptFindPage(string filename, ref OSHttpResponse httpResponse, out string text)
 {
     httpResponse.ContentType = "text/html";
     //text = "";
     text = File.ReadAllText("html/webprofile/index.html");
               return false;
 }
コード例 #4
0
        public Dictionary<string, object> Fill(WebInterface webInterface, string filename, OSHttpRequest httpRequest,
                                                OSHttpResponse httpResponse, Dictionary<string, object> requestParameters,
                                                ITranslator translator, out string response)
        {
            response = null;
            var vars = new Dictionary<string, object>();
            //IGenericsConnector connector = Framework.Utilities.DataManager.RequestPlugin<IGenericsConnector>();

            // Check if we're looking at the standard page or the submitted one
            if (requestParameters.ContainsKey("Submit"))
            {
            }
            else
            {
                //vars.Add("ErrorMessage", error);

                vars.Add("SimConsoleText", translator.GetTranslatedString("SimConsoleText"));
                vars.Add("SimAddressText", translator.GetTranslatedString("SimAddressText"));
                vars.Add("UserNameText", translator.GetTranslatedString("UserNameText"));
                vars.Add("PasswordText", translator.GetTranslatedString("PasswordText"));
                vars.Add("SendCommandText", translator.GetTranslatedString("SendCommandText"));

                vars.Add("Login", translator.GetTranslatedString("Login"));

            }
            return vars;
        }
コード例 #5
0
        byte [] SimulatorFeaturesCAP (string path, Stream request, OSHttpRequest httpRequest, OSHttpResponse httpResponse)
        {
            OSDMap data = new OSDMap ();
            // 17-06-2015 Fly-Man- AvatarHoverHeight enabled
            data ["AvatarHoverHeightEnabled"] = true;

            // 17-06-2015 Fly-Man- MaxMaterialsPerTransaction enabled
            data ["MaxMaterialsPerTransaction"] = 50;

            data ["MeshRezEnabled"] = true;
            data ["MeshUploadEnabled"] = true;
            data ["MeshXferEnabled"] = true;
            data ["PhysicsMaterialsEnabled"] = true;

            OSDMap typesMap = new OSDMap ();

            typesMap ["convex"] = true;
            typesMap ["none"] = true;
            typesMap ["prim"] = true;

            data ["PhysicsShapeTypes"] = typesMap;

            // some additional features
            data ["god_names"] = GodNames (httpRequest);

            //Send back data
            return OSDParser.SerializeLLSDXmlBytes (data);
        }
コード例 #6
0
        public Dictionary<string, object> Fill(WebInterface webInterface, string filename, OSHttpRequest httpRequest,
            OSHttpResponse httpResponse, Dictionary<string, object> requestParameters,
            ITranslator translator, out string response)
        {
            response = null;
            var vars = new Dictionary<string, object>();

            vars.Add("DisplayLG1", "display: none;");
            vars.Add("DisplayLG2", "display: none;");
            vars.Add("DisplayLG3", "display: none;");
            vars.Add("DisplayLG4", "display: none;");
            vars.Add("DisplayLG5", "display: none;");
            vars.Add("DisplayLG6", "display: none;");
            if (translator.LanguageName == "en")
                vars["DisplayLG1"] = "";
            if (translator.LanguageName == "fr")
                vars["DisplayLG2"] = "";
            if (translator.LanguageName == "de")
                vars["DisplayLG3"] = "";
            if (translator.LanguageName == "it")
                vars["DisplayLG4"] = "";
            if (translator.LanguageName == "es")
                vars["DisplayLG5"] = "";
            if (translator.LanguageName == "nl")
                vars["DisplayLG6"] = "";

            return vars;
        }
コード例 #7
0
        public Dictionary<string, object> Fill(WebInterface webInterface, string filename, OSHttpRequest httpRequest,
            OSHttpResponse httpResponse, Dictionary<string, object> requestParameters,
            ITranslator translator, out string response)
        {
            response = null;
            var vars = new Dictionary<string, object>();
            var usersList = new List<Dictionary<string, object>>();

            uint amountPerQuery = 10;
            int start = httpRequest.Query.ContainsKey("Start") ? int.Parse(httpRequest.Query["Start"].ToString()) : 0;
            uint count = Framework.Utilities.DataManager.RequestPlugin<IAgentInfoConnector>().RecentlyOnline(5*60, true);
            int maxPages = (int) (count/amountPerQuery) - 1;

            if (start == -1)
                start = (int) (maxPages < 0 ? 0 : maxPages);

            vars.Add("CurrentPage", start);
            vars.Add("NextOne", start + 1 > maxPages ? start : start + 1);
            vars.Add("BackOne", start - 1 < 0 ? 0 : start - 1);

            var users = Framework.Utilities.DataManager.RequestPlugin<IAgentInfoConnector>()
                                   .RecentlyOnline(5*60, true, new Dictionary<string, bool>(), (uint) start,
                                                   amountPerQuery);
            IUserAccountService accountService = webInterface.Registry.RequestModuleInterface<IUserAccountService>();
            IGridService gridService = webInterface.Registry.RequestModuleInterface<IGridService>();
            foreach (var user in users)
            {
                var region = gridService.GetRegionByUUID(null, user.CurrentRegionID);
                var account = accountService.GetUserAccount(region.AllScopeIDs, UUID.Parse(user.UserID));
                if (account != null && region != null)
                    usersList.Add(new Dictionary<string, object>
                                      {
                                          {"UserName", account.Name},
                                          {"UserRegion", region.RegionName},
                                          {"UserID", user.UserID},
                                          {"UserRegionID", region.RegionID}
                                      });
            }
            if (requestParameters.ContainsKey("Order"))
            {
                if (requestParameters["Order"].ToString() == "RegionName")
                    usersList.Sort((a, b) => a["UserRegion"].ToString().CompareTo(b["UserRegion"].ToString()));
                if (requestParameters["Order"].ToString() == "UserName")
                    usersList.Sort((a, b) => a["UserName"].ToString().CompareTo(b["UserName"].ToString()));
            }

            vars.Add("UsersOnlineList", usersList);
            vars.Add("OnlineUsersText", translator.GetTranslatedString("OnlineUsersText"));
            vars.Add("UserNameText", translator.GetTranslatedString("UserNameText"));
            vars.Add("RegionNameText", translator.GetTranslatedString("RegionNameText"));
            vars.Add("MoreInfoText", translator.GetTranslatedString("MoreInfoText"));

            vars.Add("FirstText", translator.GetTranslatedString("FirstText"));
            vars.Add("BackText", translator.GetTranslatedString("BackText"));
            vars.Add("NextText", translator.GetTranslatedString("NextText"));
            vars.Add("LastText", translator.GetTranslatedString("LastText"));
            vars.Add("CurrentPageText", translator.GetTranslatedString("CurrentPageText"));

            return vars;
        }
コード例 #8
0
        public Dictionary<string, object> Fill(WebInterface webInterface, string filename, OSHttpRequest httpRequest,
            OSHttpResponse httpResponse, Dictionary<string, object> requestParameters,
            ITranslator translator, out string response)
        {
            response = null;
            var vars = new Dictionary<string, object>();

            if (requestParameters.ContainsKey("ResetMenu"))
            {
                PagesMigrator.ResetToDefaults();
                response = translator.GetTranslatedString("ChangesSavedSuccessfully");
                return null;
            }
            if (requestParameters.ContainsKey("ResetSettings"))
            {
                SettingsMigrator.ResetToDefaults();
                response = translator.GetTranslatedString("ChangesSavedSuccessfully");
                return null;
            }

            vars.Add("FactoryReset", translator.GetTranslatedString("FactoryReset"));
            vars.Add("ResetMenuText", translator.GetTranslatedString("ResetMenuText"));
            vars.Add("ResetSettingsText", translator.GetTranslatedString("ResetSettingsText"));
            vars.Add("ResetMenuInfoText", translator.GetTranslatedString("ResetMenuText"));
            vars.Add("ResetSettingsInfoText", translator.GetTranslatedString("ResetSettingsInfoText"));
            vars.Add("Reset", translator.GetTranslatedString("Reset"));

            return vars;
        }
コード例 #9
0
        public byte [] ProcessGetGroupAPI (string path, Stream request, OSHttpRequest httpRequest,
                                          OSHttpResponse httpResponse)
        {
            string groupID;
            if (httpRequest.QueryString ["group_id"] != null) {
                groupID = httpRequest.QueryString ["group_id"];
                MainConsole.Instance.Debug ("[GroupAPIv1] Requesting groups bans for group_id: " + groupID);

                // Get group banned member list
                OSDMap bannedUsers = new OSDMap ();
                var banUsers = m_groupService.GetGroupBannedMembers (m_service.AgentID, (UUID)groupID);
                if (banUsers != null) {
                    foreach (GroupBannedAgentsData user in banUsers) {
                        OSDMap banned = new OSDMap ();
                        banned ["ban_date"] = user.BanDate;
                        bannedUsers [user.AgentID.ToString ()] = banned;
                    }
                }

                OSDMap map = new OSDMap ();
                map ["group_id"] = groupID;
                map ["ban_list"] = bannedUsers;
                return OSDParser.SerializeLLSDXmlBytes (map);
            }

            return null;
        }
コード例 #10
0
        public Dictionary<string, object> Fill(WebInterface webInterface, string filename, OSHttpRequest httpRequest,
            OSHttpResponse httpResponse, Dictionary<string, object> requestParameters,
            ITranslator translator, out string response)
        {
            response = null;
            var vars = new Dictionary<string, object>();
            IGenericsConnector connector = Framework.Utilities.DataManager.RequestPlugin<IGenericsConnector>();
            GridNewsItem news;
            if (requestParameters.ContainsKey("Submit"))
            {
                string title = requestParameters["NewsTitle"].ToString();
                string text = requestParameters["NewsText"].ToString();
                string id = requestParameters["NewsID"].ToString();
                news = connector.GetGeneric<GridNewsItem>(UUID.Zero, "WebGridNews", id);
                connector.RemoveGeneric(UUID.Zero, "WebGridNews", id);
                GridNewsItem item = new GridNewsItem {Text = text, Time = news.Time, Title = title, ID = int.Parse(id)};
                connector.AddGeneric(UUID.Zero, "WebGridNews", id, item.ToOSD());
                response = "<h3>News item editted successfully, redirecting to main page</h3>" +
                           "<script language=\"javascript\">" +
                           "setTimeout(function() {window.location.href = \"index.html?page=news_manager\";}, 0);" +
                           "</script>";
                return null;
            }

            news = connector.GetGeneric<GridNewsItem>(UUID.Zero, "WebGridNews", httpRequest.Query["newsid"].ToString());
            vars.Add("NewsTitle", news.Title);
            vars.Add("NewsText", news.Text);
            vars.Add("NewsID", news.ID.ToString());

            vars.Add("NewsItemTitle", translator.GetTranslatedString("NewsItemTitle"));
            vars.Add("NewsItemText", translator.GetTranslatedString("NewsItemText"));
            vars.Add("EditNewsText", translator.GetTranslatedString("EditNewsText"));
            vars.Add("Submit", translator.GetTranslatedString("Submit"));
            return vars;
        }
コード例 #11
0
ファイル: news.cs プロジェクト: WhiteCoreSim/WhiteCore-Dev
        public Dictionary<string, object> Fill (WebInterface webInterface, string filename, OSHttpRequest httpRequest,
                                               OSHttpResponse httpResponse, Dictionary<string, object> requestParameters,
                                               ITranslator translator, out string response)
        {
            response = null;
            var vars = new Dictionary<string, object> ();
            IGenericsConnector connector = Framework.Utilities.DataManager.RequestPlugin<IGenericsConnector> ();
            GridNewsItem news = connector.GetGeneric<GridNewsItem> (UUID.Zero, "WebGridNews",
                                                                   httpRequest.Query ["newsid"].ToString ());
            if (news != null) {
                vars.Add ("NewsTitle", news.Title);
                vars.Add ("NewsText", news.Text);
                vars.Add ("NewsID", news.ID.ToString ());
            } else {
                if (httpRequest.Query ["newsid"].ToString () == "-1") {
                    vars.Add ("NewsTitle", "No news to report");
                    vars.Add ("NewsText", "");
                } else {
                    vars.Add ("NewsTitle", "Invalid News Item");
                    vars.Add ("NewsText", "");
                }
                vars.Add ("NewsID", "-1");
            }

            vars.Add ("News", translator.GetTranslatedString ("News"));
            vars.Add ("NewsItemTitle", translator.GetTranslatedString ("NewsItemTitle"));
            vars.Add ("NewsItemText", translator.GetTranslatedString ("NewsItemText"));
            vars.Add ("EditNewsText", translator.GetTranslatedString ("EditNewsText"));
            return vars;
        }
コード例 #12
0
ファイル: GroupCAPS.cs プロジェクト: BogusCurry/WhiteCore-Dev
        public byte[] GroupMemberData(string path, Stream request, OSHttpRequest httpRequest,
            OSHttpResponse httpResponse)
        {
            try
            {
                //MainConsole.Instance.Debug("[CAPS]: UploadBakedTexture Request in region: " +
                //        m_regionName);

                OSDMap rm = (OSDMap) OSDParser.DeserializeLLSDXml(HttpServerHandlerHelpers.ReadFully(request));
                UUID groupID = rm["group_id"].AsUUID();

                OSDMap defaults = new OSDMap();
                ulong EveryonePowers = (ulong) (GroupPowers.AllowSetHome |
                                                GroupPowers.Accountable |
                                                GroupPowers.JoinChat |
                                                GroupPowers.AllowVoiceChat |
                                                GroupPowers.ReceiveNotices |
                                                GroupPowers.StartProposal |
                                                GroupPowers.VoteOnProposal);
                defaults["default_powers"] = EveryonePowers;

                List<string> titles = new List<string>();
                OSDMap members = new OSDMap();
                int count = 0;
                foreach (GroupMembersData gmd in m_groupService.GetGroupMembers(m_service.AgentID, groupID))
                {
                    OSDMap member = new OSDMap();
                    member["donated_square_meters"] = gmd.Contribution;
                    member["owner"] = (gmd.IsOwner ? "Y" : "N");
                    member["last_login"] = gmd.OnlineStatus;
                    if (titles.Contains(gmd.Title))
                    {
                        member["title"] = titles.FindIndex((s) => s == gmd.Title);
                    }
                    else
                    {
                        titles.Add(gmd.Title);
                        member["title"] = titles.Count-1;
                    }
                    member["powers"] = gmd.AgentPowers;
                    count++;
                    members[gmd.AgentID.ToString()] = member;
                }

                OSDMap map = new OSDMap();
                map["member_count"] = count;
                map["group_id"] = groupID;
                map["defaults"] = defaults;
                map["titles"] = titles.ToOSDArray();
                map["members"] = members;
                return OSDParser.SerializeLLSDXmlBytes(map);
            }
            catch (Exception e)
            {
                MainConsole.Instance.Error("[CAPS]: " + e);
            }

            return null;
        }
コード例 #13
0
        public byte[] GroupExperiences (string path, Stream request, OSHttpRequest httpRequest,
                                      OSHttpResponse httpResponse)
        {
            MainConsole.Instance.DebugFormat("[GroupExperiences] Call = {0}", httpRequest);
            var groupExp = new OSDMap();

            return OSDParser.SerializeLLSDXmlBytes (groupExp);
        }
コード例 #14
0
        public Dictionary<string, object> Fill (WebInterface webInterface, string filename, OSHttpRequest httpRequest,
                                               OSHttpResponse httpResponse, Dictionary<string, object> requestParameters,
                                               ITranslator translator, out string response)
        {
            response = null;
            var vars = new Dictionary<string, object> ();

            List<Dictionary<string, object>> RegionListVars = new List<Dictionary<string, object>> ();
            var sortBy = new Dictionary<string, bool> ();
            if (httpRequest.Query.ContainsKey ("region"))
                sortBy.Add (httpRequest.Query ["region"].ToString (), true);
            else if (httpRequest.Query.ContainsKey ("Order"))
                sortBy.Add (httpRequest.Query ["Order"].ToString (), true);


            var regionData = Framework.Utilities.DataManager.RequestPlugin<IRegionData> ();
            var regions = regionData.Get ((RegionFlags) 0,
                                          RegionFlags.Hyperlink | RegionFlags.Foreign | RegionFlags.Hidden,
                                          null, null, sortBy);
            foreach (var region in regions) {
                string info;
                info = (region.RegionArea < 1000000) ? region.RegionArea + " m2" : (region.RegionArea / 1000000) + " km2";
                info = info + ", " + region.RegionTerrain;

                RegionListVars.Add (new Dictionary<string, object> {
                    { "RegionLocX", region.RegionLocX / Constants.RegionSize },
                    { "RegionLocY", region.RegionLocY / Constants.RegionSize },
                    { "RegionName", region.RegionName },
                    { "RegionInfo", info},
                    { "RegionStatus", region.IsOnline ? "yes" : "no"},
                    { "RegionID", region.RegionID },
                    { "RegionURI", region.RegionURI }
                });
            }

            vars.Add ("RegionList", RegionListVars);
            vars.Add ("RegionText", translator.GetTranslatedString ("Region"));


            vars.Add ("RegionNameText", translator.GetTranslatedString ("RegionNameText"));
            vars.Add ("RegionLocXText", translator.GetTranslatedString ("RegionLocXText"));
            vars.Add ("RegionLocYText", translator.GetTranslatedString ("RegionLocYText"));
            vars.Add ("RegionOnlineText", translator.GetTranslatedString ("Online"));
            vars.Add ("SortByLocX", translator.GetTranslatedString ("SortByLocX"));
            vars.Add ("SortByLocY", translator.GetTranslatedString ("SortByLocY"));
            vars.Add ("SortByName", translator.GetTranslatedString ("SortByName"));
            vars.Add ("RegionListText", translator.GetTranslatedString ("RegionListText"));
            vars.Add ("FirstText", translator.GetTranslatedString ("FirstText"));
            vars.Add ("BackText", translator.GetTranslatedString ("BackText"));
            vars.Add ("NextText", translator.GetTranslatedString ("NextText"));
            vars.Add ("LastText", translator.GetTranslatedString ("LastText"));
            vars.Add ("CurrentPageText", translator.GetTranslatedString ("CurrentPageText"));
            vars.Add ("MoreInfoText", translator.GetTranslatedString ("MoreInfoText"));
            vars.Add ("RegionMoreInfo", translator.GetTranslatedString ("RegionMoreInfo"));
            vars.Add ("MainServerURL", webInterface.GridURL);

            return vars;
        }
コード例 #15
0
        public Dictionary<string, object> Fill(WebInterface webInterface, string filename, OSHttpRequest httpRequest,
            OSHttpResponse httpResponse, Dictionary<string, object> requestParameters,
            ITranslator translator, out string response)
        {
            response = null;
            var vars = new Dictionary<string, object>();
            IGenericsConnector connector = Framework.Utilities.DataManager.RequestPlugin<IGenericsConnector>();
            var settings = connector.GetGeneric<GridSettings>(UUID.Zero, "WebSettings", "Settings");

            if (requestParameters.ContainsKey("Submit"))
            {
                settings.MapCenter.X = int.Parse(requestParameters["GridCenterX"].ToString());
                settings.MapCenter.Y = int.Parse(requestParameters["GridCenterY"].ToString());
                settings.HideLanguageTranslatorBar = requestParameters["HideLanguageBar"].ToString() == "1";
                settings.HideStyleBar = requestParameters["HideStyleBar"].ToString() == "1";
                connector.AddGeneric(UUID.Zero, "WebSettings", "Settings", settings.ToOSD());

                response = "Successfully updated settings.";

                return null;
            }
            else if (requestParameters.ContainsKey("IgnorePagesUpdates"))
            {
                settings.LastPagesVersionUpdateIgnored = PagesMigrator.CurrentVersion;
                connector.AddGeneric(UUID.Zero, "WebSettings", "Settings", settings.ToOSD());
            }
            else if (requestParameters.ContainsKey("IgnoreSettingsUpdates"))
            {
                settings.LastSettingsVersionUpdateIgnored = PagesMigrator.CurrentVersion;
                connector.AddGeneric(UUID.Zero, "WebSettings", "Settings", settings.ToOSD());
            }
            vars.Add("GridCenterX", settings.MapCenter.X);
            vars.Add("GridCenterY", settings.MapCenter.Y);
            vars.Add("HideLanguageBarNo", !settings.HideLanguageTranslatorBar ? "selected=\"selected\"" : "");
            vars.Add("HideLanguageBarYes", settings.HideLanguageTranslatorBar ? "selected=\"selected\"" : "");
            vars.Add("HideStyleBarNo", !settings.HideStyleBar ? "selected=\"selected\"" : "");
            vars.Add("HideStyleBarYes", settings.HideStyleBar ? "selected=\"selected\"" : "");
            vars.Add("IgnorePagesUpdates",
                     PagesMigrator.CheckWhetherIgnoredVersionUpdate(settings.LastPagesVersionUpdateIgnored)
                         ? ""
                         : "checked");
            vars.Add("IgnoreSettingsUpdates",
                     settings.LastSettingsVersionUpdateIgnored != SettingsMigrator.CurrentVersion ? "" : "checked");

            vars.Add("SettingsManager", translator.GetTranslatedString("SettingsManager"));
            vars.Add("IgnorePagesUpdatesText", translator.GetTranslatedString("IgnorePagesUpdatesText"));
            vars.Add("IgnoreSettingsUpdatesText", translator.GetTranslatedString("IgnoreSettingsUpdatesText"));
            vars.Add("GridCenterXText", translator.GetTranslatedString("GridCenterXText"));
            vars.Add("GridCenterYText", translator.GetTranslatedString("GridCenterYText"));
            vars.Add("HideLanguageBarText", translator.GetTranslatedString("HideLanguageBarText"));
            vars.Add("HideStyleBarText", translator.GetTranslatedString("HideStyleBarText"));
            vars.Add("Save", translator.GetTranslatedString("Save"));
            vars.Add("No", translator.GetTranslatedString("No"));
            vars.Add("Yes", translator.GetTranslatedString("Yes"));

            return vars;
        }
コード例 #16
0
ファイル: chat.cs プロジェクト: WhiteCoreSim/WhiteCore-Dev
 public Dictionary<string, object> Fill (WebInterface webInterface, string filename, OSHttpRequest httpRequest,
                                        OSHttpResponse httpResponse, Dictionary<string, object> requestParameters,
                                        ITranslator translator, out string response)
 {
     response = null;
     var vars = new Dictionary<string, object> ();
     vars.Add ("ChatText", translator.GetTranslatedString ("ChatText"));
     return vars;
 }
コード例 #17
0
        public Dictionary<string, object> Fill (WebInterface webInterface, string filename, OSHttpRequest httpRequest,
                                               OSHttpResponse httpResponse, Dictionary<string, object> requestParameters,
                                               ITranslator translator, out string response)
        {
            response = null;
            var vars = new Dictionary<string, object> ();
            var settings = webInterface.GetGridSettings ();

            if (requestParameters.ContainsKey ("Submit")) {
                settings.Gridname = requestParameters ["Gridname"].ToString ();
                settings.Gridnick = requestParameters ["Gridnick"].ToString ();
                settings.WelcomeMessage = requestParameters ["WelcomeMessage"].ToString ();
                settings.GovernorName = requestParameters ["GovernorName"].ToString ();
                settings.RealEstateOwnerName = requestParameters ["RealEstateOwnerName"].ToString ();
                settings.BankerName = requestParameters ["BankerName"].ToString ();
                settings.MarketplaceOwnerName = requestParameters ["MarketplaceOwnerName"].ToString ();
                settings.MainlandEstateName = requestParameters ["MainlandEstateName"].ToString ();
                settings.SystemEstateName = requestParameters ["SystemEstateName"].ToString ();

                // update main grid setup
                webInterface.SaveGridSettings (settings);
                response = "Successfully updated grid settings.";

                return null;
            }

            vars.Add ("Gridname", settings.Gridname);
            vars.Add ("Gridnick", settings.Gridnick);
            vars.Add ("WelcomeMessage", settings.WelcomeMessage);
            vars.Add ("GovernorName", settings.GovernorName);
            vars.Add ("RealEstateOwnerName", settings.RealEstateOwnerName);
            vars.Add ("BankerName", settings.BankerName);
            vars.Add ("MarketplaceOwnerName", settings.MarketplaceOwnerName);
            vars.Add ("MainlandEstateName", settings.MainlandEstateName);
            vars.Add ("SystemEstateName", settings.SystemEstateName);


            vars.Add ("GridSettingsManager", translator.GetTranslatedString ("GridSettingsManager"));
            vars.Add ("GridnameText", translator.GetTranslatedString ("GridnameText"));
            vars.Add ("GridnickText", translator.GetTranslatedString ("GridnickText"));
            vars.Add ("WelcomeMessageText", translator.GetTranslatedString ("WelcomeMessageText"));
            vars.Add ("GovernorNameText", translator.GetTranslatedString ("GovernorNameText"));
            vars.Add ("RealEstateOwnerNameText", translator.GetTranslatedString ("RealEstateOwnerNameText"));
            vars.Add ("BankerNameText", translator.GetTranslatedString ("BankerNameText"));
            vars.Add ("MarketPlaceOwnerNameText", translator.GetTranslatedString ("MarketPlaceOwnerNameText"));
            vars.Add ("MainlandEstateNameText", translator.GetTranslatedString ("MainlandEstateNameText"));
            vars.Add ("SystemEstateNameText", translator.GetTranslatedString ("SystemEstateNameText"));



            vars.Add ("Save", translator.GetTranslatedString ("Save"));
            vars.Add ("No", translator.GetTranslatedString ("No"));
            vars.Add ("Yes", translator.GetTranslatedString ("Yes"));

            return vars;
        }
コード例 #18
0
        public Dictionary<string, object> Fill (WebInterface webInterface, string filename, OSHttpRequest httpRequest,
                                               OSHttpResponse httpResponse, Dictionary<string, object> requestParameters,
                                               ITranslator translator, out string response)
        {
            response = null;
            var vars = new Dictionary<string, object> ();
            var estateListVars = new List<Dictionary<string, object>> ();
            var estateConnector = Framework.Utilities.DataManager.RequestPlugin<IEstateConnector> ();
            var accountService = webInterface.Registry.RequestModuleInterface<IUserAccountService> ();

            var estates = estateConnector.GetEstateNames ();

            if (estates.Count > 0) {

                foreach (var estate in estates) {
                    var estateID = estateConnector.GetEstateID (estate);
                    EstateSettings ES = estateConnector.GetEstateSettings (estateID);

                    if (ES != null) {
                        var estateOwner = accountService.GetUserAccount (null, ES.EstateOwner);
                        var regions = estateConnector.GetRegions ((int)ES.EstateID);

                        estateListVars.Add (new Dictionary<string, object> {
                            {"EstateID", ES.EstateID.ToString()},
                            {"EstateName", ES.EstateName},
                            {"EstateOwner", estateOwner.Name},
                            {"PublicAccess", WebHelpers.YesNo(translator, ES.PublicAccess)},
                            {"AllowVoice", WebHelpers.YesNo(translator, ES.AllowVoice)},
                            {"TaxFree", WebHelpers.YesNo(translator, ES.TaxFree)},
                            {"AllowDirectTeleport", WebHelpers.YesNo (translator, ES.AllowDirectTeleport)},
                            {"RegionCount", regions.Count.ToString()}
                        });
                    }
                }
            }

            vars.Add ("EstateList", estateListVars);

            // labels
            vars.Add ("EstateManagerText", translator.GetTranslatedString ("MenuEstateManager"));
            vars.Add ("AddEstateText", translator.GetTranslatedString ("AddEstateText"));
            vars.Add ("EditEstateText", translator.GetTranslatedString ("EditText"));
            vars.Add ("EstateListText", translator.GetTranslatedString ("EstatesText"));
            vars.Add ("EstateText", translator.GetTranslatedString ("EstateText"));
            vars.Add ("EstateOwnerText", translator.GetTranslatedString ("MenuOwnerTitle"));
            vars.Add ("PublicAccessText", translator.GetTranslatedString ("PublicAccessText"));
            vars.Add ("AllowVoiceText", translator.GetTranslatedString ("AllowVoiceText"));
            vars.Add ("TaxFreeText", translator.GetTranslatedString ("TaxFreeText"));
            vars.Add ("AllowDirectTeleportText", translator.GetTranslatedString ("AllowDirectTeleportText"));
            vars.Add ("RegionsText", translator.GetTranslatedString ("MenuRegionsTitle"));

            return vars;
        }
コード例 #19
0
        public Dictionary<string, object> Fill(WebInterface webInterface, string filename, OSHttpRequest httpRequest,
            OSHttpResponse httpResponse, Dictionary<string, object> requestParameters,
            ITranslator translator, out string response)
        {
            response = null;
            var vars = new Dictionary<string, object>();
            IGenericsConnector connector = Framework.Utilities.DataManager.RequestPlugin<IGenericsConnector>();

            if (requestParameters.ContainsKey("Submit"))
            {
                GridWelcomeScreen submittedInfo = new GridWelcomeScreen();
                submittedInfo.SpecialWindowMessageTitle = requestParameters["SpecialWindowTitle"].ToString();
                submittedInfo.SpecialWindowMessageText = requestParameters["SpecialWindowText"].ToString();
                submittedInfo.SpecialWindowMessageColor = requestParameters["SpecialWindowColor"].ToString();
                submittedInfo.SpecialWindowActive = requestParameters["SpecialWindowStatus"].ToString() == "1";
                submittedInfo.GridStatus = requestParameters["GridStatus"].ToString() == "1";

                connector.AddGeneric(UUID.Zero, "GridWelcomeScreen", "GridWelcomeScreen", submittedInfo.ToOSD());

                response = "Successfully saved data";
                return null;
            }

            GridWelcomeScreen welcomeInfo = connector.GetGeneric<GridWelcomeScreen>(UUID.Zero, "GridWelcomeScreen",
                                                                                    "GridWelcomeScreen");
            if (welcomeInfo == null)
                welcomeInfo = GridWelcomeScreen.Default;
            vars.Add("OpenNewsManager", translator.GetTranslatedString("OpenNewsManager"));
            vars.Add("SpecialWindowTitleText", translator.GetTranslatedString("SpecialWindowTitleText"));
            vars.Add("SpecialWindowTextText", translator.GetTranslatedString("SpecialWindowTextText"));
            vars.Add("SpecialWindowColorText", translator.GetTranslatedString("SpecialWindowColorText"));
            vars.Add("SpecialWindowStatusText", translator.GetTranslatedString("SpecialWindowStatusText"));
            vars.Add("WelcomeScreenManagerFor", translator.GetTranslatedString("WelcomeScreenManagerFor"));
            vars.Add("GridStatus", translator.GetTranslatedString("GridStatus"));
            vars.Add("Online", translator.GetTranslatedString("Online"));
            vars.Add("Offline", translator.GetTranslatedString("Offline"));
            vars.Add("Enabled", translator.GetTranslatedString("Enabled"));
            vars.Add("Disabled", translator.GetTranslatedString("Disabled"));

            vars.Add("SpecialWindowTitle", welcomeInfo.SpecialWindowMessageTitle);
            vars.Add("SpecialWindowMessage", welcomeInfo.SpecialWindowMessageText);
            vars.Add("SpecialWindowActive", welcomeInfo.SpecialWindowActive ? "selected" : "");
            vars.Add("SpecialWindowInactive", welcomeInfo.SpecialWindowActive ? "" : "selected");
            vars.Add("GridActive", welcomeInfo.GridStatus ? "selected" : "");
            vars.Add("GridInactive", welcomeInfo.GridStatus ? "" : "selected");
            vars.Add("SpecialWindowColorRed", welcomeInfo.SpecialWindowMessageColor == "red" ? "selected" : "");
            vars.Add("SpecialWindowColorYellow", welcomeInfo.SpecialWindowMessageColor == "yellow" ? "selected" : "");
            vars.Add("SpecialWindowColorGreen", welcomeInfo.SpecialWindowMessageColor == "green" ? "selected" : "");
            vars.Add("SpecialWindowColorWhite", welcomeInfo.SpecialWindowMessageColor == "white" ? "selected" : "");
            vars.Add("Submit", translator.GetTranslatedString("Submit"));

            return vars;
        }
コード例 #20
0
        public Dictionary<string, object> Fill (WebInterface webInterface, string filename, OSHttpRequest httpRequest,
                                               OSHttpResponse httpResponse, Dictionary<string, object> requestParameters,
                                               ITranslator translator, out string response)
        {
            response = null;
            var vars = new Dictionary<string, object> ();
            var estateListVars = new List<Dictionary<string, object>> ();
            var estateConnector = Framework.Utilities.DataManager.RequestPlugin<IEstateConnector> ();
            var user = Authenticator.GetAuthentication (httpRequest);

            var estates = estateConnector.GetEstates (user.PrincipalID);

            if (estates.Count > 0) {

                foreach (var estate in estates) {
                    var regions = estateConnector.GetRegions ((int)estate.EstateID);

                    estateListVars.Add (new Dictionary<string, object> {
                        {"EstateName", estate.EstateName},
                        {"PublicAccess", WebHelpers.YesNo(translator, estate.PublicAccess)},
                        {"AllowVoice", WebHelpers.YesNo(translator, estate.AllowVoice)},
                        {"TaxFree", WebHelpers.YesNo(translator, estate.TaxFree)},
                        {"AllowDirectTeleport", WebHelpers.YesNo (translator, estate.AllowDirectTeleport)},
                        {"RegionCount", regions.Count.ToString()}
                    });
                }
            } else {
                estateListVars.Add (new Dictionary<string, object> {
                    {"EstateName", translator.GetTranslatedString("NoDetailsText")},
                    {"PublicAccess", ""},
                        {"AllowVoice", ""},
                        {"TaxFree", ""},
                        {"AllowDirectTeleport", ""},
                        {"RegionCount", ""}
                    });

            }

            vars.Add ("EstateList", estateListVars);

            // labels
            vars.Add ("UserName", user.Name);
            vars.Add ("AddEstateText", translator.GetTranslatedString ("AddEstateText"));
            vars.Add ("EditEstateText", translator.GetTranslatedString ("EditText"));
            vars.Add ("EstateListText", translator.GetTranslatedString ("EstatesText"));
            vars.Add ("EstateText", translator.GetTranslatedString ("EstateText"));
            vars.Add ("PublicAccessText", translator.GetTranslatedString ("PublicAccessText"));
            vars.Add ("AllowVoiceText", translator.GetTranslatedString ("AllowVoiceText"));
            vars.Add ("TaxFreeText", translator.GetTranslatedString ("TaxFreeText"));
            vars.Add ("AllowDirectTeleportText", translator.GetTranslatedString ("AllowDirectTeleportText"));
            vars.Add ("RegionsText", translator.GetTranslatedString ("MenuRegionsTitle"));
            return vars;
        }
コード例 #21
0
        /// <summary>
        ///     Callback for a viewerstats cap
        /// </summary>
        /// <param name="request"></param>
        /// <param name="path"></param>
        /// <param name="httpRequest"></param>
        /// <param name="httpResponse"></param>
        /// <returns></returns>
        public byte[] ViewerStatsReport (string path, Stream request, OSHttpRequest httpRequest,
                                        OSHttpResponse httpResponse)
        {
            IUserStatsDataConnector dataConnector =
                Framework.Utilities.DataManager.RequestPlugin<IUserStatsDataConnector> ();

            OpenMetaverse.Messages.Linden.ViewerStatsMessage vsm =
                new OpenMetaverse.Messages.Linden.ViewerStatsMessage ();
            vsm.Deserialize ((OSDMap)OSDParser.DeserializeLLSDXml (HttpServerHandlerHelpers.ReadFully (request)));
            dataConnector.UpdateUserStats (vsm, m_service.AgentID, m_service.Region.RegionID);

            return MainServer.BlankResponse;
        }
コード例 #22
0
ファイル: logout.cs プロジェクト: BogusCurry/WhiteCore-Dev
        public Dictionary<string, object> Fill(WebInterface webInterface, string filename, OSHttpRequest httpRequest,
            OSHttpResponse httpResponse, Dictionary<string, object> requestParameters,
            ITranslator translator, out string response)
        {
            response = null;
            var vars = new Dictionary<string, object>();

            vars.Add("Logout", translator.GetTranslatedString("Logout"));
            vars.Add("LoggedOutSuccessfullyText", translator.GetTranslatedString("LoggedOutSuccessfullyText"));

            Authenticator.RemoveAuthentication(httpRequest);

            return vars;
        }
コード例 #23
0
        public Dictionary<string, object> Fill(WebInterface webInterface, string filename, OSHttpRequest httpRequest,
            OSHttpResponse httpResponse, Dictionary<string, object> requestParameters,
            ITranslator translator, out string response)
        {
            response = null;
            var vars = new Dictionary<string, object>();

            string error = "";
            if (requestParameters.ContainsKey("username") && requestParameters.ContainsKey("password"))
            {
                string username = requestParameters["username"].ToString();
                string password = requestParameters["password"].ToString();

                ILoginService loginService = webInterface.Registry.RequestModuleInterface<ILoginService>();
                if (loginService.VerifyClient(UUID.Zero, username, "UserAccount", password))
                {
                    UUID sessionID = UUID.Random();
                    UserAccount account =
                        webInterface.Registry.RequestModuleInterface<IUserAccountService>()
                                    .GetUserAccount(null, username);
                    Authenticator.AddAuthentication(sessionID, account);
                    if (account.UserLevel > 0)
                        Authenticator.AddAdminAuthentication(sessionID, account);
                    httpResponse.AddCookie(new System.Web.HttpCookie("SessionID", sessionID.ToString())
                                               {
                                                   Expires =
                                                       DateTime
                                                       .MinValue,
                                                   Path = ""
                                               });

                    response = "<h3>Successfully logged in, redirecting to main page</h3>" +
                               "<script language=\"javascript\">" +
                               "setTimeout(function() {window.location.href = \"index.html\";}, 0);" +
                               "</script>";
                }
                else
                    response = "<h3>Failed to verify user name and password</h3>";
                return null;
            }

            vars.Add("ErrorMessage", error);
            vars.Add("Login", translator.GetTranslatedString("Login"));
            vars.Add("UserNameText", translator.GetTranslatedString("UserName"));
            vars.Add("PasswordText", translator.GetTranslatedString("Password"));
            vars.Add("ForgotPassword", translator.GetTranslatedString("ForgotPassword"));
            vars.Add("Submit", translator.GetTranslatedString("Submit"));

            return vars;
        }
コード例 #24
0
        public Dictionary<string, object> Fill(WebInterface webInterface, string filename, OSHttpRequest httpRequest,
            OSHttpResponse httpResponse, Dictionary<string, object> requestParameters,
            ITranslator translator, out string response)
        {
            response = null;
            var vars = new Dictionary<string, object>();

            IAgentInfoConnector recentUsers = Framework.Utilities.DataManager.RequestPlugin<IAgentInfoConnector>();
            IGenericsConnector connector = Framework.Utilities.DataManager.RequestPlugin<IGenericsConnector>();
            GridWelcomeScreen welcomeInfo = connector.GetGeneric<GridWelcomeScreen>(UUID.Zero, "GridWelcomeScreen",
                                                                                    "GridWelcomeScreen");

            if (welcomeInfo == null)
                welcomeInfo = GridWelcomeScreen.Default;

            IConfigSource config = webInterface.Registry.RequestModuleInterface<ISimulationBase>().ConfigSource;
            vars.Add("GridStatus", translator.GetTranslatedString("GridStatus"));
            vars.Add("GridOnline",
                     welcomeInfo.GridStatus
                         ? translator.GetTranslatedString("Online")
                         : translator.GetTranslatedString("Offline"));
            vars.Add("TotalUserCount", translator.GetTranslatedString("TotalUserCount"));
            vars.Add("UserCount", webInterface.Registry.RequestModuleInterface<IUserAccountService>().
                                               NumberOfUserAccounts(null, "").ToString());
            vars.Add("TotalRegionCount", translator.GetTranslatedString("TotalRegionCount"));
            vars.Add("RegionCount", Framework.Utilities.DataManager.RequestPlugin<IRegionData>().
                                                Count((RegionFlags) 0, (RegionFlags) 0).ToString());
            vars.Add("UniqueVisitors", translator.GetTranslatedString("UniqueVisitors"));
            vars.Add("UniqueVisitorCount", recentUsers.RecentlyOnline((uint) TimeSpan.FromDays(30).TotalSeconds, false).ToString());
            vars.Add("OnlineNow", translator.GetTranslatedString("OnlineNow"));
            vars.Add ("OnlineNowCount", recentUsers.RecentlyOnline (5 * 60, true).ToString ());
            vars.Add("RecentlyOnline", translator.GetTranslatedString("RecentlyOnline"));
            vars.Add("RecentlyOnlineCount", recentUsers.RecentlyOnline(10*60, false).ToString());
            vars.Add("HGActiveText", translator.GetTranslatedString("HyperGrid"));
            string disabled = translator.GetTranslatedString("Disabled"),
                   enabled = translator.GetTranslatedString("Enabled");
            vars.Add("HGActive", disabled + "(TODO: FIX)");
            vars.Add("VoiceActiveLabel", translator.GetTranslatedString("Voice"));
            vars.Add("VoiceActive",
                     config.Configs["Voice"] != null &&
                     config.Configs["Voice"].GetString("Module", "GenericVoice") != "GenericVoice"
                         ? enabled
                         : disabled);
            vars.Add("CurrencyActiveLabel", translator.GetTranslatedString("Currency"));
            vars.Add("CurrencyActive",
                     webInterface.Registry.RequestModuleInterface<IMoneyModule>() != null ? enabled : disabled);

            return vars;
        }
コード例 #25
0
        byte[] ProductInfoRequestCAP (string path, Stream request, OSHttpRequest httpRequest, OSHttpResponse httpResponse)
        {
            //OSDMap data = m_service.GetCAPS ();
            var data = new OSDArray();

            var mf = new OSDMap ();
            mf ["name"] = "mainland_full";
            mf ["description"] = "Mainland / Full Region";
            mf ["sku"] = "001";
            data.Add(mf);
            
            var mh = new OSDMap ();
            mh ["name"] = "mainland_homestead";
            mh ["description"] = "Mainland / Homestead";
            mh ["sku"] = "011";
            data.Add(mh);

            var mo = new OSDMap ();
            mo ["name"] = "mainland_openspace";
            mo ["description"] = "Mainland / Openspace";
            mo ["sku"] = "021";
            data.Add(mo);

            var ef = new OSDMap ();
            ef ["name"] = "estate_full";
            ef ["description"] = "Estate / Full Region";
            ef ["sku"] = "002";
            data.Add(ef);

            var eh = new OSDMap ();
            eh ["name"] = "estate_homestead";
            eh ["description"] = "Estate / Homestead";
            eh ["sku"] = "012";
            data.Add(eh);

            var eo = new OSDMap ();
            eo ["name"] = "estate_openspace";
            eo ["description"] = "Estate / Openspace";
            eo ["sku"] = "022";
            data.Add(eo);

            var wh = new OSDMap ();
            wh ["name"] = "whitecore_homes";
            wh ["description"] = "WhiteCore Homes / Full Region";
            wh ["sku"] = "101";
            data.Add(wh);

            return OSDParser.SerializeLLSDXmlBytes (data);
        }
コード例 #26
0
		public Dictionary<string, object> Fill(WebInterface webInterface, string filename, OSHttpRequest httpRequest,
			OSHttpResponse httpResponse, Dictionary<string, object> requestParameters,
			ITranslator translator, out string response)
		{
			response = null;
        	
			var vars = new Dictionary<string, object>();
        	
			// This page should show if a user already has a partner and show the ability to cancel the Partnership (with a payment defined in Economy.ini)
			// 
			// If the user doesn't have a partner, allow the user to send an Partnership invite to a person (internally send a message inworld to the person)
			//
			
			return vars;
		}
コード例 #27
0
        public Dictionary<string, object> Fill(WebInterface webInterface, string filename, OSHttpRequest httpRequest,
            OSHttpResponse httpResponse, Dictionary<string, object> requestParameters,
            ITranslator translator, out string response)
        {
            response = null;
            var vars = new Dictionary<string, object>();

            vars.Add("WorldMap", translator.GetTranslatedString("WorldMap"));

            var settings = webInterface.GetWebUISettings();
            vars.Add("GridCenterX", settings.MapCenter.X);
            vars.Add("GridCenterY", settings.MapCenter.Y);

            return vars;
        }
コード例 #28
0
        public Dictionary<string, object> Fill(WebInterface webInterface, string filename, OSHttpRequest request, 
            OSHttpResponse httpResponse, Dictionary<string, object> requestParameters, ITranslator translation, out string response)
        {
            response = null;
            var vars = new Dictionary<string, object>();

            // Check if we're looking at the standard page or the submitted one
            if (requestParameters.ContainsKey("Submit"))
            {
            }
            else
            {
            }
            return vars;
        }
コード例 #29
0
        public override byte[] Handle(string path, Stream request,
                OSHttpRequest httpRequest, OSHttpResponse httpResponse)
        {
            httpResponse.ContentType = "image/jpeg";

            //Remove the /worldview/
            string uri = httpRequest.RawUrl.Remove(0, 11);
            byte[] jpeg = FindCachedWorldViewImage(uri);
            if (jpeg.Length != 0)
            {
                return jpeg;
            }

            // image not in the cache...
            try
            {
                lock (m_RequestLock)
                {
                    var requestData = new Dictionary<string, object>();
                    foreach (string name in httpRequest.QueryString)
                        requestData[name] = httpRequest.QueryString[name];

                    if (requestData.Count > 1)
                    {
                        // we have specific parameters
                        var worldviewImage = SendWorldView(requestData);
                        if (worldviewImage != null)
                            SaveCachedImage(uri,worldviewImage);

                        return worldviewImage;
                    }

                    // create and return a default image
                    var stdWworldview = GetWorldView();
                    if (stdWworldview != null)
                        SaveCachedImage(uri,stdWworldview);

                    return stdWworldview;

                }
            }
            catch (Exception e)
            {
                MainConsole.Instance.Debug("[World view]: Exception: " + e);
            }

            return new byte [0];
        }
コード例 #30
0
        public byte[] ChatSessionRequest(string path, Stream request, OSHttpRequest httpRequest,
            OSHttpResponse httpResponse)
        {
            try
            {
                OSDMap rm = (OSDMap)OSDParser.DeserializeLLSDXml(HttpServerHandlerHelpers.ReadFully(request));

                return Encoding.UTF8.GetBytes(m_imService.ChatSessionRequest(m_service, rm));
            }
            catch (Exception e)
            {
                MainConsole.Instance.Error("[IMCAPS]: " + e.ToString());
            }

            return null;
        }