[Admin/Chat/Dev] MinecraftIM v0.2 - Get IM notifications, send chat messages through IM [1000]

Discussion in 'Inactive/Unsupported Plugins' started by jascotty2, Mar 24, 2011.

  1. Offline

    jascotty2

    Minecraft Messenger (MinecraftIM) - a server IM interface
    Version: 0.2
    Download: Minecraft IM.jar
    Source: GitHub

    Provides an Instant Messenger interface for your server
    Intended for those who have a small server (like me) and want to know when a friend gets on

    it expects to be the only program using the login you give it, so you should probably create one for it
    a configuration file is created on first start, or you can make a folder "MinecraftIM" in your plugins folder & save the file from https://github.com/jascotty2/Minecraft-IM/blob/master/src/config.yml

    Features:
    • Single-user
    • Supports: AIM, GTalk, Jabber
    • messages on player login & logoff
    • chat through IM
    • console commands through IM
    • multi-line responses are condensed to a single message
    API (open)


    API :D
    Code:
    // to get plugin:
    if (this.getServer().getPluginManager().isPluginEnabled("MinecraftIM")) {
    	MinecraftIM messenger = (MinecraftIM) this.getServer().getPluginManager().getPlugin("MinecraftIM");
    }
    // to send messages to the main user:
    messenger.sendNotify("message"); // will automatically format color formatting :)
    
    // to intercept chat messages (will need the plugin as a libary in your manifest):
    (your class)  implements ChatMessageHandler
    
    public interface ChatMessageHandler {
        /**
         * Called when MinecraftIM receives a message from the authorized user
         * @param message what was received
         * @return if this method used the command, and don't do anything else
         */
        public boolean messageHandled(String message);
        /**
         * Called after any message received
         * @param fromUser what username this message came from
         * @param message what was received
         * @return if this method used the command, and don't do anything else
         */
        public boolean messageHandled(String fromUser, String message);
    }
    // then:
    messenger.registerMessageHandler(your class);
    


    Known Bugs:
    the AIM client sometimes does not recieve a message..... fixed in 0.1.1 :)
    when receiving a multiline response from a plugin, each line is 2 seconds apart
    - made faster with multi-line condensing
    if you're using AIM with recieveChat, will eventually quit receiving anything (including command output)
    - if this happens, " /mmess reload" will tell it to reload the messenger (may take a few moments)
    - don't know if this bug occurs with the new aim handler

    TODO:
    add more protocols ?
    more users to send notifications to ?
    list of users to check for login (and ignore others) ?
    custom player-created "pounces" to notify when a given player logs in (w/ permissions) ?

    Changelog:


    Version 0.2 - 8/11/11
    AIM toc handler classes changed - now works with AIM again :D
    - old method quit working about 7/20/11 17:10GMT for reasons still unknown
    now chat ignores auto-responses
    XMPP protocol added.. for now, just GTalk & Jabber
    - may add custom xmpp, if someone needs

    Older Changes (open)


    Version 0.1.6 - 6/24/11
    blocked aolsystemmsg
    removed "from" from login notifications
    changed offline message handling to allow condensed messages (instead of individual)
    resolved (most) reconnect duplication errors & made more /reload friendly
    added kick event notification (instead of logout)
    added custom timestamp config, with custom timezone

    Version 0.1.5 - 4/1/11
    617 compatibility

    Version 0.1.4 - 3/29/11
    fixed double-newline
    fixed null pointer exception on start

    Version 0.1.3 - 3/28/11
    removed some debug output
    long (multi-line) messages condensed to single messages
    messages longer than limit (1024 chars in aim) are split into multiple messages
    color formatting is optional
    fixed auto-response for public users

    Version 0.1.2 - 3/27/11
    the user set as sendTo can send commands as op and retrieve the output from the command (requires a newer build of bukkit.. does not work with 531 & lower)
    if chat is turned off, there is a configurable time after sending a chat message that you can recieve a reply

    Version 0.1.1 - 3/25/11
    message queue, so can get messages if the recipiant is offline once they login
    figured out the missed message bug :)a custom command register method added for API

    Version 0.1 - 3/25/11
    Initial Release
     
  2. Offline

    pRagmata

    Hello,

    Maybe I am doing something wrong, but I am getting some errors when trying to run this plugin. This error will keep repeating every couple minutes.
    Show Spoiler
    Code:
    20:17:11 [SEVERE] *** AIM ERROR: 904 ***
    20:17:11 [SEVERE] ERROR:904
    20:17:11 [INFO] ERROR:
    20:17:11 [INFO] An unknown error has occurred.
    20:17:11 [SEVERE] ERROR: failed to handle aim protocol properly
    java.util.NoSuchElementException
            at java.util.StringTokenizer.nextToken(Unknown Source)
            at com.levelonelabs.aim.AIMClient.fromAIM(AIMClient.java:990)
            at com.levelonelabs.aim.AIMClient.run(AIMClient.java:416)
            at java.lang.Thread.run(Unknown Source)
    20:17:30 [SEVERE] *** AIM ERROR: java.io.EOFException ***
    20:21:57 [INFO] *** AIM -- CONNECTION PROBLEM(Mon Apr 11 20:21:57 PDT 2011): Con
    nection was not verified!
    20:21:57 [INFO] ****** Assuming it was dropped, issuing restart.
    20:22:02 [INFO] Done with AIM logon
    20:22:11 [SEVERE] *** AIM ERROR: 904 ***
    20:22:11 [SEVERE] ERROR:904
    20:22:11 [INFO] ERROR:
    20:22:11 [INFO] An unknown error has occurred.
    20:22:11 [SEVERE] ERROR: failed to handle aim protocol properly
    java.util.NoSuchElementException
            at java.util.StringTokenizer.nextToken(Unknown Source)
            at com.levelonelabs.aim.AIMClient.fromAIM(AIMClient.java:990)
            at com.levelonelabs.aim.AIMClient.run(AIMClient.java:416)
            at java.lang.Thread.run(Unknown Source)
    20:22:30 [SEVERE] *** AIM ERROR: java.io.EOFException ***
    


    It appears to start working at the start of the load but I get the above error after the plugins have completed loading. Here is the startup of the plugins:
    Show Spoiler
    Code:
    20:06:52 [INFO] [MinecraftIM] Starting Version 0.1.5
    20:06:52 [INFO] [MinecraftIM] Config Loaded
    20:06:57 [INFO] Done with AIM logon
    20:06:58 [INFO] [MinecraftIM] Connected to IM account
    20:06:58 [INFO] [MinecraftIM] sending connect confirm to <redacted>
    


    And here is my config:
    Show Spoiler
    Code:
    ##########################################
    ##  Minecraft Messenger Configuration   ##
    ##########################################
    
    #supported: AIM, SKYPE
    protocol: aim
    
    #account info for the plugin to use
    username: <redacted: my secondary email that is my aim login>
    password: <redacted>
    #what account will be given notifications & allowed to send chat messages
    sendto: <redacted: my primary email that is another aim login>
    # what should be displayed as the sender name
    DisplayName: Console
    
    #recieve notifications for login & logout?
    notifyOnPlayer: true
    # use html formatting? (for aim.. if html causes a long message, will have to send several)
    formatColors: true
    
    #recieve chat messages?
    recieveChat: true
    #if disabled, will enable for a timespan after sending a chat message
    #   positive integer values only, units being s(econds) m(inutes) h(hours) (default: m)
    tempChat: 3m
    # whether anyone (not just authorized username) can chat with the server
    # uses tempChat as a response threshold
    publicChat: false
    #what to show after a public username
    publicSuffix: ' (AIM)'
    
    
    #send confimation back? (should no longer be nessesary)
    pingReply: false
    #what to send back (blank is fine)
    pingResp:
    


    If I have missed something easy I apologize for wasting your time, but I really want to get this plugin working. It would be really handy for me and I think it's a great idea! This will be nice for me to have as there isn't a Blackberry app out there for minecraft like the Android one and I can get AIM on my BB.

    Are there any known plugin compatibility issues? I am using CB670 with a myriad of other plugins.

    Thanks.
     
  3. Offline

    ibigpapa

  4. Offline

    WolwX

    really interesting !

    I wish you will add more instant messenger client and I will use your plugin ! :D
     
  5. Offline

    allisgood888

    I tried linking aim and skype to it, but I never receive messages.
     
  6. Offline

    jascotty2

    sorry, i never removed the skype comment from the config:
    i tried to add skype compatibility, but could not get it to work
    gizmo says he's going to make a skype interface once i add a custom protocol

    (but that will be some time, sorry :()
     
  7. Offline

    grizzlymann

    When this plugin is reloaded does it sign out, then back into AIM? I keep getting spammed with a multiple logins issue.
     
  8. Offline

    Nananea

    I think you need to use 2 separate AIM accounts. I had to at least.
     
  9. Offline

    grizzlymann

    @Nananea
    Yea I am using a separate AIM account for the server, and my own. I'll try reinstalling the latest version again and give it another try.


    Would it be possible for it to issue the AIM command to log the account off of all other locations? I think it just has to send '1' but I could be wrong.
     
  10. Offline

    allisgood888

    When i was logged into AIM, i did not receive any messages from someone,do i need to add an account on my aim or something?
     
  11. Offline

    allisgood888

    No matter what I type in for my aim username nothing works... I try talking ingame, relogging etc, I already configured it.
     
  12. Offline

    MrZoraman

    Why does this message spam everywhere? (Aim, Console, In-game)

    2011-04-28 21:11:09 [INFO] [MinecraftIM] <MrZoraman (AWAY)> Unauthorized!
    2011-04-28 21:11:09 [INFO] [MinecraftIM] <MrZoraman (AWAY)> Unauthorized!
    And so on, endlessly.

    I don't even modify my config file. This shows up when I'm logged in and out of Aim.
     
  13. Offline

    atung323

    Just a small question, what's the difference between the "username/password" fields, and the sendto? Like, is the username/password your AIM account, and should sendto be your Minecraft name?

    An error message says that the username and sendto can't be the same, so I'm assuming that they're supposed to be different. :p
     
  14. Offline

    Wulfspider

    Don't die little plugin! I need you!
     
  15. Offline

    Nananea

    Agreed...it's so helpful :(
     
  16. Offline

    jascotty2

    not dead, and still functioning :)

    just forward development is being slow.. i'm in the middle of ~3 - 5 i'm working on at the same time :(
     
  17. Offline

    jascotty2

    haven't had much time to add another protocol, but i made a few improvements & wanted to get these out :)
    i have some other plugins to finish (sorry) but will get back to this if i finish in the next week

    Version 0.1.6
    blocked aolsystemmsg (that got annoying.. think i'll add a blacklist, too)
    removed "from" from login notifications
    changed offline message handling to allow condensed messages (instead of individual)
    resolved (most) reconnect duplication errors & made more /reload friendly
    added kick event notification (instead of logout)
    added custom timestamp config, with custom timezone
     
  18. Offline

    weixing

    I can't send and recieve chat msg.
    It shows that my chat for my server (AIM) is offline
    Any ideas?
     
  19. Offline

    paste120

    Is it possible to color the display name?
     
  20. Offline

    XoX

    I just keep getting this every time it tries to connect

    2011-06-29 17:40:03 [SEVERE] *** AIM ERROR: java.net.SocketException: socket closed ***
     
  21. Offline

    UnitZero

    It was working for me for a several days and now out of nowhere i said this error several times and died:

    2011-07-20 20:14:03 [INFO] *** AIM -- CONNECTION PROBLEM(Wed Jul 20 20:14:03 UTC 2011): Connection was not verified!
    2011-07-20 20:14:03 [INFO] ****** Assuming it was dropped, issuing restart.
    2011-07-20 20:14:45 [SEVERE] *** AIM ERROR: java.net.SocketException: Socket closed ***

    I restarted server, deleted the entire plugin but with no success.
    I dont get any errors anymore, its says its connected in the log but the AIM is actualy offline, it says its connected even though i changed login accout to a nonexisting one.

    2011-07-20 21:15:10 [INFO] [MinecraftIM] Config Loaded
    2011-07-20 21:15:30 [INFO] [MinecraftIM] Connected to IM account
    2011-07-20 21:15:30 [INFO] [MinecraftIM] sending connect confirm to *myAIM*

    When i try to connect to server-side AIM myself it works well.
     
  22. Offline

    jascotty2

    i started having that problem 2 hours ago... just logged off & wouldn't get back on even with a server restart
    i hope aim hasn't changed the toc protocol again... it was hard to get working as it was :(
     
  23. Offline

    UnitZero

    Any solution yet?

    I so miss this great plugin!
     
  24. Offline

    jascotty2

    good news to all who want to use this plugin (again) ! :D
    got to working on this again earlier this week, and finally have it working again :D

    Version 0.2
    AIM toc handler classes changed - now works with AIM again :D
    • old method quit working about 7/20/11 17:10GMT for reasons still unknown
    • however, the classes now make the plugin 1.5M... sorry about that ;)
      (may see about removing any that don't get used..)
    now chat ignores auto-responses
    XMPP protocol added.. for now, just GTalk & Jabber
    - may add custom xmpp, if someone needs

    if git hasn't changed the links yet, try the alternate download
     
  25. Offline

    Nananea

    I freaking love you.
     
  26. Offline

    turtledude01

    i dont use aim or any of the im versions this plugin uses...i use hotmail...if u could get hotmail to work with it then i would love it...thanks
     
  27. Offline

    Tezcacoatl

    How do I send messages to the server from my AIM? I've got it connected, according to the server cmd. Now what do I do?
     

Share This Page