[INACTIVE][CHAT] ThunderGhast - Standalone mail plugin [740]

Discussion in 'Inactive/Unsupported Plugins' started by Hretsam, Apr 27, 2011.

  1. Offline


    ThunderGhast - Standalone mail plugin
    Version: v1.1

    This was a request of shadrxninga.

    ThunderGhast is a plugin that allows the users to mail eachother. You can do most of the basic mail functions like: send, reply, delete & store.
    This can be an great admin tool to! As users are able to send mails to admins about griefers

    It works both with MySQL & SQLLite. I am working on adding flatfile support.
    There are still some things left to do to polish it up (ea. make it fully configurable). But its working as it supposed to. I will make sure that no data gets lost when you update this later.

    If you got suggestions, i am all open for it.

    • Send, reply, store & delete mails.
    • Possible to limit mails for certain users
    • Has permission support, but also works without
    • MySQL can be integrated with an existing database
    • Can be used on multiple server with MySQL.
    Download file here. (version v1.1)

    Source code (github)

    The commands for this plugin:
    CommandList (open)

    • /tgcheck - checks if you got unread mails
    • /tgmailbox [boxname] - opens the mailbox with the name given (inbox if no boxname is given)
    • /tgread <mailid> - Shows the mail with the given id
    • /tgstore <mailid> <boxname> - Stores the mail in the given box
    • /tgreply <mailid> <message> - Sends an reply of the mail
    • /tgmail <playername> <subject> <message> - sends an mail to the given user
    • /tglongmail <playername> <subject> - Sends a long mail to the given user. (this overrides the chat for the user, to fill the mail. Use the command again to send it)
    • /tgdelete <mailid> - Removes the mail with the given id

    Config file, if you want it:
    config.yml (open)
    ## Version of the config file, do not touch
    configversion: 1
    ## This chooses where the program stores the emails.
    ## sqllite or mysql
    mail storage: sqllite
    ## Settings for mysql (if used)
    ## Make sure the user can select, update, delete, and create a table!
    mysql location: localhost
    mysql username: root
    mysql password: root
    mysql remote: false
    mysql database: thunderghast
    mysql mailtable: mails
    ## Use permissions
    use permissions: true
    ## Enable users to make long emails
    enable longmails: true
    ## show unread mails on login
    show message on login: true
    ## This sets the max amount of mails a user can have
    ## only used if permissions is off
    mailboxsize: 20
    ## how long unread mails should stay in the inbox
    ## Upcomming feature, is not ready yet
    storage length: 30
    ## For permissions
      ## groupname, not used yet
        ## same as above
        mailboxsize: 20
        ## the permission node for this group
        node: thunderghast.usernode
        mailboxsize: 0
        node: thunderghast.adminnode
    Upcoming & Buglist (open)

    • More adaptable to personal likings. (change colours, messages)
    • Improved GUI
    • Admin commands
    • Webaccess with MySQL (With help of White Sheep)
    • Auto remove old mails
    • Iconomy Support
    • Mailbox block or Mailman NPC?
    • Flatfile Support
    • Ability to send items
    • Add help page
    • Some things (like an other plugin) can freeze the longmail, making the chat unusable
    • An reply for a mail is send to the person who replied (to yourself)
    • If an users try to read a mail that isn't theirs, it throws a Exception

    Version 1.1:
    • Fixed bug where "_" was considered as an illegal character
    • Fixed missing message at /tglongmail
    • Fixed small error in default config file (admin group had thunderghast.usernode as node)
    Version 1.0:

    • Initial Release
    jasonznack likes this.
  2. Offline


    This may be beyond the planned scope of ThunderGhast (great plugin with a fun name, btw), but I run a fairly realistic survival RP server, and I'm trying to move away from commands as much as possible to keep immersion. Would there be a way to need a piece of paper in inventory to write a letter, and to designate a block of choice (customizable) as a "mailbox" (iron block, dispenser, etc.) that the recipient could click on to access the received mail?

    Also, I would love if this plugged into iConomy to add a cost to sending mail. While I'm greedily suggesting things.

    But seriously, thank you so much for this plugin! It adds an awesome new dimension to the game.
  3. Offline


    Could you also consider a general help command (/tg maybe) that lists the commands, this is what's preventing me from keeping it installed at this point.
  4. Offline


    I'm getting an SQL error on startup.

    Here's my SQL settings, any chance you could tell me if it's formatted correctly?

    ## This chooses where the program stores the emails.
    ## sqllite or mysql
    mail storage: mysql
    ## Settings for mysql (if used)
    ## Make sure the user can select, update, delete, and create a table!
    mysql location: mysql.xenonservers.com
    mysql username: kunden_61306
    mysql password: ********************
    mysql remote: false
    mysql database: thunderghast
    mysql mailtable: mails
    Should I add a "http://" in front of mysql.xenonservers.com?
  5. Offline


    Hmm, what kind of SQL error do you get, it should pick it up..
    Can you answer the following:
    - Is your port open
    - Is the mysql on the same server as the minecraft server
    - Does your account have rights to create a table, select, edit and delete records?

    Yes, i am working on that, i am adding a large amount of new things so its taking a little longer then i tough.

    Yes, i am currently also looking for a good way to store the strings so you can edit everything even the messages.

    As much as i like the idea, it is a bit out of the scope yes. Maby for the future
  6. Offline


    Woohoo! Thanks :D
  7. Offline


    Here's my error:

    2011-05-05 02:35:38 [SEVERE] [ThunderGhast] - SQLException! Access denied for user 'kunden_61306'@'%' to database 'thunderghast'
    2011-05-05 02:35:38 [SEVERE] [ThunderGhast] - SQLException! Access denied for user 'kunden_61306'@'%' to database 'thunderghast'
    2011-05-05 02:35:38 [SEVERE] null loading ThunderGhast v1.1 (Is it up to date?)
        at com.bukkit.hretsam.thunderghast.handlers.MysqlManager.doQuery(MysqlManager.java:101)
        at com.bukkit.hretsam.thunderghast.handlers.MysqlManager.initialize(MysqlManager.java:29)
        at com.bukkit.hretsam.thunderghast.ThunderGhast.initMailer(ThunderGhast.java:200)
        at com.bukkit.hretsam.thunderghast.ThunderGhast.onEnable(ThunderGhast.java:65)
        at org.bukkit.plugin.java.JavaPlugin.setEnabled(JavaPlugin.java:127)
        at org.bukkit.plugin.java.JavaPluginLoader.enablePlugin(JavaPluginLoader.java:632)
        at org.bukkit.plugin.SimplePluginManager.enablePlugin(SimplePluginManager.java:218)
        at org.bukkit.craftbukkit.CraftServer.loadPlugin(CraftServer.java:116)
        at org.bukkit.craftbukkit.CraftServer.loadPlugins(CraftServer.java:94)
        at net.minecraft.server.MinecraftServer.e(MinecraftServer.java:217)
        at net.minecraft.server.MinecraftServer.a(MinecraftServer.java:204)
        at net.minecraft.server.MinecraftServer.init(MinecraftServer.java:144)
        at net.minecraft.server.MinecraftServer.run(MinecraftServer.java:259)
        at net.minecraft.server.ThreadServerApplication.run(SourceFile:394)
    The SQL server isn't on the same host as my webserver, I can create, edit, etc. tables as I have mcMMO and LogBlock working on the same SQL server. As far as the port, I have no idea lol.
  8. Offline


    I still have trouble sending /tglongmail. my chat gets messed up when i try to send it and i have to restart the server to get it back so right now i just tell people to use /tgmail...which isn't all that useful.

    EDIT: I'm using Herochat.
  9. Offline


    Try to add :3306 at the end of the location
    so: "mysql location: mysql.xenonservers.com"

    Yes, there is an issue with the longchat if you use Herochat. i'm working on it
  10. Offline


    ok my first review of v1.1:
    + good idea ;)
    + a big plus is the mysql functionality!

    - missing ingame helpfile .. you get "you have x unread mails" ..and thats it, someone who does NOT know what to do will never be able to read the mails as there is no command listing. add atleast a "type /tgxxxxxxx to show unread mails" or sth like that ..same goes to /tgcheck .. you will never know, how to read these mails.
    - a check for invalid IDs is a basic thing you should have fix/write from start on, not putting it to "buglist" ;) even it is a work-in-progress plugin ..you are catching the wrong exception with "numberFormatException nfe" ..you should catch the null-pointer ;)
    - same goes to the already known bug with /tgreply # ..it is useless in that state of progress.
    - we are missing a useful command like /tgunread or sth, to read the next unread mail w/o changing to mailbox,listing and then read :)

    request/suggestion would also be.. add/link "/tgwrite" to /tgmail ..as tgwrite is making more sense ;)

    ps: it's written "sent" and not "send" if you are talking about past^^ -> "mail send"
  11. Offline


    Here is an idea for the optional wait period for a mail to be delivered. Grab the XYZ of sender, and the XYZ of recipient calculate the distance, and give a 1 second wait time for every 10 squares in distance.

    Impatiently patiently awaiting v1.2 :)
  12. Offline


    I agree, the ingame helpfile has been bugging me to.
    Also the exceptions it throws are bad i admit. And i am still wondering how i missed those.
    Thank you for the spelling error, you can see English is not my native language.

    For the rest (again). I been busy a lot with other things. My own server has been crashing a lot, i needed to fix that . As well as my personal life hasn't been helping lately.
    I found a new way to handle the SQL stuff. Which will speed up the update process, as testing and writing will go much faster this way.
    The flatfile support has been put on a hold for now (sorry to the ones who want that), but i strongly suggest to use sqllite as its much faster then flatfile could ever be!
  13. Offline


    Oh wow, looking good !
    Do you think you could add an option to set a price on mails? :)
  14. Offline

    White Sheep

    Compatibility with the Economy plugins:D
  15. Offline


    Or optionally it could consume an item, like paper in addition to iconomy money.
  16. Offline


    For some reason it won't connect to the SQL DB for me. I've put the correct IP with a port at the end but the log keeps showing that's it's trying to connect to the server's IP which is wrong. Remote is set to true and I've tried a number of different sql addresses but none work.

    Any help?
  17. Offline


    is there or will there be a option for people (limited with permissions) to send mails to all players like admins sending a mail to all players about a change of rules ect.
  18. Offline


    Considered inactive.
  19. Offline

    tha d0ctor

    anyone knowif thats works on 818/820?
  20. Seems to work ok for me on 819.
  21. Offline


    Does this work on 1.0.1?

Share This Page