1. These forums are still being retired! Please use GitHub discussions or Discord. You cannot create new threads or new accounts now. If you need to contact some user of the forums, you should do it sooner, rather than later. This notice was last updated on May 30th, 2021.

InvSee

Discussion in 'Unsupported / Outdated Plugins' started by Enerdy, Oct 25, 2014.

  1. Enerdy

    Enerdy Satellite Admin
    TShock Mod Plugin Developer Zero Day Plugin Author

    Joined:
    Nov 14, 2012
    Messages:
    506
    InvSee
    Utilizes SSC technology to copy a player's inventory.

    ApiVersion: 1.16
    Terraria Version: 1.2.4.1
    Plugin Version: 1.0.1.0214

    Author: Enerdy

    Disclaimer: This plugin is currently hosted under Plugin Submissions, which means it may contain bugs! If you're willing to go for a bug hunt, go ahead and report back everything you might find!

    Since the similar feature currently present in Essentials by Scavenger seems broken, and EssentialsPlus did not adopt this (I don't see how could this be "Essential" for a server), I decided to use my spare time in reworking this from the core. TShock now includes its own methods for managing this copypasta, which makes it fairly easy to put this to work.

    You can use this with Essentials: it should replace the command with this one.

    Features:
    • An easy, and interactive way of reading player inventories by having your own replaced by theirs temporarily!
    • Creates a backup of your own inventory, and restores it automatically on leave or through the use of a command. I wouldn't want you to lose your inventory in the proccess of looking for hackers.
    • It is now safe to copy multiple inventories in succession: the backup will always contain your original inventory.
    Documentation:
    Commands and permissions can be found here. I didn't think there was a rule forcing us to have everything in the thread; correct me if I'm wrong. I was going to have it there anyway, and managing one ReadMe is easier than managing two different documents.

    Changelog:
    Version numbering follows rules included here.

    1.0.1.0214
    • Fixed plugin order (added before, undocumented until now);
    • Added support for invseeing users (offline players).
    1.0.0.1025
    • Initial commit.
    A commit-based change log can be found here.

    Links:
     
    • Like Like x 4
  2. Enerdy

    Enerdy Satellite Admin
    TShock Mod Plugin Developer Zero Day Plugin Author

    Joined:
    Nov 14, 2012
    Messages:
    506
    If requested, I will investigate possible solutions to the "crash corruption". This might force me to either have a DB or multiple text files with string representations of the inventories in order to permit restoring through different sessions. As of current, I don't have a better solution for this.
     
  3. Kojiro_S

    Kojiro_S Level 11

    Joined:
    Feb 16, 2014
    Messages:
    659
    Neat. A question pertaining both this plugin and its original incarnation: Is there a way to modify an inventory to remove hacked crap from it using this plugin? Modifying the database is a royal pain since you only see ids, ids and ids (well, and quantities).
     
    • Like Like x 1
  4. Enerdy

    Enerdy Satellite Admin
    TShock Mod Plugin Developer Zero Day Plugin Author

    Joined:
    Nov 14, 2012
    Messages:
    506
    This is something I plan on adding, some sort of /copyto command, which would copy your current inventory and "paste" it in someone else. This way, you could invsee a player, remove crap, and then /copyto into them again.
     
    • Like Like x 3
  5. OFF

    OFF
    Account Probation Banned Rating Banned

    Joined:
    Nov 28, 2013
    Messages:
    208
    If only live editing..
     
  6. Wight

    Wight Administrator
    TShock Admin TShock Mod Plugin Developer Zero Day Plugin Author

    Joined:
    May 20, 2012
    Messages:
    1,598
    Could try
    Code:
    AppDomain.CurrentDomain.UnhandledException += ExceptionHandler;
     
    void ExceptionHandler(object sender, UnhandledExceptionEventArgs e)
    {
        if (e.IsTerminating)
        {
             //restore stuff
        }
    }
    
     
    • Like Like x 2
  7. Enerdy

    Enerdy Satellite Admin
    TShock Mod Plugin Developer Zero Day Plugin Author

    Joined:
    Nov 14, 2012
    Messages:
    506
    What I'm looking for is a way of telling that a player has "crashed" or "lost connection", as apparenly ServerLeave doesn't trigger when that happens, and only when it receives the leave packet. I don't know what happens in these cases, but does it throw an exception?

    Could I possibly perform tests on TSPlayer.ConnectionAlive?
     
  8. Olink

    Olink Admin note: Actually a really nice person now

    Joined:
    Jul 21, 2011
    Messages:
    1,397
    Uh..... OnLeave should fire anytime someone disconnects at which if you hook the event before tshock you can restore their inventory. Ifthe server crashes tho, dunno.
     
  9. Kojiro_S

    Kojiro_S Level 11

    Joined:
    Feb 16, 2014
    Messages:
    659
    Another question: Is this plugin able to copy offline users' inventories? Not really an important thing, but sometimes you need to check someone who quickly uses mad ninja disconnection skills whenever a staff logs in.

    EDIT: No, it isn't. Humbly requesting this feature for when you have the time.
     
  10. Enerdy

    Enerdy Satellite Admin
    TShock Mod Plugin Developer Zero Day Plugin Author

    Joined:
    Nov 14, 2012
    Messages:
    506
    Made a commit to correct the plugin order, so that this now replaces the old Essentials' broken InvSee instead of running alongside it... if you're still running the old Essentials for whatever reason.
     
    • Like Like x 1
  11. hiarni

    Plugin Developer

    Joined:
    Mar 14, 2014
    Messages:
    127
    It would be really nice to do that... also for other purposes!
    necessarily! immediate! :rolleyes:
     
    • Like Like x 1
  12. Enerdy

    Enerdy Satellite Admin
    TShock Mod Plugin Developer Zero Day Plugin Author

    Joined:
    Nov 14, 2012
    Messages:
    506
    Due to popular demand, I just pushed a new version which allows copying user data instead of player data. This will allow copying offline player's inventories as long as the user has the following permission: invsee.user
     
    • Like Like x 2
  13. Kojiro_S

    Kojiro_S Level 11

    Joined:
    Feb 16, 2014
    Messages:
    659
    Yeah, like template characters for temporarily "becoming" them. I've tought about a nice game with such a thing in mind. :D
     
    • Like Like x 1
  14. Enerdy

    Enerdy Satellite Admin
    TShock Mod Plugin Developer Zero Day Plugin Author

    Joined:
    Nov 14, 2012
    Messages:
    506
    This is a really cool idea and I'm glad that it can be done now!
     
    • Like Like x 2