diff --git a/buildnum.properties b/buildnum.properties index 91bf37c..0a6c4b6 100644 --- a/buildnum.properties +++ b/buildnum.properties @@ -1,3 +1,3 @@ #ANT Task: ch.oscg.jreleaseinfo.BuildNumberHandler -#Sat Oct 30 11:43:51 PDT 2004 -build.num.last=6 +#Sun Oct 31 00:44:26 PDT 2004 +build.num.last=7 diff --git a/mobibot.iws b/mobibot.iws index 17d11ef..721426e 100644 --- a/mobibot.iws +++ b/mobibot.iws @@ -115,16 +115,16 @@ - + - + - + @@ -145,20 +145,21 @@ - - - + + + + + - - + @@ -229,20 +230,6 @@ - - + + - + - + @@ -425,22 +426,6 @@ - - - - - - - - - - - - - - - - @@ -469,15 +454,6 @@ - - - - - - - - - @@ -531,9 +507,9 @@ - + - + @@ -542,11 +518,36 @@ - + + + + + + + + + + + + + + + + + + + + + + + + + + diff --git a/src/net/thauvin/erik/mobibot/Mobibot.java b/src/net/thauvin/erik/mobibot/Mobibot.java index 1c9b576..9270b7d 100644 --- a/src/net/thauvin/erik/mobibot/Mobibot.java +++ b/src/net/thauvin/erik/mobibot/Mobibot.java @@ -162,6 +162,16 @@ public class Mobibot extends PircBot */ private static final String CYCLE_CMD = "cycle"; + /** + * The ignore command. + */ + private static final String IGNORE_CMD = "ignore"; + + /** + * The ignore me keyword. + */ + private static final String IGNORE_ME_KEYWORD = "me"; + /** * The help command. */ @@ -887,6 +897,14 @@ public class Mobibot extends PircBot send(sender, DOUBLE_INDENT + bold(getNick() + ": " + CURRENCY_CMD)); } } + else if (lcTopic.startsWith(IGNORE_CMD)) + { + send(sender, "To check your ignore status:"); + send(sender, DOUBLE_INDENT + bold(getNick() + ": " + IGNORE_CMD)); + + send(sender, "To toggle your ignore status:"); + send(sender, DOUBLE_INDENT + bold(getNick() + ": " + IGNORE_CMD + ' ' + IGNORE_ME_KEYWORD)); + } else { send(sender, bold("Type a URL on " + getChannel() + " to post it.")); @@ -895,12 +913,13 @@ public class Mobibot extends PircBot send(sender, "The commands are:"); send(sender, DOUBLE_INDENT + - bold(CALC_CMD + ' ' + CURRENCY_CMD + ' ' + DICE_CMD + ' ' + GOOGLE_CMD + ' ' + INFO_CMD + ' ' + - getChannel().substring(1) + ' ' + LOOKUP_CMD)); + bold(CALC_CMD + ' ' + CURRENCY_CMD + ' ' + DICE_CMD + ' ' + GOOGLE_CMD + ' ' + IGNORE_CMD)); send(sender, DOUBLE_INDENT + - bold(HELP_POSTING_KEYWORD + ' ' + RECAP_CMD + ' ' + SPELL_CMD + ' ' + STOCK_CMD + ' ' + TIME_CMD + - ' ' + USERS_CMD + ' ' + VIEW_CMD)); + bold(INFO_CMD + ' ' + getChannel().substring(1) + ' ' + LOOKUP_CMD + ' ' + HELP_POSTING_KEYWORD + ' ' + + RECAP_CMD)); + send(sender, + DOUBLE_INDENT + bold(SPELL_CMD + ' ' + STOCK_CMD + ' ' + TIME_CMD + ' ' + USERS_CMD + ' ' + VIEW_CMD)); send(sender, DOUBLE_INDENT + bold(WEATHER_CMD)); if (isOp(sender)) @@ -1203,6 +1222,71 @@ public class Mobibot extends PircBot { weatherResponse(sender, args, false); } + else if (cmd.startsWith(IGNORE_CMD)) + { + if (!isOp(sender)) + { + final String nick = sender.toLowerCase(); + final boolean isMe = args.toLowerCase().startsWith(IGNORE_ME_KEYWORD); + + if (_ignoredNicks.contains(nick)) + { + if (isMe) + { + _ignoredNicks.remove(nick); + + send(sender, "You are no longer ignored."); + } + else + { + send(sender, "You are currently ignored."); + } + } + else + { + if (isMe) + { + _ignoredNicks.add(nick); + + send(sender, "You are now ignored."); + } + else + { + send(sender, "You are not currently ignored."); + } + } + } + else + { + if (args.length() > 0) + { + final String[] nicks = args.toLowerCase().split(" "); + + String nick; + + for (int i = 0; i < nicks.length; i++) + { + nick = nicks[i]; + + if (IGNORE_ME_KEYWORD.equals(nick)) + { + nick = sender.toLowerCase(); + } + + if (_ignoredNicks.contains(nick)) + { + _ignoredNicks.remove(nick); + } + else + { + _ignoredNicks.add(nick); + } + } + } + + send(sender, "The following nicks are ignored: " + _ignoredNicks.toString()); + } + } } else if (message.matches(LINK_CMD + "[0-9]+:.*")) { diff --git a/src/net/thauvin/erik/mobibot/ReleaseInfo.java b/src/net/thauvin/erik/mobibot/ReleaseInfo.java index 1241450..a7ca945 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 Sat Oct 30 11:43:51 PDT 2004 */ +/* Creation date Sun Oct 31 00:44:26 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 1099161831468L). */ - private static Date buildDate = new Date(1099161831468L); + /** buildDate (set during build process to 1099208666406L). */ + private static Date buildDate = new Date(1099208666406L); /** - * Get buildDate (set during build process to Sat Oct 30 11:43:51 PDT 2004). + * Get buildDate (set during build process to Sun Oct 31 00:44:26 PDT 2004). * @return Date buildDate */ public static final Date getBuildDate() { return buildDate; } /** - * Get buildNumber (set during build process to 6). + * Get buildNumber (set during build process to 7). * @return int buildNumber */ - public static final int getBuildNumber() { return 6; } + public static final int getBuildNumber() { return 7; } /** version (set during build process to "0.2"). */ diff --git a/website/index.html b/website/index.html index 34d6872..53eecf2 100644 --- a/website/index.html +++ b/website/index.html @@ -42,7 +42,7 @@
  • Displaying weather information
  • Some of the internal features include RSS feed backlogs, rolling logs, debugging toggle and much more.

    -

    If you have any feature suggestions, please post them to the mobibot wiki.

    +

    If you have any feature suggestions, please post them to the mobibot wiki.

    Using mobibot

    To use mobibot, simply join #mobitopia on irc.freenode.net and type:

    mobibot: help