[CHAT] IRCraft v2.0 - Connecting MineCraft/Bukkit with IRC [1185]

Discussion in 'Inactive/Unsupported Plugins' started by naresh97, Aug 4, 2011.

  1. Offline

    naresh97

    IRCraft - Connect Your Server with IRC

    Latest Update -26/09/11 GMT+8
    Version - 2.1 Beta 2


    Description - IRCraft connects your Bukkit server to an IRC server so that all MineCraft messages can be seen in IRC and vice versa.

    Installation
    To install IRCraft, just download the IRCraft.jar (See Downloads Below) and place it into your CraftBukkit plugins folder.

    Usage
    Using IRCraft is very easy, after installing, run Bukkit once and IRCraft will generate a config.yml which can be found in
    from your main CraftBukkit directory.
    Assuming you know how to use YAML, replace

    Commands
    Version 2.0
    Permissions
    For server admins, make sure you have included

    into your permissions file.


    Changelog
    Download

    Direct (DropBox)
    Direct (From Bukkit)



    If you liked this, or any other of my plugins, please donate to aid me in continuing my development.
    [​IMG]
     

    Attached Files:

    Sonorpearl likes this.
  2. Offline

    WoodenAxe

    can you fix the dropbox link to be a public link? I'm getting a 403.
     
  3. Offline

    naresh97

    Portforward is for incoming connections, IRC from a client is outgoing.

    If it shows IRCraft V2.0 Successfully enabled, it means, it has successfully connected to the network. Try doing a /whois lookup on your LCBot.
    This should show whether the bot is connected to the network, or not.

    Did you set correct default channel in your config.yml file? Paste your config.yml as a reply, let me take a look.
     
  4. Offline

    AinSophAur

    Can you tell me how you got pircbot to execute without a main method? Whenever I use try and catch in the code I'm always getting a problem. If you don't want to share any code thats fine, I just need a hint.
     
  5. Offline

    davedavy

    Here you go:

    Code:
    #Thank You For Using IRCraft.
    #
    #What these configs mean:
    #nick: The name that you want the IRC bot to appear as.
    #channel: The channel that you want the bot to join.
    #server: The server that you want the bot to join.
    #
    #Nareshkumar Rao - [email protected]
    port: 6667
    verboseMode: false
    nick: LCBot
    password: *********
    channel: '#libertycraft'
    network: irc.gamesurge.net
    
    And /whois LCBot:

    Code:
    LCBot: No such nickname online.
     
  6. Offline

    naresh97

    I don't really understand "main method". You must have an instance of PircBot which must be used throughout the code which should be initialized in onEnabled.

    example

    Code:
    void onEnable()
    {
        PircBot bot = new PircBot();
    }
    I've only faced Try/Catches when trying to connect using PircBot.connect();
     
  7. Offline

    AinSophAur

    Yes I have the instance of Pircbot onEnable() just like you say and when I do the bot.connect(); it asks to surround it with Try/Catch, which I do. Whenever I export the .jar and run the server I get the following:

    Code:
    [SEVERE] Could not load 'plugins\AinSophAur.jar' in folder 'plugins':
    java.lang.NoClassDefFoundError: org/jibble/pircbot/NickAlreadyInUseException
        at java.lang.Class.forName0(Native Method)
        at java.lang.Class.forName(Unknown Source)
        at org.bukkit.plugin.java.JavaPluginLoader.loadPlugin(JavaPluginLoader.java:168)
        at org.bukkit.plugin.SimplePluginManager.loadPlugin(SimplePluginManager.java:207)
        at org.bukkit.plugin.SimplePluginManager.loadPlugins(SimplePluginManager.java:130)
        at org.bukkit.craftbukkit.CraftServer.loadPlugins(CraftServer.java:128)
        at org.bukkit.craftbukkit.CraftServer.<init>(CraftServer.java:97)
        at net.minecraft.server.ServerConfigurationManager.<init>(ServerConfigurationManager.java:51)
        at net.minecraft.server.MinecraftServer.init(MinecraftServer.java:132)
        at net.minecraft.server.MinecraftServer.run(MinecraftServer.java:335)
        at net.minecraft.server.ThreadServerApplication.run(SourceFile:422)
    Caused by: java.lang.ClassNotFoundException: org.jibble.pircbot.NickAlreadyInUseException
        at java.net.URLClassLoader$1.run(Unknown Source)
        at java.security.AccessController.doPrivileged(Native Method)
        at java.net.URLClassLoader.findClass(Unknown Source)
        at org.bukkit.plugin.java.PluginClassLoader.findClass(PluginClassLoader.java:36)
        at org.bukkit.plugin.java.PluginClassLoader.findClass(PluginClassLoader.java:24)
        at java.lang.ClassLoader.loadClass(Unknown Source)
        at java.lang.ClassLoader.loadClass(Unknown Source)
        ... 11 more
    The bot doesn't make the connection to the IRC and I know for a fact that the nickname isn't in use in the IRC. When I comment out the NickAlreadyInUseException catch, it gives me the same error with the next exception which is IRCException or IOException.

    Of course I caught the exception and did log.info(e.getMessage()); on each of the catch statements to print it from the catch but I really don't get how you got yours to work or what the problem with mine is.
     
  8. Offline

    naresh97

    Oh of course, you just didn't add the PIRCBot code to your JAR.

    If you downloaded PircBot in a Jar File. Open it up in WinRAR/7Zip and you should see a folder "org", drag that into your AinSophAur.jar and it should work

    Try Connecting to the default IRC Network and channel. Those it work?

    Default: irc.mozilla.org #IRCraft

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

    simcop2387

    The best resource I can find for that is http://stackoverflow.com/questions/1391610/embed-mirc-color-codes-into-a-c-literal/1391632#1391632

    A simple mapping of them might be
    IRC <-> Minecraft
    0 <-> f
    1 <-> 0
    2 <-> 1
    3 <-> 2
    4 <-> 4
    5 -> 6 //This one isn't that great, brown and gold, one way because of that
    6 <-> 5
    7 <-> 6
    8 <-> e
    9 <-> a
    10 <-> 3
    11 <-> b
    12 <-> 9
    13 <-> d
    14 <-> 8
    15 <-> 7
    4 <- c // Another that's not great, light red to plain red

    more info here, mostly the top one
    http://www.mirc.com/colors.html
    http://www.minecraftforum.net/topic/118983-minecraft-text-colors/
     
  10. Offline

    AinSophAur

    Your right that fixed it. Thanks for the help.
     
  11. Offline

    naresh97

    Probably, in later releases, after I iron out all the creases. xD

    Fixed. Thanks for Informing Me.
     
  12. Offline

    davedavy

    I dont know :p I dont think so. Jup , it works on your irc channel...

    Code:
    17:30:24 [INFO] [IRCraft]: Connecting to irc.mozilla.org with nick: LCBot
    17:30:39 [INFO] Read timed out
    17:30:49 [INFO] [IRCraft]: Version 2.0 Enabled Successfully
    17:30:49 [INFO] [IRCraft]: Developed by Nareshkumar Rao
    17:30:49 [INFO] [IRCraft]: For MineCraft Beta 1.7.3
    17:30:49 [INFO] [IRCraft]: And Bukkit 1060
    
     
  13. Offline

    naresh97

    So you can see the MineCraft bot on my IRC Channel? That means it must be a problem with your network, check the port settings, maybe it uses a different port. Is the password correct? Is the default channel correct?
     
  14. Offline

    thernztrom

    So can you set this up to *globally send all messages from the chat to the irc, and all *irc messages sended to everyone on the server?
     
  15. Offline

    naresh97

    That's exactly what this plugin does my friend. Everything you say in Chat will be sent to all IRC Channels the bot is connected to. And from all those channels, any messages sent will be shown in chat.


     
  16. Offline

    WoodenAxe

    couple random requests...
    1. i'm using spamhammer, which is all good, except if someone get's muted with it, those messages still flood the IRC and eventually the IRC server kicks/mutes/blocks the server bot for message flooding. Any way to respect mutes? Or maybe just build in some basic rate limiting to prevent the extreme flood.
    2. Some basic string replace to kill off the color codes on names at least would be fantastic. All of my player names have up to 3 colors for prefix, name, suffix and it looks like a mess in IRC.
    3. A simple command to get the list of players in MC from the IRC channel... !players or something...
     
  17. Offline

    naresh97

    These are all very good requests, I'm working on the color codes thing already, the other could be implemented in v2.1, as you can see in my previous posts, I DO implement almost every request given.
     
  18. Offline

    ags131

    Ive noticed something that may be a bug: In the config.yml, when i set channel to '#mcags' it wont connect, but 'mcags' does. Is this a IRChat bug or freenode's system? (I use chat.freenode.net)
     
  19. Offline

    naresh97

    This is NOT a bug, it is different on every system. On the Mozilla network for example, channels have to begin with a #
     
  20. Offline

    ags131

    I have a feature request: I sometimes watch the McMyAdmin chat when online and IRC at other times. Could you set it to where all irc messages are also showed in the console? Currently, i can see minecraft chat from console, but not the IRC responses.
     
  21. Offline

    mrgreaper

    ok im very new to irc but want a way to chat with my players at work where bandwidth restraints make logging in a pain. heres what i want to do
    1) get a dedicated channel and maybe server ran from our server pc (that beyond the scope of here but google will help with that :) )
    2) have the irc channel passworded so only our players have access to it
    3) have each player that types in minecraft hve the text come out into irc with username and colour codes intact
    4) have what ever i type into irc apear ingame with the irc nickname attached
    5) some sort of security to stop people not me using my nickname

    now 1 is something i need to google
    is 2 3 and 4 doable with your plugin?
    is 5 possible?
    and what is the weblink for nickserv it says i need to register manualy but no link to the site
     
  22. Offline

    ags131

    1 is easily done with freenode.net, 2 is also easily done useing freenode.net, 3 & 4 chat is twoway BUT colors dont work, yet. You can still send &<color> from the IRC to game and it show but wont work from game to IRC. 5 Also using freenode.net (Register nickname with password)
    Im currently using freenode and admins can watch via IRC while players can chat back and forth.
     
  23. Offline

    naresh97

    To do this, please set Verbose to true in config.yml.
     
  24. Offline

    mrgreaper

    thnx majorly appreciated

    though looking through the terms of use games player use is discouraged and doesnt fall into any of the catagorys
     
  25. Offline

    ags131

    Game modding discussion is discouraged, I saw nowhere in their that prohibitted use of a bot. (IRCraft is technically an IRC Bot.) As far as I know, there is noting limiting the use of bots. Ive actually got two channels, one main channel for server discussion, and one other channel used for ingame chat.
     
  26. Offline

    mrgreaper

    ah i`ll give it a better look when more awake :)
     
  27. Offline

    Fendelgast

    I have a small server, with 10-15 people on during peak hours, is there a way to prevent the IRC bot from timing out ? I see
    Code:
     has quit [Ping timeout: 204 seconds]
    after a few min of inactivity of chat on the server
     
  28. Offline

    AinSophAur

    You might want to say which IRC server your using. I know some servers will kick you out after a certain period of time to stop people from idling.
     
  29. Offline

    Fendelgast

    Esper.net
    Esper.net, I've already spoken to the network team and they stated, that the issue was caused when the server pings the client to verify connectivity, if there are more than 3 failed requests it disconnects the client

    I'm also somewhat new, sorry for missing needed information
     
  30. Offline

    AinSophAur


    Lol no need to apologize, thing about IRC servers is that they might not all run on the same daemon and have weird settings like that. Most of the people take things for granted and assume all IRC servers run on the UnrealIRCd and don't really expect these kind of scenarios . As for the problem your having with your bot disconnecting, I would suggest you try a different IRC server that runs on the UnrealIRC daemon and won't take you by surprise with these kind of issues.

    In the worst case, if you have your own dedicated server you can host your own IRC server + services and just have your bot connect to your root ip and give it it's own o-line if you wish. There are plenty of other IRC servers you can try though and that would be a better option since all you need are a few channels at the most, not an entire IRC network to look after. ;)
     
  31. Offline

    naresh97

    The core PIRCBot replies server pings by default. I have checked. Thank you for staying loyal to IRCraft. New version 2.1 will not coming until next week as I will be off on holiday.
     

Share This Page