diff --git a/buildnum.properties b/buildnum.properties
index fe05142..0fbdf80 100644
--- a/buildnum.properties
+++ b/buildnum.properties
@@ -1,3 +1,3 @@
#ANT Task: ch.oscg.jreleaseinfo.BuildNumberHandler
-#Thu Sep 23 13:38:29 PDT 2004
-build.num.last=1
+#Mon Oct 04 07:18:37 PDT 2004
+build.num.last=3
diff --git a/mobibot.iws b/mobibot.iws
index a3ed0b0..d7f9eff 100644
--- a/mobibot.iws
+++ b/mobibot.iws
@@ -71,7 +71,7 @@
-
+
@@ -112,83 +112,19 @@
-
+
-
+
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
+
@@ -209,16 +145,17 @@
-
-
-
+
+
+
+
-
+
@@ -245,8 +182,8 @@
-
+
@@ -261,8 +198,8 @@
-
+
@@ -292,6 +229,20 @@
+
+
+
+
+
+
+
+
+
+
+
+
+
+
@@ -309,20 +260,6 @@
-
-
-
-
-
-
-
-
-
-
-
-
-
-
@@ -397,17 +334,17 @@
-
+
-
+
-
+
@@ -497,24 +434,28 @@
-
+
-
+
-
-
-
-
-
-
-
-
-
-
-
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
@@ -527,59 +468,51 @@
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
+
+
+
+
+
+
+
-
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
-
+
@@ -588,35 +521,37 @@
-
+
-
+
-
+
-
+
-
+
-
-
+
+
+
+
-
+
-
+
diff --git a/src/net/thauvin/erik/mobibot/Mobibot.java b/src/net/thauvin/erik/mobibot/Mobibot.java
index 917d456..69cb58b 100644
--- a/src/net/thauvin/erik/mobibot/Mobibot.java
+++ b/src/net/thauvin/erik/mobibot/Mobibot.java
@@ -725,6 +725,30 @@ public class Mobibot extends PircBot
return _logger;
}
+ /**
+ * Sends an action to the current channel.
+ *
+ * @param action The action.
+ */
+ public final void action(String action)
+ {
+ action(getChannel(), action);
+ }
+
+ /**
+ * Sends an action to the channel.
+ *
+ * @param channel The channel.
+ * @param action The action.
+ */
+ public final void action(String channel, String action)
+ {
+ if (isValidString(channel) && isValidString(action))
+ {
+ this.sendAction(channel, action);
+ }
+ }
+
/**
* Responds with the bot's help.
*
@@ -807,7 +831,7 @@ public class Mobibot extends PircBot
{
send(sender, "To display weather information:");
send(sender, DOUBLE_INDENT + bold(getNick() + ": " + WEATHER_CMD + " "));
- send(sender, "For a listing of the ICAO station IDs, please visit: <" + Weather.STATIONS_URL + '>');
+ send(sender, "For a listing of the ICAO station IDs, please visit: " + Weather.STATIONS_URL);
}
else if (lcTopic.endsWith(USERS_CMD))
{
@@ -898,23 +922,26 @@ public class Mobibot extends PircBot
*/
public final void send(String sender, String message, boolean isPrivate)
{
- if (isPrivate)
+ if (isValidString(message) && isValidString(sender))
{
- if (_logger.isDebugEnabled())
+ if (isPrivate)
{
- _logger.debug("Sending message to " + sender + ": " + message);
- }
+ if (_logger.isDebugEnabled())
+ {
+ _logger.debug("Sending message to " + sender + ": " + message);
+ }
- this.sendMessage(sender, message);
- }
- else
- {
- if (_logger.isDebugEnabled())
+ this.sendMessage(sender, message);
+ }
+ else
{
- _logger.debug("Sending notice to " + sender + ": " + message);
- }
+ if (_logger.isDebugEnabled())
+ {
+ _logger.debug("Sending notice to " + sender + ": " + message);
+ }
- this.sendNotice(sender, message);
+ this.sendNotice(sender, message);
+ }
}
}
@@ -1066,11 +1093,11 @@ public class Mobibot extends PircBot
final Random r = new Random();
- this.sendAction(channel, pings[r.nextInt(pings.length)]);
+ action(channel, pings[r.nextInt(pings.length)]);
}
else if (cmd.equals(PONG_CMD))
{
- this.sendMessage(channel, PING_CMD);
+ send(channel, PING_CMD, true);
}
else if (cmd.equals(RECAP_CMD))
{
@@ -1095,19 +1122,19 @@ public class Mobibot extends PircBot
i = r.nextInt(6) + 1;
y = r.nextInt(6) + 1;
- this.sendAction(getChannel(), "rolled two dice: " + i + " and " + y + " for a total of " + (i + y));
+ action("rolled two dice: " + i + " and " + y + " for a total of " + (i + y));
if (total < (i + y))
{
- this.sendAction(getChannel(), "wins.");
+ action("wins.");
}
else if (total > (i + y))
{
- this.sendAction(getChannel(), "lost.");
+ action("lost.");
}
else
{
- this.sendAction(getChannel(), "tied.");
+ action("tied.");
}
}
else if (cmd.equalsIgnoreCase(getChannel().substring(1)))
@@ -1146,6 +1173,7 @@ public class Mobibot extends PircBot
try
{
+ me.trace();
send(getChannel(), String.valueOf(me.getValue()));
}
catch (Exception e)
@@ -1394,16 +1422,16 @@ public class Mobibot extends PircBot
if (isOp(sender))
{
_history.add(0, args);
- this.sendMessage(sender, _history.toString());
+ send(sender, _history.toString(), true);
}
}
else if (cmd.startsWith(ME_CMD))
{
if (isOp(sender))
{
- if (cmds.length > 1)
+ if (args.length() > 1)
{
- this.sendAction(getChannel(), args);
+ action(args);
}
else
{
@@ -1424,7 +1452,7 @@ public class Mobibot extends PircBot
{
if (cmds.length > 1)
{
- this.sendMessage(getChannel(), args);
+ send(getChannel(), args, true);
}
else
{
@@ -1461,7 +1489,7 @@ public class Mobibot extends PircBot
_logger.getLogger().setLevel(Level.DEBUG);
}
- this.sendMessage(sender, "Debug logging is " + (_logger.isDebugEnabled() ? "enabled." : "disabled."));
+ send(sender, "Debug logging is " + (_logger.isDebugEnabled() ? "enabled." : "disabled."), true);
}
}
else
@@ -2256,7 +2284,7 @@ public class Mobibot extends PircBot
if (isPrivate)
{
- this.sendMessage(sender, response);
+ send(sender, response, isPrivate);
}
else
{
diff --git a/src/net/thauvin/erik/mobibot/ReleaseInfo.java b/src/net/thauvin/erik/mobibot/ReleaseInfo.java
index 9dfefb6..9bc1367 100644
--- a/src/net/thauvin/erik/mobibot/ReleaseInfo.java
+++ b/src/net/thauvin/erik/mobibot/ReleaseInfo.java
@@ -1,5 +1,5 @@
/* Created by JReleaseInfo AntTask from Open Source Competence Group */
-/* Creation date Thu Sep 23 13:38:29 PDT 2004 */
+/* Creation date Mon Oct 04 07:18:37 PDT 2004 */
package net.thauvin.erik.mobibot;
import java.util.Date;
@@ -12,21 +12,21 @@ import java.util.Date;
public class ReleaseInfo {
- /** buildDate (set during build process to 1095971909156L). */
- private static Date buildDate = new Date(1095971909156L);
+ /** buildDate (set during build process to 1096899517937L). */
+ private static Date buildDate = new Date(1096899517937L);
/**
- * Get buildDate (set during build process to Thu Sep 23 13:38:29 PDT 2004).
+ * Get buildDate (set during build process to Mon Oct 04 07:18:37 PDT 2004).
* @return Date buildDate
*/
public static final Date getBuildDate() { return buildDate; }
/**
- * Get buildNumber (set during build process to 1).
+ * Get buildNumber (set during build process to 3).
* @return int buildNumber
*/
- public static final int getBuildNumber() { return 1; }
+ public static final int getBuildNumber() { return 3; }
/** version (set during build process to "0.2"). */