Projects >> uc_pircbotx >>bd79077e118fb55fb6fd403d9609a37340a9bd2e

Chunk
Conflicting content
 */
package uk.co.unitycoders.pircbotx;

<<<<<<< HEAD
import javax.net.ssl.SSLSocketFactory;

import org.pircbotx.Configuration;
import org.pircbotx.Configuration.Builder;
import org.pircbotx.PircBotX;

import uk.co.unitycoders.pircbotx.commandprocessor.CommandListener;
import uk.co.unitycoders.pircbotx.commandprocessor.CommandProcessor;
import uk.co.unitycoders.pircbotx.commands.*;
import uk.co.unitycoders.pircbotx.data.db.DBConnection;
import uk.co.unitycoders.pircbotx.listeners.JoinsListener;
import uk.co.unitycoders.pircbotx.listeners.LinesListener;
import uk.co.unitycoders.pircbotx.profile.ProfileCommand;
import uk.co.unitycoders.pircbotx.profile.ProfileManager;
=======
>>>>>>> 26691d76bb08a197b20b133efa9a8ed501192e3b

/**
 * The actual bot itself.
Solution content
 */
package uk.co.unitycoders.pircbotx;

/**
 * The actual bot itself.
File
Bot.java
Developer's decision
Version 2
Kind of conflict
Import
Chunk
Conflicting content
public class Bot {

    public static void main(String[] args) throws Exception {
<<<<<<< HEAD
        // Bot Configuration
        LocalConfiguration localConfig = ConfigurationManager.loadConfig();

        CommandProcessor processor = new CommandProcessor(localConfig.trigger);

        ProfileManager profiles = new ProfileManager(DBConnection.getProfileModel());
        DateTimeCommand dtCmd = new DateTimeCommand();

        // Commands
        processor.register("rand", new RandCommand());
        processor.register("time", dtCmd);
        processor.register("date", dtCmd);
        processor.register("datetime", dtCmd);
        processor.register("lart", new LartCommand());
        processor.register("killertrout", new KillerTroutCommand());
        processor.register("joins", new JoinsCommand());
        processor.register("calc", new CalcCommand());
        processor.register("karma", new KarmaCommand());
        processor.register("profile", new ProfileCommand(profiles));
        processor.register("help", new HelpCommand(processor));
        processor.register("nick", new NickCommand());
        processor.register("factoid", new FactoidCommand(DBConnection.getFactoidModel()));
        processor.register("github", new GithubCommand());

        // Configure bot
        Builder cb = new Configuration.Builder()
            .setName(localConfig.nick)
            .setAutoNickChange(true)
            .setAutoReconnect(true)
            .setServer(localConfig.host, localConfig.port)
            .addAutoJoinChannel("unity-coders")
            .addListener(new CommandListener(processor))
            .addListener(new LinesListener())
            .addListener(JoinsListener.getInstance());

        // Configure SSL
        if (localConfig.ssl)
            cb.setSocketFactory(SSLSocketFactory.getDefault());

        // Add channels to join
        for (String channel : localConfig.channels)
        {
            cb.addAutoJoinChannel(channel);
=======
        String configPath = ConfigurationManager.JSON_FILE_NAME;
        if (args.length > 1) {
            configPath = args[1];
>>>>>>> 26691d76bb08a197b20b133efa9a8ed501192e3b
        }

        BotRunnable runnable = new BotRunnable(ConfigurationManager.loadConfig(configPath));
Solution content
public class Bot {

    public static void main(String[] args) throws Exception {
        String configPath = ConfigurationManager.JSON_FILE_NAME;
        if (args.length > 1) {
            configPath = args[1];
        }

        BotRunnable runnable = new BotRunnable(ConfigurationManager.loadConfig(configPath));
File
Bot.java
Developer's decision
Version 2
Kind of conflict
Array access
Comment
For statement
If statement
Method invocation
Variable