[INACTIVE][SEC] AnjoSecurity v1.6c - Offline-Mode User Registration [440-531+]

Discussion in 'Inactive/Unsupported Plugins' started by AnjoCaido, Feb 15, 2011.

  1. Offline


    AnjoSecurity - Offline-Mode User Registration System
    Version: v1.6c

    This version it's just a minor update to make it work with newer CB and GM. When GM gets it's final version I'll start working on future plans for this.


    This plugin uses GroupManager plugin(optional, but recommended if you want to block commands):
    With this you can block all commands of plugins that uses Permissions plugin.

    This plugin is to help people prevent griefing and abusing while your server is in offline-mode. When mineceraft server is down you have no choice than setting up offline-mode. When this option is enabled anyone can connect within your server with their desired username, it brings up the problem that someone can connect with administrator name and abuse with all his loot and commands. This plugin will set up user registration with a custom password for your server, and only the person with that password will be able to use that username.

    Did I say it is open-source? You can get it on GitHub and modify as you want.

    • Prevents registered users to do anything while not logged in.
    • (toggle-able)Prevents non-registered users to do actions(move,destroy,etc).
    • (toggle-able)Prevents non-registered users to do summon commands.
    • (toggle-able)Remove all loot of non-registered users when joining the server(and tp to spawn).
    • (toggle-able)Registration system. You can deactivate registrations anytime.
    • Every user can remove their registration, so they can register with other password.
    • Users listed on settings.properties, while logged in, can remove any user registration.
    • (configurable) Session time. You can set the session duration, so if a user drops connection a lot, he would not need to /login again.(default 30 minutes)
    • Interacts with GroupManager permission plugin(the one replacing Nijikokun's Permissions plugin, yet fully compatible) to prevent running registered commands.
    • ALLOW List. You can allow certain users to register, even if registration is deactivated.
    Commands (all of them speech for themselves):
    • /register <password> - it registers with the given password
    • /login <password> - it tries to login with the given password
    • /reset <password> - if the password is correct, remove registration
    • /adminreset <username> - remove the registration of the given username
    • /toggleregistration - (yes it is long, in purpose) - toggle registration mode ON/OFF.
    • /adminallow <username> - allow user to register even if registration is deactivated.
    Version 1.6c
    • Made it work with newer CB builds.
    • Made it work with GroupManager 1.0 alpha
    Version 1.6b
    • Made it work with newer GM builds.
    Version 1.6
    • Fixed a nasty bug.
    Version 1.5
    • Fixed die-menu-respawn item duping(I think).
    Version 1.4
    • Compatible with the latest bukkit builds(#353)
    Version 1.3b
    • Removed some debugging messages.
    Version 1.3
    • Fixed small bugs. (I think all exceptions reported by now are fixed)
    • Added allow list.
    Version 1.2
    • Fixed small bugs
    • Improved how God Mode works(now it's verly like the God Mode plugin)
    • Added a God Mode timout after login of 5 seconds, to prevent die of falling on the ground.
    • Added a command to toggle registrations on/off.
    Version 1.1
    • Prevent non-logged-in users to lose health(and die).
    Version 1.0
    • First fully working release.
    Future plans:
    • (done!) Create a toggle command that opens and closes registration
    • Store users activities, such as typing wrong passwords and such(to catch hackers)
    Version 1.6c (to use with GroupManager 1.0 or higher):

    Version 1.6b (to use with GroupManager 0.99b or lower):


    Flat-file Authentication importer(import auth db from older plugins):
    It is destinated for the following format(plugins that used MineSecurity format, from hMod):

    Just double click on the jar(or run via terminal with java -jar), select the old flat-file... it will generate a AnjoSecurityDB.db file, which you put on your server folder. If you want to merge the old file with the new database, just put the jar on the same folder of the AnjoSecurityDB.db...

    Everyone with an Off-Line server might like the NameChecker plugin I made, it super simple. It only filters huge names (> 20 chars), short names(<3 chars), and invalid characters in names(only letters, numbers, and underscores allowed).
    It kicks the player and shows him the reason of why his name is invalid. It even has a configurable file for you to put forbidden names to join the server(like Player, or Scruffy_Puppy)
    xcession, FlingeR and methos like this.
  2. Offline


  3. Offline


    Default op commands? You mean ones enabled with entries in ops.txt?
  4. Offline


  5. Offline


    You can't block or enable those via either Permissions or GroupManager. (Or anything else, AFAIK) Since AnjoSecurity can only block commands via GroupManager, having anything in ops.txt and running the server in offline mode would be a Really Bad Idea.
  6. Offline


    Wait what?

    One of my admins is having trouble using the default op commands. Thats all. What are you talking about? o_o

    Wait, nvm, but still, thats not a good answer for me, I already realize that, I get bugs such as, not prompting users to register, reset'ing chars on occasion, those types of things. and also, what I said about in this post and my thread.
  7. Offline


    It would be great if this suported permissions too, as groupmanager isnt updated.
  8. Offline


    this doesn't work :(
  9. Offline


    Well, either a) you don't have entries in ops.txt and therefore nobody can use those commands or b) you do have entries in ops.txt and therefore ANYBODY (assuming you run the server in offline mode, which if you don't why are you using AnjoSecurity?) can get on with the same name as one of your ops and execute ANY commands without having to login.
    In either case, neither AnjoSecurity nor GroupManager - or Permissions even - can be stopping your admin from using the default op commands, assuming their name is in ops.txt.
    As for the other issues, if they are occurring randomly, I'd suspect hardware - especially memory - failure.
    --- merged: Mar 1, 2011 8:44 PM ---
    GM is updated enough to work with the recommended build. What more do you want?
    --- merged: Mar 1, 2011 8:44 PM ---
    This isn't helpful.
    SpAxX likes this.
  10. Offline


    Well, I want it to be compatible to permissions 2.1

    Yes GM works with recomended builds, but plugins devs are slowily stoping suport GM.
  11. Offline


    Whenever I start server [CraftBukkit 439/440] with your plugin I get
    2011-03-01 21:37:34 [SEVERE] null
    java.sql.SQLException: near "?": syntax error
            at org.sqlite.DB.throwex(DB.java:288)
            at org.sqlite.NestedDB.prepare(NestedDB.java:115)
            at org.sqlite.DB.prepare(DB.java:114)
            at org.sqlite.PrepStmt.<init>(PrepStmt.java:37)
            at org.sqlite.Conn.prepareStatement(Conn.java:231)
            at org.sqlite.Conn.prepareStatement(Conn.java:224)
            at org.sqlite.Conn.prepareStatement(Conn.java:213)
            at org.anjocaido.anjosecurity.RegistrationControl.isRegistered(RegistrationControl.java:134)
            at org.anjocaido.anjosecurity.RegistrationControl.getStatus(RegistrationControl.java:153)
            at org.anjocaido.anjosecurity.AnjoSecurity.handleCancellable(AnjoSecurity.java:157)
            at org.anjocaido.anjosecurity.AnjoSecurityPlayerListener.onPlayerMove(AnjoSecurityPlayerListener.java:78)
            at org.bukkit.plugin.java.JavaPluginLoader$8.execute(JavaPluginLoader.java:165)
            at org.bukkit.plugin.RegisteredListener.callEvent(RegisteredListener.java:59)
            at org.bukkit.plugin.SimplePluginManager.callEvent(SimplePluginManager.java:225)
            at net.minecraft.server.NetServerHandler.a(NetServerHandler.java:115)
            at net.minecraft.server.Packet10Flying.a(SourceFile:126)
            at net.minecraft.server.NetworkManager.a(SourceFile:230)
            at net.minecraft.server.NetServerHandler.a(NetServerHandler.java:70)
            at net.minecraft.server.NetworkListenThread.a(SourceFile:100)
            at net.minecraft.server.MinecraftServer.h(MinecraftServer.java:338)
            at net.minecraft.server.MinecraftServer.run(MinecraftServer.java:253)
            at net.minecraft.server.ThreadServerApplication.run(SourceFile:366)
  12. Offline


    many thanks jwideman
  13. Offline


    Um... what exactly are the permission nodes?
    Can someone list them and explain what they do?
    please? I can't find anything from page 1-7 T-T
  14. Offline


    I suggest you read the thread that's linked in the OP.
  15. Offline


    The first link is a thread to groupmanager or something, I don't want to download that.

    Second is download
    third is source
    fourth is download

    Are you trying to tell me this isn't compatible with Permissions 2.5? :(
  16. Offline


  17. Offline


    Also, anon, you seem to be the most helpful.

    When I open my anjo security config, it all comes out in 2 long lines.

    How can I change the config so that it dosen't wipe the inventory on first login, and so that all players have to register or login before moving,typing,building, destorying?
  18. Offline


    The long line thing is a notepad problem. Try using notepad++.

    About the wipe on first login, I dont thing it is possible to disable that. But after this first time, it wont wipe you inv anymore. This happens because on /login it retrives the data from the database and overwrites the current inventory data. So, on first run, as you dont have any data on the database, but you have data on the inventory, it will clean it. After this first cleaup, you probably wont have the problem again.

    About the prevent moving, typing and stuff... Go to /plugins/anjosecurity and open the config.yml
    There you have to set something like this:

            minutes: 30
            summoncommands: false
            resetatlogin: true
            lockdown: true
            enabled: true
    the lockdown thingy prevents the movement of unregistered players

    Note that the comand prevention will only work if you are using groupmanager, If you use permissions, the guest will still be able to run commands without being loged.
  19. Offline


    Will the guest be able to destroy or place blocks?
  20. Offline


    If you put the lockdown: true he wont be able to even move. The server will always reset his position, its impossible for him to destroy block. Althou, if yu disable the lockdown, yes, they will be able to destroy things.
  21. Offline


    I didn't even need to set permissions and I'm pretty sure it works! Thanks so much :)
  22. Offline

    matt vara

    hey mine doesnt work, it when i open the folder it has org, mata inf,COM,Native. but there is like pom stuff in it... WTF
  23. Offline


    Make it for 440 PLEASE! :D
  24. Offline


    It worked in 440 before. As some people tested it.

    Now it works even with higher CB builds, but needs GM 1.0.
  25. Offline


    1.6c is still not blocking worldguard and worldedit ...
  26. Offline


    You are doing something wrong.

    It blocks WorldEdit perfectly here, just like any other plugin. Tested with WorldEdit4beta8, and CB 440.
  27. Offline


    Downloaded new minecraft_server.jar, AnjoSecurity v1.6c, CB #441, GM 1.0 pre-alpha2, fakepermissions
    Still got the same problem on different server hardware!
    When someone connects (not localhost connection!!!) and dies for example in lava then press "Title Menu" then "Connect" - I've got this:
    2011-03-02 20:14:40 [SEVERE] java.lang.IllegalStateException: Failed to remove player. net.minecraft.server.EntityPlayer@99 isn't in chunk 17, 6
    2011-03-02 20:14:40 [SEVERE]     at net.minecraft.server.PlayerInstance.b(PlayerInstance.java:49)
    2011-03-02 20:14:40 [SEVERE]     at net.minecraft.server.PlayerManager.b(PlayerManager.java:101)
    2011-03-02 20:14:40 [SEVERE]     at net.minecraft.server.ServerConfigurationManager.c(ServerConfigurationManager.java:113)
    2011-03-02 20:14:40 [SEVERE]     at net.minecraft.server.NetServerHandler.a(NetServerHandler.java:556)
    2011-03-02 20:14:40 [SEVERE]     at net.minecraft.server.NetworkManager.a(SourceFile:234)
    2011-03-02 20:14:40 [SEVERE]     at net.minecraft.server.NetServerHandler.a(NetServerHandler.java:70)
    2011-03-02 20:14:40 [SEVERE]     at net.minecraft.server.NetworkListenThread.a(SourceFile:100)
    2011-03-02 20:14:40 [SEVERE]     at net.minecraft.server.MinecraftServer.h(MinecraftServer.java:338)
    2011-03-02 20:14:40 [SEVERE]     at net.minecraft.server.MinecraftServer.run(MinecraftServer.java:253)
    2011-03-02 20:14:40 [SEVERE]     at net.minecraft.server.ThreadServerApplication.run(SourceFile:366)
    If your world is small - thats not a big problem.. but if your world is big... server freeze for a long time!!!
  28. Offline


    I don't think that is an AnjoSecurity issue.
  29. Offline


    What the hell. Minecraft_server.jar? You dont use it with bukkit man.
  30. Offline


  31. Offline


Share This Page