MCSignOnDoor Client Notifier v1.9 (or McSod) By Tustin2121 Download Latest: MCSignOnDoor.jar Older Versions (Move your mouse to reveal the content) Older Versions (open) Older Versions (close) 1.9 for up to Protocol 60 and beyond* (MC version 1.5.1) 1.8 for up to Protocol 49 (MC version 1.4.4) 1.7.1 for up to Protocol 39 (MC version 1.3.1) 1.7 for up to Protocol 39 (MC version 1.3.1) Versions Previous to the Protocol Update (will not function for Minecraft Release 1.3.1 and up): 1.6.1, 1.6, 1.5, 1.4, 1.3, 1.2 *Since McSod Version 1.9, McSod assumes that new versions of minecraft will use the same protocol methods as the previous versions. Updates to a particular protocol number will simply update what it thinks is the "current" protocol number. Should the actual protocol methods change, McSod will still need to update to handle the new methods. Have you ever had to take your server down for maintenance and had people connecting and wondering when it was going to go back up? Or perhaps the server is moving to another IP and people will still be connecting to the old IP address! Or perhaps your players are just being exceptionally ungrateful today! MCSignOnDoor is here to help. The Sign On Door program emulates an active server on the ip and port your minecraft server is usually on. Any connections destined for your out-of-commission minecraft server will be caught by this program. It will emulate the connection behavior of a minecraft server and immediately turn the client away, sending the client a custom message and notifying the player of the status of the server! Now they don't have to wonder if the server is down! The program is very lightweight, so you can stop the server to use MCEdit or backup the world while this program provides to your many fans the reason the server is down! ***** ARasputin has created a quite excellent wizard batch file for those Windows users who don't want to fiddle with the batch file every time you wish to change McSod's message. It will ask you the switches and message when you run it! ***** Code: MINECRAFT Sign On Door Version 1.8 by Tustin2121 ---------------------- This program tells players attempting to connect to a minecraft server on this machine a message (defaulting to a 'server is off' message). This program cannot and is not meant to run while the minecraft server itself is running; it is meant to give a message to players as to why the server is not running. Usage: java -jar MCSignOnDoor.jar [switches] Command line switches: -? --help Displays this message and quits -p --port [port] Sets the port the messenger runs on (default: 25565) -i --address [ip] Sets the ip address the messenger runs on (default: null) -m --message [message] Sets the message to send to connecting players (250 char max) (default: The server is not currently running.) -w --white-message [message] Sets the message for whitelisted players. Default: does not differentiate between normal and whitelisted players. -b --black-message --banned-message [message] Sets the message for blacklisted players. Default: does not differentiate between normal and blacklisted players. --ipmessage [message] Sets the message for ip-banned players. Default: does not differentiate between normal and ip-banned players. --motd [message] Sets the server list message of the day. Default: the message setting, truncated. (<=60 char max) --ignoreping Sets McSod to ignore incoming pings; Server appears offline. --ignorebannedping Sets McSod to ignore incoming pings from banned IPs. --players [ratio] Sets the player ratio given in pings (in form "1/10") -v --reported-version [versionstring] Sets the version reported over motd. Default: Offline -# --show-version Forces the client to show the reported version string in red. --act-as-protocol [version] Sets which protocol version to act as. Defaults to latest. (Warning: advanced functionality - you don't need this) -l --log [file] Supplies a log file to write to (default: does not use log file) -s --silent Does not print output to the screen --sentrymode When someone not banned tries to connect to the server, McSod will exit immediately with the return value 12. Useful in conjunction with a looping script. -c --config [file] Tells McSod to read the configuration file specified. All command line switches after this one will be ignored. --outputconfig [filename] Outputs a template config file to the specified filename. This file can be edited and used with the --config command line switch. Notes:  When using special case messages (white and banned list messages), McSod will attempt to load the appropriate files that the Minecraft server uses to store these lists.  If a blacklist message is set, it is also applied to ip-banned players, unless the ip-banned players message is separately set.  When setting the player ratio to show, non-numbers and a ratio with 0 max players will display as "???" on the client. Player ratio also cuts into the max length of the motd setting. [*] Some command lines treat the bang (!) as a special command character. If you would like to use a bang in your server message, be sure to escape it with a backslash (\). [*] Messages can also contain color codes by using an ampersand (&) followed by a hexadecimal value (0-9 a-f). See the MC wiki's Classic Server Protocol page. Usage examples: java -jar MCSignOnDoor java -jar MCSignOnDoor -c mcsod.cfg java -jar MCSignOnDoor -m "The server is down for maintenance." java -jar MCSignOnDoor -m "OH! You woke me up!\nGive me a minute to wake back up and reconnect!" --sentrymode java -jar MCSignOnDoor -ip 192.168.1.1 -m "Still waiting for bukkit to upgrade..." java -jar MCSignOnDoor -p 54321 --message "The &eMinecraftWB &fserver has moved to 192.168.1.1\!" --motd "Moved to 192.168.1.1" java -jar MCSignOnDoor -l logfile.log -s -m "Slim's server is currently being removed of excessive genitalia." --motd "Removing d*cks" --players "6/9" Example! (Move your mouse to reveal the content) Example! (open) Example! (close) I started the MCSignOnDoor program like so: Code: java -jar MCSignOnDoor.jar --message "Gone Fishin' Back in Five Minutes!" Now, when anyone tries to connect to my server, they get this screen: It's that easy! Plus the program keeps track of who tried to connect (IP and username) in the logs! (just a coincidence of the protocol ) Third Party Use! (Move your mouse to reveal the content) Third Party Use! (open) Third Party Use! (close) Many providers of server management tools have already incorporated MCSignOnDoor into their programs! If you are using any of the following programs (listed in no particular order), you already have McSod to use on your server! milkAdmin - Remote Toolkit Plugin SpaceBukkit [Upcoming support] ...Several others I'm sure! ^_^; Is your product using or want to use McSod? Just give me credit somewhere (at the very least, show the start-up text, which has my handle in it) and you can use it however is best! Post on this thread or PM me and I'll add you to this list! FAQ (Move your mouse to reveal the content) FAQ (open) FAQ (close) I can't get this plugin to work with Bukkit! What do I need to do? Please note that this is not a Bukkit plugin! McSod is a standalone java program. You start McSod in the same manner you start Craftbukkit, and Craftbukkit cannot run at the same time McSod is running. See the above example for how to start McSod. Ok, well, is there an easier way to start McSod than using the command line all the time? Yes, you can use a batch file or shell script, just like you can do with Craftbukkit: Batch (Windows) (Copy-Paste into a .bat file): Code: [USER=90771833]Echo[/USER] OFF java.exe -jar MCSignOnDoor.jar -m "[Message Here]" PAUSE Shell script (Mac / Linux) (Copy-Paste into a .sh file): Code: #! /bin/sh java -jar MCSignOnDoor.jar -m "[Message Here]" Or, ARasputin has created a quite excellent wizard batch file for those Windows users who don't want to fiddle with the batch file every time you wish to change McSod's message. It will ask you the switches and message when you run it! McSod servers suddenly started showing up as "Server Out Of Date" in the server list with this latest update when I don't want them to! This is an unfortunate side effect of the modern "protocol version" system Minecraft is now using. But fear not, it's simple to fix and you don't even have to update McSod anymore if this happens (usually)! That is, if you know what you're doing. For those of you who don't know what a jar file's manifest is, its probably best if you wait for a new version (or leave a little note in the thread or something). For those who do know or are curious enough to find out: in McSod's manifest file there's a key called Specification-Version. McSod, on startup, grabs this number and uses it as the "current minecraft protocol version". Just go find out what the current version is here and update the number in the manifest. Now everything should work fine again! Or, you can just start using the -# switch to always force a wrong protocol version report, which has the side effect of showing the neat string you put in the "version number" (default: "Offline")! Isn't this what we wanted way back when I first made McSod work in the server list anyway? A way to display to the user "It's Offline!". How do you stop this thing?![ Use Control + C or kill it another way. McSod is designed to be killed violently (or, for the more computationally inclined, via signals) and does not provide a way to stop itself. How do I make McSod shut down my server? Alas, seeing as McSod is not a plugin, it cannot do that. You will have to find an actual plugin do to that. Something like Vincs's EmptyServerStopper or my own ServerSleeper. Shop around and see if there are any others to your liking. (PICK MINE!) My question is not listed here! Feel free to leave a comment in the thread below! I get an email when new posts appear, so I'll get notified that you left a comment fairly quickly (assuming I'm not out of WiFi range for a weekend or something). Changelog (Move your mouse to reveal the content) Changelog (open) Changelog (close) Version 1.9: - Changed the way protocols are handled, so now with a new protocol version, McSod will just assume everything works from the previous protocol version. - The current protocol version will still need to be updated for the server to not show as out of date or "offline" to a prospective client's server listing. - Fixed a bug with logging exceptions not printing the stack trace - Made the project harder to debug in eclipse, but at the same time made it so I won't have to actually use eclipse as much. Version 1.8: - Added protocol checking and updated the version of the MOTD to conform to the new way to do it. - Added an option to change reported versions and to force the client to show said version (which makes it block against connecting). - Fixed a long standing bug where if a config file was used... - ...to specify an ip banned list, it would instead load it into the blacklist, thereby making banned ips not function. - ...to enable pings, it would instead disable pings, and vice-versa. - Changed how the config file works, using hierarchy-type keys. - ...other things I'm sure I forgot Version 1.7: - Fixed a bug when handling requests from Minecraft 1.3.1 - Kept backwards compatability with Minecraft 1.3 and below (in theory). - Added "forward" compatability, for when the protocol version changes. - Added Sentry Mode, where McSod will close with exit code 12 (because... 12) upon someone (not banned) connects to the server. This is for scripts with a loop, so servers can start back up automatically. - Discovered that Minecraft 1.3.1 supports newlines on the "door", and so added support for messages with "\n" in them to translate to a newline. - Fixed a supposebly long-standing bug with default MOTD generation. - Removed versions 1.1 and 1.0 from the previous version list at the top of this post: Minecraft Beta is no longer really available and version Beta 1.5 was so long ago. Links to those versions will continue to work for the time being. Version 1.6.1: (Yay! My first double point release! Oh, wait, that's a bad thing... :/) - Fixed a bug where the logfile command-line switch would not take a windows path - Removed the undocumented and unnecessary ability to use forward-slash command-line switches. Version 1.6: - Added ability to read/use the whitelist and blacklist files a server keeps - Send different messages to clients on different lists- Ignore ping requests from IP banned users- Added config file - Use a config file with the --config command line switch- Create a template config file with the --outputconfig command line switch- Cleaned up code (now using packages + new class used internally) - Cleaned up help output - Cleaned up log output (slightly... okay, not much at all) Version 1.5: - Added support for Minecraft 1.8 Server List MOTD. By default, McSod will respond to server list pings with the same message used as the sign on the door (except truncated and with color codes stripped) and report the player ratio as an invalid number (minecraft will show "???"). Added command line switches for setting motd and player ratio, and for turning off server list support. Version 1.4: - Added support for minecraft color codes (see here) (Thanks to FrozenBrain and his MessageChanger plugin for giving me the idea... and stealing his code. His plugin is a complement to this program in that you can change the default messages sent to the clients while the server is running! Go check it out!) Version 1.3: - Added a IP address switch, for instances where more than one IP address could be used on a server. - Now command line switches can be prefixed with slashes (like is usually used in Windows) - Minor code cleanup Version 1.2: - Fixed for the Minecraft 1.5 update - Added a function where a "\!" in the message is automatically replaced with a "!" (for command lines where a ! causes an error or is misinterpreted as another command) Version 1.1: - Added logfile switch, to allow saving to a file - Added silent switch, to turn off logging to the console - Fixed bug where it would print tons of IOExceptions when properly shutdown Version 1.0: - Initial Release (By request, source code as been uploaded to github. Source code is licensed under Creative Commons Attribution-Noncommercial-ShareAlike. Feel free to send me a pull request if you do something neat.) Feel free to suggest features or garner help below.