Skip to content

Commit

Permalink
Merge branch 'master' of ssh://github.com:22/Animosity/CraftIRC
Browse files Browse the repository at this point in the history
  • Loading branch information
ricin committed Oct 14, 2010
2 parents c67c733 + caee78c commit a5d5bfb
Show file tree
Hide file tree
Showing 2 changed files with 24 additions and 25 deletions.
1 change: 1 addition & 0 deletions CraftIRC.java
Original file line number Diff line number Diff line change
Expand Up @@ -3,6 +3,7 @@
/**
* @author Animosity
* With various contributions and improvements by ricin
*
*/

public class CraftIRC extends Plugin {
Expand Down
48 changes: 23 additions & 25 deletions Minebot.java
Original file line number Diff line number Diff line change
Expand Up @@ -215,17 +215,17 @@ public void start()

log.info(CraftIRC.NAME + " v" + CraftIRC.VERSION + " loading.");

if (this.irc_server_port == null || this.irc_server_port.equals(""))
{
if (this.irc_server_port == null || this.irc_server_port.equals(""))
{
if (this.irc_server_ssl)
{
this.irc_server_port = "6697";
}
else
{
this.irc_server_port = "6667";
}
}
this.irc_server_port = "6667";
}
}

try {
this.setAutoNickChange(true);
Expand All @@ -238,25 +238,25 @@ public void start()
this.connect(this.irc_server,
Integer.parseInt(this.irc_server_port),
this.irc_server_pass, new TrustingSSLSocketFactory());
}
}
else
{
log.info(CraftIRC.NAME + " - Connecting to "
+ this.irc_server + ":"
+ this.irc_server_port);
this.connect(this.irc_server,
Integer.parseInt(this.irc_server_port),
this.irc_server_pass);
}
{
log.info(CraftIRC.NAME + " - Connecting to "
+ this.irc_server + ":"
+ this.irc_server_port);
this.connect(this.irc_server,
Integer.parseInt(this.irc_server_port),
this.irc_server_pass);
}

if (this.isConnected())
{
log.info(CraftIRC.NAME + " - Connected");
}
else
{
log.info(CraftIRC.NAME + " - Connection failed!");
}
if (this.isConnected())
{
log.info(CraftIRC.NAME + " - Connected");
}
else
{
log.info(CraftIRC.NAME + " - Connection failed!");
}

this.authenticateBot(); // will always GHOST own registered nick if auth method is nickserv

Expand All @@ -267,7 +267,6 @@ public void start()


} catch (NumberFormatException e) {

e.printStackTrace();
} catch (NickAlreadyInUseException e) {
System.out.println("my handle is taken!");
Expand Down Expand Up @@ -333,7 +332,6 @@ public void joinAdminChannel()
else
{
this.joinChannel(irc_admin_channel, irc_admin_channel_pass);

}

}
Expand Down Expand Up @@ -372,7 +370,6 @@ public void onJoin(String channel, String sender, String login, String hostname)
{
if (channel.equalsIgnoreCase(this.irc_channel)) { this.irc_users_main = this.getUsers(channel); }
if (channel.equalsIgnoreCase(this.irc_admin_channel)) { this.irc_users_admin = this.getUsers(channel); }

}

// Update users
Expand Down Expand Up @@ -542,6 +539,7 @@ public String combineSplit(int initialPos, String[] parts, String delimiter) thr

public void onDisconnect()
{

// Maybe check if disabled, and if not, start(); depending on a flag set in the settings?
}

Expand Down

0 comments on commit a5d5bfb

Please sign in to comment.