protected void btnApply_Click(object sender, EventArgs e)
        {
            if (InstanceManager.Game.Users.UserExists(txtUsername.Text))
            {
                UserInfo user = InstanceManager.Game.Users.GetUser(txtUsername.Text);

                int newCreds;

                if (int.TryParse(txtCredits.Text, out newCreds))
                {
                    user.iCredits = newCreds;
                    InstanceManager.Game.Users.UpdateUser(user);
                    InstanceManager.Game.Moderation.LogCommand(mUser.userId, user.userId, "changecredits", "New Credits: " + user.iCredits.ToString(), "Housekeeping");
                    ServerCommunicator servComm = new ServerCommunicator();
                    servComm.SendModCommandToServer("updatecredits", mUser.userId, user.userId, "None");
                    lblInfo.Text = "Credits updated!";
                }
                else
                {
                    lblInfo.Text = "Credits must be a number!";
                }
            }
            else
            {
                lblInfo.Text = "Invalid user!";
            }
        }
예제 #2
0
        protected void btnApply_Click(object sender, EventArgs e)
        {
            if (InstanceManager.Game.Users.UserExists(txtUsername.Text))
            {
                UserInfo user = InstanceManager.Game.Users.GetUser(txtUsername.Text);

                int newCreds;

                if (int.TryParse(txtCredits.Text, out newCreds))
                {
                    user.iCredits = newCreds;
                    InstanceManager.Game.Users.UpdateUser(user);
                    InstanceManager.Game.Moderation.LogCommand(mUser.userId, user.userId, "changecredits", "New Credits: " + user.iCredits.ToString(), "Housekeeping");
                    ServerCommunicator servComm = new ServerCommunicator();
                    servComm.SendModCommandToServer("updatecredits", mUser.userId, user.userId, "None");
                    lblInfo.Text = "Credits updated!";
                }
                else
                {
                    lblInfo.Text = "Credits must be a number!";
                }
            }
            else
            {
                lblInfo.Text = "Invalid user!";
            }
        }
예제 #3
0
        protected void btnSend_Click(object sender, EventArgs e)
        {
            ServerCommunicator servComm = new ServerCommunicator();

            string message = ThorServer.Utilities.SpecialFiltering.FilterChars("1,2,9", txtMessage.Text);

            servComm.SendModCommandToServer("remoteservcast", mUser.userId, 0, message);

            lblInfo.Text = "Servcast was fired!";
        }
        protected void btnAction_Click(object sender, EventArgs e)
        {
            ReferralManager refManager = new ReferralManager();

            if (InstanceManager.Game.Users.UserExists(txtUsername.Text))
            {
                UserInfo user = InstanceManager.Game.Users.GetUser(txtUsername.Text);

                if (InstanceManager.Game.Users.UserExists(txtReferred.Text))
                {
                    UserInfo referred = InstanceManager.Game.Users.GetUser(txtReferred.Text);

                    if (referred.LastIP != user.LastIP)
                    {
                        if (referred.sEmail != user.sEmail)
                        {
                            if (!refManager.HasBeenReferred(referred.userId))
                            {
                                user.iCredits     += int.Parse(UserSettings.ReferralReward);
                                referred.iCredits += int.Parse(UserSettings.ReferredReward);
                                InstanceManager.Game.Users.UpdateUser(user);
                                InstanceManager.Game.Users.UpdateUser(referred);
                                refManager.AddReferral(user.userId, referred.userId);
                                InstanceManager.Game.Moderation.LogCommand(mUser.userId, user.userId, "referral", "Referrer: " + txtUsername.Text + "; Referred: " + txtReferred.Text, "Housekeeping");
                                ServerCommunicator servComm = new ServerCommunicator();
                                servComm.SendModCommandToServer("updatecredits", mUser.userId, user.userId, "None");
                                servComm.SendModCommandToServer("updatecredits", mUser.userId, referred.userId, "None");
                                lblInfo.Text = "Reward Granted.";
                            }
                            else
                            {
                                lblInfo.Text = "Whoops. User has been referred before!";
                            }
                        }
                        else
                        {
                            lblInfo.Text = "Whoops. Email Addresses match!";
                        }
                    }
                    else
                    {
                        lblInfo.Text = "Whoops. IP Addresses match!";
                    }
                }
                else
                {
                    lblInfo.Text = "Referred user does not exist!";
                }
            }
            else
            {
                lblInfo.Text = "Invalid user!";
            }
        }
        protected void btnSend_Click(object sender, EventArgs e)
        {

            ServerCommunicator servComm = new ServerCommunicator();

            string message = ThorServer.Utilities.SpecialFiltering.FilterChars("1,2,9", txtMessage.Text);

            servComm.SendModCommandToServer("remoteservcast", mUser.userId, 0, message);

            lblInfo.Text = "Servcast was fired!";

        }
예제 #6
0
        protected void btnAction_Click(object sender, EventArgs e)
        {
            ReferralManager refManager = new ReferralManager();
            if (InstanceManager.Game.Users.UserExists(txtUsername.Text))
            {
                UserInfo user = InstanceManager.Game.Users.GetUser(txtUsername.Text);

                if (InstanceManager.Game.Users.UserExists(txtReferred.Text))
                {
                    UserInfo referred = InstanceManager.Game.Users.GetUser(txtReferred.Text);

                    if (referred.LastIP != user.LastIP)
                    {
                        if (referred.sEmail != user.sEmail)
                        {
                            if (!refManager.HasBeenReferred(referred.userId))
                            {
                                user.iCredits += int.Parse(UserSettings.ReferralReward);
                                referred.iCredits += int.Parse(UserSettings.ReferredReward);
                                InstanceManager.Game.Users.UpdateUser(user);
                                InstanceManager.Game.Users.UpdateUser(referred);
                                refManager.AddReferral(user.userId, referred.userId);
                                InstanceManager.Game.Moderation.LogCommand(mUser.userId, user.userId, "referral", "Referrer: " + txtUsername.Text + "; Referred: " + txtReferred.Text, "Housekeeping");
                                ServerCommunicator servComm = new ServerCommunicator();
                                servComm.SendModCommandToServer("updatecredits", mUser.userId, user.userId, "None");
                                servComm.SendModCommandToServer("updatecredits", mUser.userId, referred.userId, "None");
                                lblInfo.Text = "Reward Granted.";
                            }
                            else
                            {
                                lblInfo.Text = "Whoops. User has been referred before!";
                            }
                        }
                        else
                        {
                            lblInfo.Text = "Whoops. Email Addresses match!";
                        }
                    }
                    else
                    {
                        lblInfo.Text = "Whoops. IP Addresses match!";
                    }
                }
                else
                {
                    lblInfo.Text = "Referred user does not exist!";
                }
            }
            else
            {
                lblInfo.Text = "Invalid user!";
            }
        }
예제 #7
0
        protected void btnApply_Click(object sender, EventArgs e)
        {
            if (InstanceManager.Game.Users.UserExists(txtUsername.Text))
            {
                UserInfo user = InstanceManager.Game.Users.GetUser(txtUsername.Text);
                int newId = 0;

                if (!chkIsGift.Checked)
                {

                    if (InstanceManager.Game.Catalogue.BuyItem("0", ddPurchaseCode.SelectedValue, "", ref user, true, ref newId))
                    {

                        ServerCommunicator servComm = new ServerCommunicator();
                        servComm.SendModCommandToServer("updatehand", mUser.userId, user.userId, "None");

                        lblInfo.Text = "Item Spawned!";
                    }
                    else
                    {
                        lblInfo.Text = "Failed to spawn item!";
                    }
                }
                else
                {
                    int furniId = InstanceManager.Game.Furni.CreateNewFurni(InstanceManager.Game.Furni.GetRandomPresentDefinition(), user.userId);
                    GiftInfo gift = new GiftInfo();
                    gift.GiftId = furniId;
                    gift.Payload = "";
                    gift.PurchaseCode = ddPurchaseCode.SelectedValue;
                    InstanceManager.Game.Furni.AddGift(gift);
                    InstanceManager.Game.Furni.SetStuffDataFloorItem(furniId, "!" + SpecialFiltering.FilterChars("2,9,10,13,47", txtMessage.Text));

                    ServerCommunicator servComm = new ServerCommunicator();
                    servComm.SendModCommandToServer("updatehand", mUser.userId, user.userId, "None");

                    lblInfo.Text = "Gift spawned!";
                }
            }
            else
            {
                lblInfo.Text = "Invalid user!";
            }
        }
예제 #8
0
        protected void btnApply_Click(object sender, EventArgs e)
        {
            if (InstanceManager.Game.Users.UserExists(txtUsername.Text))
            {
                UserInfo user  = InstanceManager.Game.Users.GetUser(txtUsername.Text);
                int      newId = 0;

                if (!chkIsGift.Checked)
                {
                    if (InstanceManager.Game.Catalogue.BuyItem("0", ddPurchaseCode.SelectedValue, "", ref user, true, ref newId))
                    {
                        ServerCommunicator servComm = new ServerCommunicator();
                        servComm.SendModCommandToServer("updatehand", mUser.userId, user.userId, "None");

                        lblInfo.Text = "Item Spawned!";
                    }
                    else
                    {
                        lblInfo.Text = "Failed to spawn item!";
                    }
                }
                else
                {
                    int      furniId = InstanceManager.Game.Furni.CreateNewFurni(InstanceManager.Game.Furni.GetRandomPresentDefinition(), user.userId);
                    GiftInfo gift    = new GiftInfo();
                    gift.GiftId       = furniId;
                    gift.Payload      = "";
                    gift.PurchaseCode = ddPurchaseCode.SelectedValue;
                    InstanceManager.Game.Furni.AddGift(gift);
                    InstanceManager.Game.Furni.SetStuffDataFloorItem(furniId, "!" + SpecialFiltering.FilterChars("2,9,10,13,47", txtMessage.Text));

                    ServerCommunicator servComm = new ServerCommunicator();
                    servComm.SendModCommandToServer("updatehand", mUser.userId, user.userId, "None");

                    lblInfo.Text = "Gift spawned!";
                }
            }
            else
            {
                lblInfo.Text = "Invalid user!";
            }
        }
예제 #9
0
        protected void btnSend_Click(object sender, EventArgs e)
        {
            if (InstanceManager.Game.Users.UserExists(txtUsername.Text))
            {
                UserInfo user = InstanceManager.Game.Users.GetUser(txtUsername.Text);

                ServerCommunicator servComm = new ServerCommunicator();

                string message = ThorServer.Utilities.SpecialFiltering.FilterChars("1,2,9", txtMessage.Text);

                InstanceManager.Game.Moderation.ModerationData.BanUser(user.userId, mUser.userId, message, int.Parse(ddBanLength.SelectedValue), chkBanIp.Checked);
                InstanceManager.Game.Moderation.LogCommand(mUser.userId, user.userId, "ban", message, txtExtra.Text);
                servComm.SendModCommandToServer("remoteban", mUser.userId, user.userId, message);

                lblInfo.Text = "Done!";
            }
            else
            {
                lblInfo.Text = "Invalid user!";
            }
        }
예제 #10
0
        protected void btnSend_Click(object sender, EventArgs e)
        {
            if (InstanceManager.Game.Users.UserExists(txtUsername.Text))
            {
                UserInfo user = InstanceManager.Game.Users.GetUser(txtUsername.Text);

                ServerCommunicator servComm = new ServerCommunicator();

                string message = ThorServer.Utilities.SpecialFiltering.FilterChars("1,2,9", txtMessage.Text);

                InstanceManager.Game.Moderation.ModerationData.BanUser(user.userId, mUser.userId, message, int.Parse(ddBanLength.SelectedValue), chkBanIp.Checked);
                InstanceManager.Game.Moderation.LogCommand(mUser.userId, user.userId, "ban", message, txtExtra.Text);
                servComm.SendModCommandToServer("remoteban", mUser.userId, user.userId, message);

                lblInfo.Text = "Done!";
            }
            else
            {
                lblInfo.Text = "Invalid user!";
            }
        }
예제 #11
0
        protected void btnSend_Click(object sender, EventArgs e)
        {
            if (InstanceManager.Game.Users.UserExists(txtUsername.Text))
            {
                UserInfo user = InstanceManager.Game.Users.GetUser(txtUsername.Text);

                ServerCommunicator servComm = new ServerCommunicator();

                string message = ThorServer.Utilities.SpecialFiltering.FilterChars("1,2,9", txtMessage.Text);

                if (servComm.SendModCommandToServer("remotekick", mUser.userId, user.userId, message))
                {
                    lblInfo.Text = "Done!";
                }
                else
                {
                    lblInfo.Text = "Failed! Are you sure the user is logged on?";
                }
            }
            else
            {
                lblInfo.Text = "Invalid user!";
            }
        }
예제 #12
0
        protected void btnSend_Click(object sender, EventArgs e)
        {
            if (InstanceManager.Game.Users.UserExists(txtUsername.Text))
            {
                UserInfo user = InstanceManager.Game.Users.GetUser(txtUsername.Text);

                ServerCommunicator servComm = new ServerCommunicator();

                string message = ThorServer.Utilities.SpecialFiltering.FilterChars("1,2,9", txtMessage.Text);

                if (servComm.SendModCommandToServer("remotekick", mUser.userId, user.userId, message))
                {
                    lblInfo.Text = "Done!";
                }
                else
                {
                    lblInfo.Text = "Failed! Are you sure the user is logged on?";
                }
            }
            else
            {
                lblInfo.Text = "Invalid user!";
            }
        }