[INACTIVE][INFO] Informant v1.6 - Basic Login message, MOTD and GeoIP [602]

Discussion in 'Inactive/Unsupported Plugins' started by MarkusNemesis, Jan 18, 2011.

  1. Offline

    MarkusNemesis

    [INFORMANT]

    tl;dr - a Plugin that displays an MOTD and the player list in a specified colour, as well as inform users of a new user. Can be set up to display user's name and country when joining

    Features:
    Config file can set MOTD (up to 5 lines) and the colour you want it to be exported as
    !infreload reloads the MOTD
    !motd displays MOTD again along with the playerlist (This Command can be edited in the informant.properties)
    !playerlist displays the playerlist (This Command can be edited in the informant.properties)
    Please note!:!motd and !playerlist will ONLY be set as the default, if you set them as active in your informant.properties file. e.g. to enable !motd, enter "motdcmd=" or "motdcmd=!motd". If you don't wish it to be !motd you can make it "motdcmd=!<anything you like>" and it will trigger the same as !motd. Same goes for !playerlist, you have to set it to use it. and you can set it to whatever you like.

    How-to:
    1. Install the informant.jar into your plugins directory and start and stop the server (creating the informant.properties file in the server root directory then /plugins/informant/<here>)
    2. Edit the informant.properties file to show "motd=Your MOTD Here"
    3. For multiple lines, line 2 would be "motd2=this is line 2" up to "motd5=this is line 5, the last line"
    4. Below that, type "colour=" and then 1 of 16 colours
    Code:
    black
    dark blue
    dark green
    dark aqua
    dark red
    dark purple
    gold
    gray
    dark gray
    blue
    aqua
    green
    red
    light purple
    yellow
    white
    
    5. the "!playerlist" command output can be customised using "playlistmsg=". e.g "playlistmsg=Current players are: " which will, when !playerlist is typed output "Current players are: MarkusNemesis"

    Inside your MOTD, you can have % codes:
    %p will display the connecting player's name. (e.g. "motd=Welcome %p!" will output "Welcome Markusnemesis!")
    %n displays the player count. (e.g. motd=Welcome %p, there are currently %n player(s) playing" will output "Welcome MarkusNemesis, there are currently 1 player(s) playing"
    %l resolves the user's IP address to a country. NEW!

    All of these outputs will be in the colour you chose.

    6. Server now informs others on the server of a user's first time when they join. This message is customised using "newusermsg=", e.g. "newusermsg=%p is new! say hi!"

    7. Player joining the server executes the new "playerjoined=" field in the properties file. playerjoined= uses the same %commands as all and displays to all players.

    How to disable features:
    Refer to the example informant.properties file below for an explanation as to how.

    EXAMPLE INFORMANT.PROPERTIES FILE

    WHEN UPGRADING VERSION, PLEASE RE-READ ALL OF THE ABOVE FOR CHANGES!

    DOWNLOAD Version 1.5
    Download Version 1.5.1 build #107
    Download Version 1.5.2 build #450 NOT BACKWARDS COMPATIBLE
    DOWNLOAD Version 1.6
    Download Version 1.6 build #470 !help now displays help
    Download Version 1.6.1 build #470 player list now displays on login if set to.
    Download Version 1.6.1 build #556 (Informant builds were based off bukkit builds, not craft bukkit builds... Has since been recompiled for craftbukkit #556)
    Download Version 1.6.1 build #602
    Download Version 1.6.2 build #602 (No new features, just bug fixes.)

    Any suggestions? please leave them below!

    Updated to CraftBukkit #81

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

    Joshf

    I can't seem to get the !playerlist command to change to /list, I tried to change the config and it didn't work.. /list is the command I used on this plugin before i updated it.
     
  3. Offline

    MarkusNemesis

    that os because it has to be !<something>
     
  4. Offline

    Michael314

    Well, no that's twisting my words, I didn't suggest server owners weren't savvy. If someone is running a server without being savvy enough to edit a config file they have much bigger issues to face and probably should join another server community.

    Right, this is the "you could just read the first post and see the changes" argument. It works for one plugin - and those that don't think about it probably do wonder why people don't read every post in the thread for each plugin. The reason is, it doesn't scale. How much text to you expect in the MOTD to cater for every "you can simply put this in the MOTD" idea?

    I'm about to write a long 'here are some of the commands you have' blog post to that end, but it won't fit in an motd, and I still only expect a small %age to read it.

    Yeah, TBH I agree with you, I'm slowly replacing plugins with my own that do what I want, no matter how ugly, in the same vein - it's easier than messing about with broken plugins someone else wrote. I figure this idea is junk anyway longer term, and the evidence is the pain the rear trying to get bukkit, craftbukkit and a mere handful of plugins working together. The idea that one day it'll be more stable with a pretty website of plugins is just a fantasy.

    If Notch is sane he'll add most of the obvious stuff to the game, and if he has plugins at all - he'll probably opt for something that doesn't require a lot of compiling and messing around (and certainly not something that requires decompiling his game first) - lua or v8 javascript or whatever else.

    So I'd suggest probably the best idea for a bukkit plugin is one that does that, bind it with node.js - the author scratches his "my-plugin-does-everything" itch, and the rest of us can just c&p what scripts we need. But once you think of that you're thinking "why bother with bukkit at all?" - just bind minecraft.

    Good luck with it anyway.
     
  5. Offline

    Donny

    Code:
    motd=Currently %n player(s) online.
    newusermsg=Please welcome new user: %p.
    playerjoined=%p has joined from %l
    Currently Im getting "Person has logged in from: N/A"

    But when new users join it says it correctly "Person has joined from Ukraine"
    Could this be an error on my pervusers.list?
     
  6. Offline

    MarkusNemesis

    That is because you're connecting to the server via LAN, so you pass your LAN IP to the server, which obviously cannot resolve it, as a LAN IP has no geological affiliation.
     
  7. Offline

    Donny

    I see. Actually it must be my dyndns.com settings. I have a dns there and it forwards users to my ip. To make it work I would have to give my dynamic ip or get a static public one?

    Let me refraise that. Is there any way I can change my settings to make it work?

    So I asked my players and the ones who show n/a are the ones joinng my actuall ip "example 11.11.111.1"
     
  8. Offline

    MarkusNemesis

    can you in any way get the actual IP it says when you connect? the server console will say it.
     
  9. Offline

    Donny

    yes I see all their ips. I just tested both my ips (dynamic and the one that forwards it to my dynamic) and they both gave n/a

    The wierd thing is new users give the correct GeoIP but they can leave and rejoin and i get N/A
     
  10. Offline

    MarkusNemesis

    yes but what are the IPs?
    [MERGETIME="1299874653"][/MERGETIME]
    the Geo IP only covers normal IPs, no idea how it treats spiffy IPs etc.
     
  11. Offline

    fneyret

    Hi.
    While this is enabled (displayPlayers=true), I have no list of players connected at login.
    I specify that the command !playerlist works fine.

    EDIT : build 493
     
  12. Offline

    MarkusNemesis

    try removing "displayPlayers=true" all together, it defaults as "true"
     
  13. Offline

    fneyret

    It does not work either :/
     
  14. Offline

    MarkusNemesis

    Hmm, okay, ill look into it further.
     
  15. Offline

    fneyret

    Thank you :)
     
  16. Offline

    MarkusNemesis

    oh, can you also put your entire properties file into here please? thanks.
     
  17. Offline

    fneyret

    Sure !

    Code:
    motd=Bienvenue sur Avoryon %p !
    
    colour=gold
    playlistmsg=Joueurs en ligne :
    newusermsg=%p est un nouvel arrivant sur Avoryon ! Bienvenue !
    playerjoined=%p vient de se connecter
    
    playerlistcmd=!playerlist
    motdcmd=!showmotd
    
    admins=fneyret, //List of admins, this enables them to use the !infreload command. MUST have a trailing comma.
    
    displayMOTD=true //true by default, displays MOTD on login
    displayPlayerjoin=true //true by default, displays a player join message
    
     
  18. Offline

    MarkusNemesis

    ah, see, i found your problem already. Remove the comments in the properties file, the parser doesn't actually acknowledge comments yet :p
     
  19. Offline

    fneyret

    I just tried, but it did not seem to work.
    Code:
    motd=Bienvenue sur Avoryon %p !
    
    
    colour=gold
    playlistmsg=Joueurs en ligne :
    newusermsg=%p est un nouvel arrivant sur Avoryon ! Bienvenue !
    playerjoined=%p vient de se connecter
    
    
    playerlistcmd=!playerlist
    motdcmd=!showmotd
    
    
    admins=fneyret,
    
    
    displayMOTD=true
    displayPlayerjoin=true
     
  20. Offline

    MarkusNemesis


    okay, STILL looking into it.
    [MERGETIME="1299889212"][/MERGETIME]
    Version 1.6.1 Here
     
  21. Offline

    fneyret

    It works! Well done and thank you :)
     
  22. Offline

    BioRage

    Thanks for Version update,

    this dosen't work though for some reason.

    to display the MOTD again,

    playerlistcmd=/playerlist
    motdcmd=/motd
     
  23. Offline

    MarkusNemesis

    If you read the OP again like i said in all caps and red, you will find that the commands can no longer be set to /<command>, they HAVE TO BE set to !<command>

    So in your case, it HAS to be !playerlist and !motd.
     
  24. Offline

    Zhalix

    I seem to get the following error:
    Code:
    01:22:32 [SEVERE] Could not pass event PLAYER_JOIN to Informant
    java.lang.NullPointerException
            at java.util.regex.Matcher.appendReplacement(Unknown Source)
            at java.util.regex.Matcher.replaceAll(Unknown Source)
            at java.lang.String.replaceAll(Unknown Source)
            at com.markusnemesis.informant.informant.resolvePercents(informant.java:
    579)
            at com.markusnemesis.informant.informantPlayerListener.onPlayerJoin(info
    rmantPlayerListener.java:44)
            at org.bukkit.plugin.java.JavaPluginLoader$1.execute(JavaPluginLoader.ja
    va:162)
            at org.bukkit.plugin.RegisteredListener.callEvent(RegisteredListener.jav
    a:59)
            at org.bukkit.plugin.SimplePluginManager.callEvent(SimplePluginManager.j
    ava:255)
            at net.minecraft.server.ServerConfigurationManager.a(ServerConfiguration
    Manager.java:98)
            at net.minecraft.server.NetLoginHandler.b(NetLoginHandler.java:87)
            at net.minecraft.server.NetLoginHandler.a(NetLoginHandler.java:27)
            at net.minecraft.server.NetworkListenThread.a(SourceFile:87)
            at net.minecraft.server.MinecraftServer.h(MinecraftServer.java:357)
            at net.minecraft.server.MinecraftServer.run(MinecraftServer.java:272)
            at net.minecraft.server.ThreadServerApplication.run(SourceFile:366)
    >
    And I'm not quite sure on what to do with it..
     
  25. Offline

    MarkusNemesis

    please post your informant.properties file and what build of craft bukkit you're running. Cheers.
     
  26. Offline

    Zhalix

    I currently use the development snapshot of 12 March 2011, 19:46GMT.
    *edit* Also tried the recommended build, without any difference.
    This is how my informant.properties file looks like.


    motd=Welcome to my server %p
    motd2=You have connected from %l
    motd3=There are currently %n player(s) online currently.

    colour=aqua
    playlistmsg=Currently playing are:
    newusermsg=%p is new to the server! Say hi!
    playerjoined=%p has connected from %l

    playerlistcmd=!playerlist
    motdcmd=!showmotd

    admins=Zhalix,

    displayPlayers=true
    displayMOTD=true
    displayPlayerjoin=true
     
  27. Offline

    MarkusNemesis

    running build #548 and your properties file, no issues whatsoever. Try re-downloading Informant 1.6.1 and see what it does.
     
  28. Offline

    Zhalix

    Ah I have found the problem! It seems my system automaticly removed the geoIP.dat file after copying it to my server folder. Problem solved! Cheers mate!
     
  29. Offline

    Bronski

    Sorry if this has been addressed, but are there any plans to allow changing the MOTD when logged into the game?

    Thanks :)
     
  30. Offline

    MarkusNemesis

    Via the !commands? I plan on it, should be out with 1.7. :)
     
  31. Offline

    ToshNeox

    Hi, I just wanted to know what the setting is to stop writing where the player connected from. I would like to turn it off :)
     

Share This Page