diff --git a/net/GUIpsp/GuiBot/GuiBot.java b/net/GUIpsp/GuiBot/GuiBot.java index 4dd90ed..277e79d 100644 --- a/net/GUIpsp/GuiBot/GuiBot.java +++ b/net/GUIpsp/GuiBot/GuiBot.java @@ -10,7 +10,7 @@ public class GuiBot extends PircBot { public static String pref = "$"; public GuiBot() { - this.setName("GuiBot"); + this.setName(Main.nick); } public void onMessage(String channel, String sender, String login, @@ -45,10 +45,10 @@ public void onMessage(String channel, String sender, String login, } else { for (Map.Entry entry : Main.helpmap .entrySet()) { - toprint += entry.getKey(); + toprint += entry.getKey()+" "; } } - Main.bot.sendMessage(channel, toprint); + Main.bot.sendMessage(channel, toprint.trim()); } else if (Main.cmdmap.containsKey(first)) { try { Method met = (Method) Main.cmdmap.get(first); diff --git a/net/GUIpsp/GuiBot/Main.java b/net/GUIpsp/GuiBot/Main.java index 3b16d57..03aec0d 100644 --- a/net/GUIpsp/GuiBot/Main.java +++ b/net/GUIpsp/GuiBot/Main.java @@ -12,9 +12,10 @@ public class Main { public static Map helpmap = new HashMap(); static String plugdir = "/home/guipsp/Desktop/GuiBot/plugins/"; static File directory = new File(plugdir); + public static String nick = "GuiBot"; public static GuiBot bot = new GuiBot(); - public static void main(String[] args) throws Throwable { + reLoad(); bot.setVerbose(true); try { @@ -25,7 +26,7 @@ public static void main(String[] args) throws Throwable { // bot.identify(""); bot.joinChannel("##crow"); } - + public static void reLoad() throws Throwable { classmap.clear(); cmdmap.clear();