[CHAT] mcSimpleMail v.089 beta - A simple, flatfile, mail system [803]

Discussion in 'Inactive/Unsupported Plugins' started by guanohead, May 9, 2011.

  1. Offline

    guanohead

    mcSimpleMail - A simple, flatfile, mail system [766]
    Version: v0.89 Beta

    A basic messaging plugin. You read and write messages to other players via chat commands. The messages are stored in the recipient's personal inbox. Each player can view, read and remove the messages stored in his inbox at any time.
    This plugin is inspired by the Hay0 server plugin "DSMail" which ran on my server until it became obsolete. I've found one replacement on the new bukkit system: the plugin ThunderGhast. Unfortunetly, it's not compatible with with flatfiles at the moment. I figured it wouldn't be that hard to roll my own so I did, and this is the result.

    Instructions:
    Just copy the jar to your plugins directory, and all your users will get an inbox and will be able to send/receive mail. Easy-peasy!


    Download the jar file (v0.89) (205k)
    Download the "converter" file (4k) An executable jar to upgrade the mcSimpleMail data file from version 0.86 to version 0.87+.
    IMPORTANT: Updating from v0.86 to v0.87 requires that you either convert your existing "mcSimpleMail.dat" file to "mcSimpleMail.xml" with the "converter" app linked above, or lose your existing messages in the upgrade. This should be the last time that this is required, as the xml scheme will make future formatting upgrades run automatically. This is just one of the unfortunate things that makes beta stage, a beta stage.

    Features:
    • Players can write messages to each other
    • mcSimpleMail will store messages in each player's personal inbox until players remove them
    Player Commands:
    • /inbox <Page> - Display the user's inbox on the <page> page (defaults to the 1st page).
    • /mail <id> - Each message has an id (displayed in the inbox view). Enter this command with a valid id to view the associated message.
    • /mail trash <index> - Each message has an id (displayed in the inbox view). Enter this command with a valid id and remove the associated message from your inbox.
    • /mail send <recipient> <message> - Send the given message to the given recipient. The recipient must have either visited the server before or have been entered by an admin.
    • /mail help - Shows a list of the player commands and a brief description of what each one does.
    • /mail help admin - Shows a list of the admin commands and a brief description for each.
    Admin Commands:
    • mail send <recipient> <message> - Send the given message to the given recipient ("from" is "SYSTEM").
    • mail send all <message> - Sends the given message to all inboxes.
    • mail listusers - Displays a list of users that are registered in the mcSimpleMail system.
    • mail adduser <username> - Adds an inbox for <username>. Note: This happens automatically when the user first logs in.
    • mail trashuser <username> - Removes <username>'s inbox. This includes all messages stored there.
    • mail addusersfromfile <file> - Adds an inbox for all users listed in <file> (a newline-separated list).
    • mail savefrequency <minutes> - Sets how frequently the data is saved to harddrive (in minutes).
    • mail save - Forces the data to be saved to the data file. Note: This happens automatically on a timed interval.
    • mail load - Forces the data to be loaded from the data file. Note: This happens automatically when the plugin is loaded.
    • cmds <true/false> - If <true/false> = false, this will disable players from accessing their mail through the admin commands. This will allow different front-end plugins to take over the interface for the mail system.
    • mail help admin - Displays a list of the admin commands and a brief description for each.
    Todo:
    • Look into adding a "long message" option.
    • Look into mcSimpleMail breaking permissions plugin v.3.1.5b
    • Create an addon plugin that is a front end for this mail system. It should be based on signs, and provide all functionality that this currently does.
    • Add mysql support.
    • Add "permission" flags for certain powerful commands, using the permissions plugin.
    • Make the admin commands useable in-game by admins (with "permission" flags).
    • Implement any other good suggestions/fixes provided by users on the forum.
    Changelog:

    Version 0.89 - 05/22/2011
    • Added admin command "mail send all <message". See Admin Commands list above for details.
    • Added admin command to register multiple users by loading a newline-separated list of them from a text file.
    Version 0.88 - 05/18/2011
    • mcSimpleMail now integrates with the permissions plugin, if available. You can send a message to all members of a group! Simply put the group-name as the recipient of a "mail send" command, and it will send mail to all of the members of that group that are currently registered with mcSimpleMail.
    • New admin commands - "mail save" and "mail load" save/load data to/from the data file. Note: This happens automatically. These commands just force the sync.
    • Data is no longer saved with each change, but on a timer (default is every 5 minutes). Use the admin-panel command "mail savefrequency <frequency>" to change the interval. See the "Admin Commands list" above for more info.
    • Fixed a typo in the help (typo was "index" instead of "inbox").
    Version 0.875 - 05/15/2011
    • Fixed bug where deleting items causes inbox paging to mess up. This involved drastically altering how deleting and message id's work.
    Version 0.87 - 05/14/2011
    • Changed to an xml-based storage system for future portability.
    • Fixed bug where a bad trash command elicits a message with an incorrect mail ID
    • Added an admin command to manually add and remove users from the mail system (Note: they'll still get re-added the next time they sign onto the server).
    • Added an admin command to get a list of current users in the mail system
    • Added an admin command to send messages to players
    • Added an admin command to disable player-side commands. This is for future expansion with plugins that will give this system an ingame ui, such as signs.
    • Add a timestamp to messages to let player know when messages were sent
    • Add a "read" flag to messages to let player keep track of new messages vs. old ones.
    • Added Inbox paging. Breaks the inbox into multiple pages for when players get too many messages to view all at once.
    Version 0.86 - 05/09/2011
    • Renamed the file, "message.cfg" to "messages.dat". If server admins want to keep the stored messages through the update then they'll need to rename this file. It's located in the "plugins/mcSimpleMail" folder.
    • Cleaned up the help messages and error messages.
    • Split the help message into two panels. One for players, one for admins.
    • Shortened the commands (see the commands list above)
    • Messages have id's now rather than indexes. This means that A) They start at 1, not 0 and B) The associated number doesn't change when earlier messages are trashed.
    • The index to id change required altering the data file format. I added a versioning system for the data file to make it backwards compatible (message storage won't break when you update).
    Version 0.85 - 05/08/2011
    • Posted the plugin on the web for others to use/try/beta test.
     
  2. Offline

    Butterquark

    if your on the admin side, you can always look at the flatfile. Its in the mcSimpleMail folder.
     
  3. Offline

    gamer1129

    Hey guanohead, I am wondering, will you ever add the ability for longer messages? Maybe /mail long or something for longer messages?
     
  4. Offline

    DJ_Idol

    Ok, after a whole day of researching, asking, troubleshooting, etc. I've finally figured out my problem, this plugin for some reason breaks Permissions 3.1.5b. Not sure why, I get no errors in my server.log, but I've deleted and re-uploaded all of my plugins and tested my server 1-by-1, and this one for some reason completely breaks permissions altogether, not sure why, but just wanted to let you know, hopefully you can find a fix for it :)
     
  5. Offline

    guanohead

    DJ_Idol:
    Huh. That is an odd issue. I'll look into it. Thanks for bringing it to my attention.
    Could you elaborate on how the permissions plugin is being broken by mcSimpleMail? Is it just error-ing out as soon as it's loaded, or is the issue more subtle?
    gamer1129:
    I've been thinking about a long message option. I'll add it to the todo.
    Daniel:
    Butterquark's solution is probably the best. If you're the primary admin then it should be easy enough as the flatfile that stores emails is indeed human readable. I think it's an infrequent enough request that a more elegant solution (ie an admin command) is probably not necessary at this time. If I get more requests for it then I'll add it to the todo list.

    I'm probably going to shift this out of beta after I get back from traveling, which will be in early August. I'll post the source code at that time.
     
  6. Offline

    gamer1129

    Alright, cool :D Thanks man. I always appreciate a developer who cares enough to respond quickly nd take requests into consideration. I will be installing this plugin soon :)
     
  7. Offline

    DJ_Idol

    Sorry, guess I should have explained better lol, basically, it breaks the whole permissions sytem, I.E. Nobody has any permissions at all. For example, I'm in the Administrator group, which has the '*' permission, but when mcSimpleMail is running on the server, I don't have access to any commands for any plugin, besides a few like WorldGuard and WorldEdit, I think because they use their own Permissions, and I still have access to OP commands, but any other plugins that use permissions don't work. Not sure why your plugin would cause this though which is the wierd part...
     
  8. Offline

    guanohead

    FYI: I just wanted to tell those concerned that I'm not going to be able to work on this until I get back from job training on the 4th. ie, don't hold your breath.
     
  9. While I don't have all that many plugins in use on my server, I am using Permissions 3.1.5b as well and I'm not seeing any breakage.
     
  10. Offline

    prefix

    Bukkit 1000 with McMyAdmin and PermissionsEx this plugin messed up my permissions/server royally :p The plugin it self worked fine and it seemed like a nice little plugin but it totalled screws over my permissions i think, like someone mentioned earlier.

    It says it 2011-08-09 03:02:01 [INFO] mcSimpleMail: Recognizes the "Permissions"plugin

    But altso that 2011-08-09 03:01:31 [SEVERE] Could not pass event BLOCK_PLACE to Permissions

    But then none of the chat prefixes work and everything lags

    2011-08-09 03:01:31 [INFO] [CONSOLE->prefix331] Permanent world. 7 of 48 users online.
    2011-08-09 03:01:31 [SEVERE] Could not pass event BLOCK_PLACE to Permissions
    2011-08-09 03:01:32 [SEVERE] Could not pass event BLOCK_PLACE to Permissions
    2011-08-09 03:01:32 [SEVERE] Could not pass event BLOCK_PLACE to Permissions
    2011-08-09 03:01:34 [SEVERE] Could not pass event BLOCK_PLACE to Permissions
    2011-08-09 03:01:35 [WARNING] Can't keep up! Did the system time change, or is the server overloaded?
    2011-08-09 03:01:36 [INFO] [g] bradythebuilder: does everyone get to use mail?
    2011-08-09 03:01:37 [SEVERE] Could not pass event BLOCK_PLACE to Permissions
    2011-08-09 03:01:41 [WARNING] Can't keep up! Did the system time change, or is the server overloaded?
    2011-08-09 03:01:41 [SEVERE] Could not pass event BLOCK_BREAK to Permissions
    2011-08-09 03:01:42 [SEVERE] Could not pass event BLOCK_PLACE to Permissions
    2011-08-09 03:01:44 [INFO] [g] prefix331: yes :)
    2011-08-09 03:01:47 [WARNING] Can't keep up! Did the system time change, or is the server overloaded?
    2011-08-09 03:01:48 [INFO] [g] prefix331: hm
    2011-08-09 03:01:50 [INFO] [g] bradythebuilder: wicked
    2011-08-09 03:01:50 [INFO] [g] prefix331: wth.
    2011-08-09 03:01:52 [WARNING] Can't keep up! Did the system time change, or is the server overloaded?
    2011-08-09 03:01:54 [WARNING] Can't keep up! Did the system time change, or is the server overloaded?
    2011-08-09 03:01:57 [INFO] [g] prefix331: This shouldn't be :p
    2011-08-09 03:02:00 [WARNING] Can't keep up! Did the system time change, or is the server overloaded?
    2011-08-09 03:02:00 [SEVERE] Could not pass event BLOCK_BREAK to Permissions
    2011-08-09 03:02:01 [INFO] mcSimpleMail: Recognizes the "Permissions"plugin
    2011-08-09 03:02:01 [INFO] Loaded world: world_nether
    2011-08-09 03:02:03 [INFO] [g] prefix331: all the prefixes are gone
    2011-08-09 03:02:08 [INFO] [g] mathijssvust: lag
    2011-08-09 03:02:13 [SEVERE] Could not pass event BLOCK_BREAK to Permissions
    2011-08-09 03:02:16 [INFO] [g] bio540: can u send the message when they are offline?
    2011-08-09 03:02:18 [INFO] /96.126.97.111:56161 lost connection
    2011-08-09 03:02:20 [INFO] [g] prefix331: yes
    2011-08-09 03:02:23 [INFO] MCBans: An_Awkward_Guy has connected!
    2011-08-09 03:02:23 [INFO] An_Awkward_Guy [] logged in with entity id 2278 at ([world] -393.5625, 10.0, -269.3125)
    2011-08-09 03:02:23 [INFO] [staff] An_Awkward_Guy has joined the channel
    2011-08-09 03:02:24 [INFO] [CONSOLE] Welcome back, An_Awkward_Guy
    2011-08-09 03:02:24 [INFO] [CONSOLE->An_Awkward_Guy] Welcome to WorldCraft.eu ! Read rules at spawn!
    2011-08-09 03:02:24 [INFO] [CONSOLE->An_Awkward_Guy] Permanent world. 7 of 48 users online.
    2011-08-09 03:02:28 [INFO] [g] bio540: do they have to get on first?
    2011-08-09 03:02:31 [INFO] [g] mathijssvust: i cant pick up stuff
    2011-08-09 03:02:38 [INFO] [g] M4RKUS112: so your clones are gone prefix D: ?
    2011-08-09 03:02:38 [WARNING] Can't keep up! Did the system time change, or is the server overloaded?
    2011-08-09 03:02:41 [INFO] [g] mathijssvust: or just my piston
    2011-08-09 03:02:44 [WARNING] Can't keep up! Did the system time change, or is the server overloaded?
    2011-08-09 03:02:46 [WARNING] Can't keep up! Did the system time change, or is the server overloaded?

    no prefixes were available and the server was so slow to start that we got into chat long before
    2011-08-09 03:02:01 [INFO] mcSimpleMail: Recognizes the "Permissions"plugin
    2011-08-09 03:02:01 [INFO] Loaded world: world_nether
     
  11. Please split this into a library and a lightweigt messaging plugin. This would make libMMS obsolete and so make my life easier :D)...
     
  12. I don't know how to import players from a file. Can i use my whitelist and if yes, how?
     
  13. This plugin and PermissionsEx was a bad combo for me as well. In my case, it broke the compatibility bridge, making it act like the original yetti permissions plugin.
     
  14. Offline

    benjamison24

    wasup nice plugin
     
  15. Offline

    pumakid98

    5.75.184.38
     

Share This Page