Inactive [GEN/INFO] DCReason 2.1 - Distinguish crashing from quitting [1.2.3 COMPATIBLE] [1.1-R6+/1988+]

Discussion in 'Inactive/Unsupported Plugins' started by Eevables, Jun 29, 2011.

  1. Offline

    Eevables

    DCReason - Distinguish crashing from quitting
    Version: v2.1

    The 2.0 update removes Permissions compatibility because the local obfuscator was complaining that I was working with outdated stuff. I send my apologies to all of the "cavemen" who were using "prehistoric" technology.

    Random internet disconnections or Java crashes are problems that a surprisingly large percentage of users face. When this happens in the middle of a game,
    some witnessing users may get confused or may even take offense at the abrupt leaving. This plugin clarifies the reason for a player's abrupt leaving to other players with a change to the player's exiting message - simply, "Playername has lost connection to the game."

    The message displayed changes depends on the method of disconnection, and can also be custom-defined to fit your needs.

    DCReason also allows the setting of custom messages for individual players in-game! The command is
    /dcr [player] [setJoin|setQuit] [message].

    In order to prevent players from changing the messages of others (and, if not preferred, themselves), support for SuperPerms (and, indirectly, anything that supports SuperPerms) has been implemented. The nodes are
    Code:
    DCReason.custom.changeSelf
    DCReason.custom.changeOther
    where changeSelf lets a player change their own messages, and changeOther lets a player change others' messages.
    Players that are ops will have access to both nodes.

    If a player that has a custom message set crashes or disconnects abnormally, the global crash message for that error will be shown instead.

    Features:
    • Distinguishes when a user crashes or leaves the server abnormally
    • Crash messages can be custom-defined per kind of disconnect
    • In addition, regular login and logout messages can be edited globally.
    • Custom login/logout messages can be defined per individual player
    • Color support across all messages
    • Support for a permissions system to allow or disallow custom setting of messages
    • Colors can be used in all types of messages
    Download: http://dl.dropbox.com/u/14275037/DCReason_v2.1_m1.1.jar
    To Do:
    • Find more crash error reasons and specify a crash of that nature to the server
    • Fix the fact that the plugin detects Permissions twice in the console (Removing Permissions 3.x support would take care of this, wouldn't it?)
    • Implement SuperPerms Done!
    Changelog:

    Show Spoiler

    Version 2.1 [Uhhh...]
    • Fixed an issue with priorities not being as high as they should have been. I think.
    Version 2.0 [what version is this?]
    • Removed Permissions functionality (Sorry! SuperPerms still exists, though)
    Version 1.9 [1597]
    • Implemented the ability to choose where you want the name of the player to be placed in the default login/logout messages. Use %PLAYER% to define where you want the name to be!
    Version 1.8 [1597]

    • Implemented color compatibility! You can now use colors in any of your messages.
    • Implemented SuperPerms compatibility
    • Fixed compatibility with other chat modifiers (mChat, TownyChat, EssentialsChat, etc.)
    Version 1.7 [1597]

    • Implemented the ability to custom set login and logout messages
    • With this came Permissions support!
    • Default login message can now also be changed through the config.yml
    Version 1.6 [1337]

    • Implemented new possible disconenction: disconnect.timeout
    Version 1.5 [1060]

    • Decided to go all the way and allow custom messages for regular disconnections. Will possibly be doing connections as well to allow for this (though that
      may require a name change...)
    Version 1.4 [1000]

    • Not sure what I changed here...
    Version 1.3 [1000]

    • Implemented new possible disconnection: disconnect.overflow
    Version 1.2_01 [1000]

    • Compiled for 1.7.3
    Version 1.2 [935]

    • Added a config where disconnect messages can be edited
    Version 1.1 [928]

    • Recompiled for whatever the compatible Craftbukkit is
    Version 1.0 [860]

    • Release
     
  2. Offline

    BadgerLove

    I will give it ago Eevables :)
     
  3. Offline

    Eevables

    I have an update ready, however, I just realized I got it obfuscated with the wrong version number.

    Plugin will be updated by the end of the day.

    Nevermind. I was wrong. Tomorrow, probably?
     
  4. Offline

    Eevables

    Plugin updated. It now is able to define a reason for disconnecting due to overflow (though by then, the server might be so laggy no one can see it...)
     
  5. Offline

    firstEncounter

    I made this type of plugin on my server (by adding a proper getReason method to the PlayerQuitEvent in CraftBukkit) and I was encountering the endOfStream on X too.

    But it's not a crash, Minecraft simply shuts down the game without terminating the connection/sending a disconnect packet. This is fixable by putting
    Code:
    try {
        if (this.theWorld != null && this.isMultiplayerWorld()) {
            this.theWorld.sendQuittingDisconnectingPacket();
        }
    } catch (Throwable ignored) {
    }
    inside shutdownMinecraftApplet in Minecraft.java, but that requires modding the client. This was easy for me since I have a custom server/client combo, but I'm sure there are other ways to do it.
     
    Eevables likes this.
  6. Offline

    Eevables

    Well, I figured the server viewed it as an abrupt termination of connection (which is all it is, when it gets down to it,) it's just impossible to get the server to distinguish between a crash and someone closing the window.

    ...Well, impossible as far as my ring of knowledge goes. I'm still more or less of a novice programmer.

    However, thank you very much for that tidbit; I didn't much realize there was any possible way to get it to differentiate, but now I'm inspired to look into it a bit more. Once I get back into the programming mood, I'll probably ask around. Thanks.
     
  7. Offline

    firstEncounter

    You're very welcome. I'm glad I could share a bit of knowledge I learned from my own poking around.

    And you're right, from server-side only it's impossible. We probably can't expect to see a fix in the client either, since there's no real reason for Notch to fix/change it. Oh well.
     
  8. Offline

    gameswereus

    Can you give this message locally? Like within 10 blocks it will tell people what happened?
     
  9. Offline

    Ahagen550

    Works fine on Craftbukkit 1060.
     
  10. Offline

    Eevables

    Updated t0 1.5. I had an update for 1.4, but I forget where it went or what was in it. I think it may have just been a recompilation...

    New update goes all the way and lets you define quit messages for normal disconnections.

    Pardon, I never saw your post until now.

    I don't really see the need for it, nor have I played with things involving players around the targeted player, but I'll stick some code in and see what happens. Can't guarantee anything, though.

    EDIT by Moderator: merged posts, please use the edit button instead of double posting.
     
    Last edited by a moderator: May 17, 2016
  11. Offline

    gameswereus

    I just don't like everyone on the server being bothered by messages that don't apply to them. Maybe you can "add" someone to see when they lost connection.
     
  12. Offline

    Eevables

    The message that occurs isn't a completely new message, rather, it's a replacement of the older "Player has left the game" message. There aren't any new messages that occur, and I don't see how people would be bothered by a simple change in disconnection message.

    The above assumes you haven't used the plugin yet. Ignore it if you have, and I apologize.

    I can only see an application for alert radius being useful when your server uses a local chat plugin. I'll play with it. No promises, though.
     
  13. Offline

    Eevables

    Updated for 1.8.1, and accounted for a possible disconnect.timeout reason.
     
  14. Offline

    sparkboy77

    Pardon me for being stupid but, im confused on how to install this / where you put it. Downloaded the .zip file. What do i do with all the things inside?
     
  15. Offline

    K_Wall_24

    Hey, I was wondering if this is working. I have this plugin installed, but it doesn't seem to work. It shows up in the console that 'K_Wall_24 lost connection: disconnect.quitting' but it doesn't show anything in the Chat. I'm using CraftBukkit 1337 RB, iChat, PermissionsBukkit, etc. I can give you more info if you need. This seems like it would be a great pluggin, just doesn't work right.
     
  16. Offline

    Vorsath

    @sparkboy77
    Should just all go into the Plugins folder and setup config.yml how you like.

    @K_Wall_24
    Works fine on my private 1337 server. Not using iChat, so maybe that's the problem?
     
  17. Offline

    K_Wall_24

    Hmm, I'll take a look, but I wouldn't think that would do anything. I will check.
     
  18. Offline

    eRko16

    Try to add color support, like this plugin ->CountryLoginMessage
     
  19. Offline

    Shadow771

    This plugin doesn't seem to be working for me either, I am using RB 1337 and HeroChat 4.10.3
     
  20. Offline

    Eevables

    So many messages! Out of nowhere! Heck.

    On a server I administrate the plugin has mysteriously stopped working. I haven't looked into what may be causing the failure, but I want to attribute it to Bukkit for some reason.

    I'll fix it when I can...
     
  21. Offline

    Shadow771

    Oh, one other thing that might be useful. I am also running MCBans, could that possibly be interfering with the messages?
     
  22. Offline

    Eevables

    I highly doubt it, as there are several servers I play on that don't use MCBans that are having problems, whether or not they are using my plugin...
     
  23. Offline

    Eevables

    Oh goodness, I think I broke it.

    Upon trying to add functionality for players to define their own quit messages, I somehow broke the entire plugin. It was looking nice, too - no errors showing up or anything.

    Now I'm getting InvocationTargetException every time my code hits the Configuration initializer, even after removing everything I had put down in the first place.

    It may be a while.
     
  24. Offline

    Redstorm3265

    I will be trying this out, I support your idea though :D

    EDIT:

    Does not work :/ Hit me up when you release an update
     
  25. Offline

    Eevables

    Yeah, a lot of stuff isn't working right now. I'm waiting on an RB to update anything, as I've added new functionality that won't work with the current Bukkit dev builds.

    I apologize for this and will be pinging people whenever I get the update out...
     
  26. Offline

    gartral

    Your website went down.
     
  27. Offline

    Eevables

    Yes... yes it did. Remedying...

    EDIT;; Fixed, using Dropbox now.
     
  28. Offline

    Ross Gosling

    I got this plugin and it didn't work, then I deleted it and now you don't see people leave, its really ballsing up my server.
     
  29. Offline

    Eevables

    A) This plugin has not been updated for 1.0.1-R1. As many people have already seen, it does not work.
    B) If my plugin was deleted, I highly doubt that it is causing you grief. Make sure it actually is deleted, and delete the folders it makes to be safe.

    I will be working on an update, and an alternative to the file creation system (as methods that I used were removed in the update.)
     
  30. Offline

    Ross Gosling

    ok and when i got rid of your plugin it left me with no leaving messages so i'm assuming its your plugin :)
     
  31. Offline

    Eevables

    That sounds very impossible... if the jar no longer exists, then Craftbukkit isn't affected by anything that it does. But meh.

    I don't know what else you have installed, so I can't really be of further help... If you're still intent on using the plugin, I've got an update on hand right now that I'm waiting on obfuscation for.

    Don't know when that obfuscation is coming around, though.

    EDIT;; I need to ask, are you a plugin dev? It's driving me mad, not being able to tell when to talk to someone intelligently and when to talk to someone like tech support.
     

Share This Page