LogBot 0.1.0: Patches for mflogbot (2005-11-16)
SUMMARY
This patch reflects the the changes to LogBot made
for "mflogbot".
The latest version can be found on
http://rbach.priv.at/Patches/
AUTHOR
Robert Bachmann
";
+
+ String entry = "
" + line + ""; + } + writer.write(entry); writer.newLine(); writer.flush(); @@ -55,83 +103,72 @@ } public void onAction(String sender, String login, String hostname, String target, String action) { - append(BRICK, "* " + sender + " " + action); + append(ACTION, "* " + sender + " " + action,""); } public void onJoin(String channel, String sender, String login, String hostname) { - append(GREEN, "* " + sender + " (" + login + "@" + hostname + ") has joined " + channel); - if (sender.equals(getNick())) { - sendNotice(channel, joinMessage); - } - else { - sendNotice(sender, joinMessage); - } + append(JOIN, "* " + sender + " (" + login + "@" + hostname + ") has joined " + channel,""); } public void onMessage(String channel, String sender, String login, String hostname, String message) { - append(BLACK, "<" + sender + "> " + message); - - message = message.toLowerCase(); - if (message.startsWith(getNick().toLowerCase()) && message.indexOf("help") > 0) { - sendMessage(channel, joinMessage); - } + append(MESSAGE,message,sender); } public void onMode(String channel, String sourceNick, String sourceLogin, String sourceHostname, String mode) { - append(GREEN, "* " + sourceNick + " sets mode " + mode); + append(MODE, "* " + sourceNick + " sets mode " + mode,""); } public void onNickChange(String oldNick, String login, String hostname, String newNick) { - append(GREEN, "* " + oldNick + " is now known as " + newNick); + append(NICK, "* " + oldNick + " is now known as " + newNick,""); } public void onNotice(String sourceNick, String sourceLogin, String sourceHostname, String target, String notice) { - append(BROWN, "-" + sourceNick + "- " + notice); +// append(NOTICE, "-" + sourceNick + "- " + notice,""); } public void onPart(String channel, String sender, String login, String hostname) { - append(GREEN, "* " + sender + " (" + login + "@" + hostname + ") has left " + channel); + append(PART, "* " + sender + " (" + login + "@" + hostname + ") has left " + channel,""); } public void onPing(String sourceNick, String sourceLogin, String sourceHostname, String target, String pingValue) { - append(RED, "[" + sourceNick + " PING]"); + ; } public void onPrivateMessage(String sender, String login, String hostname, String message) { - append(BLACK, "<- *" + sender + "* " + message); + ; } public void onQuit(String sourceNick, String sourceLogin, String sourceHostname, String reason) { - append(NAVY, "* " + sourceNick + " (" + sourceLogin + "@" + sourceHostname + ") Quit (" + reason + ")"); + append(QUIT, "* " + sourceNick + " (" + sourceLogin + "@" + sourceHostname + ") Quit (" + reason + ")",""); } public void onTime(String sourceNick, String sourceLogin, String sourceHostname, String target) { - append(RED, "[" + sourceNick + " TIME]"); + ; } public void onTopic(String channel, String topic, String setBy, long date, boolean changed) { if (changed) { - append(GREEN, "* " + setBy + " changes topic to '" + topic + "'"); + append(TOPIC_CHANGE, "* " + setBy + " changes topic to '" + topic + "'",""); } else { - append(GREEN, "* Topic is '" + topic + "'"); - append(GREEN, "* Set by " + setBy + " on " + new Date(date)); + append(TOPIC, "* Topic is '" + topic + "'",""); + append(TOPIC, "* Set by " + setBy + " on " + new Date(date),""); } } public void onVersion(String sourceNick, String sourceLogin, String sourceHostname, String target) { - append(RED, "[" + sourceNick + " VERSION]"); + ; } public void onKick(String channel, String kickerNick, String kickerLogin, String kickerHostname, String recipientNick, String reason) { - append(GREEN, "* " + recipientNick + " was kicked from " + channel + " by " + kickerNick); - if (recipientNick.equalsIgnoreCase(getNick())) { + append(KICK, "* " + recipientNick + " was kicked from " + channel + " by " + kickerNick,""); + /* if (recipientNick.equalsIgnoreCase(getNick())) { joinChannel(channel); - } + } */ } public void onDisconnect() { - append(NAVY, "* Disconnected."); + // append(DISCONNECT, "* Disconnected."); while (!isConnected()) { try { reconnect(); @@ -163,4 +200,4 @@ private File outDir; private String joinMessage; -} \ No newline at end of file +} --- org/jibble/logbot/LogBotMain.java 2004-05-28 19:08:32.000000000 +0200 +++ org/jibble/logbot/LogBotMain.java 2005-11-16 19:32:43.962600040 +0100 @@ -13,6 +13,7 @@ String server = p.getProperty("Server", "localhost"); String channel = p.getProperty("Channel", "#test"); String nick = p.getProperty("Nick", "LogBot"); + String password = p.getProperty("Password", ""); String joinMessage = p.getProperty("JoinMessage", "This channel is logged."); File outDir = new File(p.getProperty("OutputDir", "./output/")); @@ -40,8 +41,8 @@ writer.close(); LogBot bot = new LogBot(nick, outDir, joinMessage); - bot.connect(server); + bot.connect(server,6667,password); bot.joinChannel(channel); } -} \ No newline at end of file +} --- html/footer.inc.php 2004-05-28 19:19:02.000000000 +0200 +++ html/footer.inc.php 2005-11-16 20:10:33.755838520 +0100 @@ -3,7 +3,7 @@ "> using the Java IRC LogBot. - +
See http://microformats.org/wiki/mflogbot for more information.