• Log in or sign up for an account here: https://www.sythe.org/login

IRC Bot launguage?

sm321

Grand Master
Joined
Nov 2, 2011
Sythe Gold
0
Messages
2,514
IRC Bot launguage?
If you make an IRC bot, what language is it written in? I read an article and it said:

Write your own bot. To write your own bot you will need to know prior programming language. HTML or CSS don't count, as they are markup languages and can't be used to run a bot. Here are many of the programming languages used to develop bots: PHP, Python, C/++, Perl, and Java. Provided you know how to write in any of these programming languages, the steps below will guide you on writing your bot.

The rest of the article can be found here http://www.wikihow.com/Develop-an-IRC-Bot. But what is actually the best? Thankyou.
 
IRC Bot launguage?
Whatever you like the best. If you don't have any programming experience I would go with python.

Are there any that are more reliable? E.g. quicker less likely to crash etc?
 
IRC Bot launguage?
C++ is probably the most stable but then it's the hardest.
 
IRC Bot launguage?
pirc bot is a Java implementation that's very easy to use.
 
IRC Bot launguage?
Are there any that are more reliable? E.g. quicker less likely to crash etc?

For something as simple as IRC bots, it's heavily dependant on how well the bot was programmed. Yes, python can be slow, but it can also do perfectly fine for things like this. As for crashes, this sounds again like programming flaws.
 
IRC Bot launguage?
pirc bot is a Java implementation that's very easy to use.

Ok, thankyou.

For something as simple as IRC bots, it's heavily dependant on how well the bot was programmed. Yes, python can be slow, but it can also do perfectly fine for things like this. As for crashes, this sounds again like programming flaws.

I haven't actually made anything yet, but I was wondering what was the most stable and quickest.
 
IRC Bot launguage?
Here's a dicing script I made a month or so ago for shits and giggles. Very basic but uses the PircBot Framework/API.

Source :

Code:
import java.io.IOException;
import java.util.logging.Level;
import java.util.logging.Logger;
import org.jibble.pircbot.IrcException;
import org.jibble.pircbot.NickAlreadyInUseException;
import org.jibble.pircbot.PircBot;

/*
 * To change this template, choose Tools | Templates
 * and open the template in the editor.
 */

/**
 *
 * @author Owner
 */
public class iDiceMain extends PircBot{
    
    
    public static void main(String[] args) {
            iDice dice = new iDice("irc.sythe-irc.org", "#test");
            dice.setVerbose(true);
    }
}

Code:
import java.io.IOException;
import java.util.Random;
import java.util.logging.Level;
import java.util.logging.Logger;
import org.jibble.pircbot.IrcException;
import org.jibble.pircbot.PircBot;

/*
 * To change this template, choose Tools | Templates
 * and open the template in the editor.
 */

/**
 *
 * @author iJava
 */
public class iDice extends PircBot {
    
    String rollAmountString[];
    int rollAmount, rolledNumber = 0;
    public iDice(String hostname, String channel) {
        try {
            this.setName("iDice");
            this.connect(hostname);
            this.joinChannel(channel);
        } catch (IOException ex) {
            Logger.getLogger(iDice.class.getName()).log(Level.SEVERE, null, ex);
        } catch (IrcException ex) {
            Logger.getLogger(iDice.class.getName()).log(Level.SEVERE, null, ex);
        }
    }
    
    @Override
    public void onMessage(String channel, String sender,
                       String login, String hostname, String message) {
        if (message.startsWith("!dice")) {
            rollAmountString = message.split("e");
            rollAmount = Integer.parseInt(rollAmountString[1].trim());
            Random rand = new Random();
            rolledNumber = rand.nextInt(rollAmount) + 1;
            this.sendMessage(channel, "A "+rolledNumber+" was rolled on a dice with "+rollAmount+" chances.");
        }
    }
}

Hope that helps.
 
Runescape Gamblingrunescape gambling
Back
Top