Commit d2cab609 authored by Luke081515's avatar Luke081515

Merge branch '3-fix-login-data' into 'master'

Resolve "Fix login data"

Closes #3

See merge request !1
parents f59a19b2 5b893acf
...@@ -4,10 +4,9 @@ import java.sql.*; ...@@ -4,10 +4,9 @@ import java.sql.*;
public class CIABot extends PircBot { public class CIABot extends PircBot {
DB Database; DB Database;
public CIABot(boolean verbose, String pwd) { public CIABot(boolean verbose, String pwd) {
this.setLogin("Luke081515Bot"); this.setLogin("ciabot");
this.setName("Luke081515Bot"); this.setName("ciabot");
Database = new DB(); Database = new DB();
wikimedia = new String [0];
} }
public void onMode(String channel, String sourceNick, String sourceLogin, String sourceHostname, String mode) { public void onMode(String channel, String sourceNick, String sourceLogin, String sourceHostname, String mode) {
System.out.println (mode); System.out.println (mode);
...@@ -21,16 +20,14 @@ public class CIABot extends PircBot { ...@@ -21,16 +20,14 @@ public class CIABot extends PircBot {
partChannel ("#" + message.substring(message.lastIndexOf("#") + 1)); partChannel ("#" + message.substring(message.lastIndexOf("#") + 1));
} else {} } else {}
} else if (hostname.toLowerCase().contains("tnb/staff/luke081515")) { } else if (hostname.toLowerCase().contains("tnb/staff/luke081515")) {
if (message.startsWith("§join ")) { if (message.startsWith("$join ")) {
joinChannel ("#" + message.substring(message.lastIndexOf("#") + 1)); joinChannel ("#" + message.substring(message.lastIndexOf("#") + 1));
} else if (message.startsWith("§part ")) { } else if (message.startsWith("$part ")) {
partChannel ("#" + message.substring(message.lastIndexOf("#") + 1)); partChannel ("#" + message.substring(message.lastIndexOf("#") + 1));
} else if (message.startsWith("§nick ")) { } else if (message.startsWith("$nick ")) {
changeNick (message.substring(message.lastIndexOf(" ") + 1)); changeNick (message.substring(message.lastIndexOf(" ") + 1));
} else if (message.startsWith("§quit")) { } else if (message.startsWith("$quit")) {
System.exit(0); System.exit(0);
} else if (message.startsWith ("§purge")) {
removeExpired();
} else {} } else {}
} else {} } else {}
} }
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment