1. These plugins are out of date or are no longer supported by their developers. If you wish to update a plugin, you must create a new topic (in the event that you aren't the original developer) in the submissions forum. If you wrote it, you can PM an admin or report the post to move it back, as long as you include updated information with the request/report.
  2. Before discussing a bug, please verify you are using the latest TShock release. Do not post bug reports in the shoutbox, IRC, or the forums - post bug reports on the Github issues page (located at the top of this forum). TShock developers will not check for bugs in the shoutbox, IRC, and may not notice reports in the forums.

[1.12] PrefixPunisher

Discussion in 'Unsupported / Outdated Plugins' started by Snirk Immington, Dec 16, 2012.

  1. Snirk Immington Plugin Developer

    PrefixPunisher - stop hackers in their tracks!
    API: 1.12 | TShock 4.0/4.0.5 | Plugin version 2.2

    • This does exactly what the name says - it kicks/bans/disables/kills people who have items with prefixes they shouldn't.
    • This works on both items that should never have prefixes (armor, Light Discs, ammo, etc) and items that have the wrong type of prefixes (Legendary Hamaxe, Unreal Laser Rifle, etc).
    • Fully configurable! Change the type of punishment (kick, ban, disable, or kill) and the various things to be punished for. Also, add specific item/prefix combinations to pass through the filter. There is also a database which explains itself, if you dare to open the file.
    • Admins can avoid being targeted - if you give them the "canuseillegalprefix" permission.
    • Checks all players when they join the server and every five seconds.
    • There's more explanation on the GitHub readme file: scroll down on this page to see it!
    Command:/reloadpp - reloads the config file and database - maintenance permission.

    Download: Download from DropBox at https://dl.dropbox.com/u/16041828/PrefixPunisher.dll

    Source Code: Available from GitHub: https://github.com/SnirkImmington/PrefixPunisher

    • v2.2 - Another database fix
    • v2.1 - database fix
    • v2.0 - bugs eradicated, messages clarified, database created
    • v1.0.1 - bugs fixed.
    • V1.0 - released to the world.
    Future Additions:
    • Illegal Prefix Regions
    • Override /item command to help prevent illegal prefixes from being given.
  2. DarkOS tShock supporter and programming hack.

    way to go snirk-

    ill give it a try. nice work.
  3. Wolfe Active Member

    I can't find the config file. When I start my server, I think it tries to generate it but fails.

    PluginMain: ERROR: System.NullReferenceException: Object reference not set to an instance of an object.
    at PrefixPunisher.PluginMain.OnPost()
  4. Snirk Immington Plugin Developer

    Fixed. Redownload from the link.
  5. Wolfe Active Member

  6. DankBud Administrator

    Wow, nice.
  7. Wolfe Active Member

    My problem or yours?
  8. Snirk Immington Plugin Developer

    Are you running 4.0? I'll look into it.

    EDIT: So I've been looking through TShock's ban code, and all of the ban code is depreciated somewhere.
  9. Wolfe Active Member

    Actually, I'm running pre release. Should I upgrade? It doesn't seem to happen to any other 'newer' plugins. I downgraded from 4.0 final a long time ago because of a lot of malfunctioning plugins.
  10. DankBud Administrator

    12/16/2012 1:58:56 PM
    System.NullReferenceException: Object reference not set to an instance of an object
      at PrefixPunisher.PluginMain.<OnUpdate>b__0 (TShockAPI.TSPlayer p) [0x00000] in <filename unknown>:0
      at System.Linq.Enumerable+<CreateWhereIterator>c__Iterator2A`1[TShockAPI.TSPlayer].MoveNext () [0x00000] in <filename unknown>:0
      at PrefixPunisher.PluginMain.OnUpdate () [0x00000] in <filename unknown>:0
      at (wrapper delegate-invoke) <Module>:invoke_void__this__ ()
      at (wrapper delegate-invoke) <Module>:invoke_void__this__ ()
      at (wrapper delegate-invoke) <Module>:invoke_void__this__ ()
      at (wrapper delegate-invoke) <Module>:invoke_void__this__ ()
      at (wrapper delegate-invoke) <Module>:invoke_void__this__ ()
      at (wrapper delegate-invoke) <Module>:invoke_void__this__ ()
      at (wrapper delegate-invoke) <Module>:invoke_void__this__ ()
      at Hooks.GameHooks.OnUpdate (Boolean pre) [0x00000] in <filename unknown>:0
      at Terraria.Main.DedServ () [0x00000] in <filename unknown>:0
      at Terraria.ProgramServer.Main (System.String[] args) [0x00000] in <filename unknown>:0 
  11. Snirk Immington Plugin Developer

    I think that the problem lies in my handling of the "ban" option.
    I suggest switching to "kick" option. In the mean time, I will be looking into whether to use TShock.Utils.Ban or TShock.Bans.AddBan - or whether either of them work at all, I notice the /ban addip command, for example, no longer kicks the player, DankBud, it looks like that may have been the problem there.
    I'll have it fixed soon.
  12. Wolfe Active Member

    I don't use the ban option, I use the kick option. (tested just now to make sure)
  13. Snirk Immington Plugin Developer

    All bugs have been fixed. Updated the GitHub and download.
  14. DarkOS tShock supporter and programming hack.

    tested. seems to work well. thanks snirk!

    btw- i saw you jump on yesterday for a minute. if you want to ever use my server as a test bed within reason just let me know - i use to have a developer group that had most world permissions that i could recreate for you.
  15. Snirk Immington Plugin Developer

    Sounds good, I've already got this fancy little wooden house :p
  16. DarkOS tShock supporter and programming hack.

    haha nice :)
  17. DarkOS tShock supporter and programming hack.

    getting reports that hurtful adamantite chainsaw and Superior Adamantite Glaive are illegal?

    are they lying or is this a bug?
  18. DarkOS tShock supporter and programming hack.

    also- any way to reload config?
  19. Snirk Immington Plugin Developer

    Checking the wiki... hurtful, superior are universal so Terraria allows them on chainsaws/glaives. They are recorded in the plugin as such. The tools are melee tools, and have a usestyle of 5, so they are checked to make sure they have only this type of prefix.
    Unless there is something wrong which I am not aware of, they should be lying.

    Will add config reload command to next version :p
  20. Snirk Immington Plugin Developer

    Version 1.0.2 is live - available on GitHub and through the download link - now has /reloadpp command (permission: maintenance).

Share This Page