Removed reverseColor(int) from Utils class.
This commit is contained in:
parent
9b8ba57e68
commit
7fce4e009d
4 changed files with 27 additions and 40 deletions
|
@ -14,7 +14,7 @@ import java.util.Date;
|
||||||
*/
|
*/
|
||||||
public final class ReleaseInfo {
|
public final class ReleaseInfo {
|
||||||
private final static String buildmeta = "007";
|
private final static String buildmeta = "007";
|
||||||
private final static Date date = new Date(1467054540566L);
|
private final static Date date = new Date(1467057655408L);
|
||||||
private final static int major = 0;
|
private final static int major = 0;
|
||||||
private final static int minor = 6;
|
private final static int minor = 6;
|
||||||
private final static int patch = 1;
|
private final static int patch = 1;
|
||||||
|
|
|
@ -38,7 +38,6 @@ import net.thauvin.erik.semver.Version;
|
||||||
import org.apache.commons.cli.*;
|
import org.apache.commons.cli.*;
|
||||||
import org.apache.commons.logging.impl.Log4JLogger;
|
import org.apache.commons.logging.impl.Log4JLogger;
|
||||||
import org.apache.log4j.Level;
|
import org.apache.log4j.Level;
|
||||||
import org.jibble.pircbot.Colors;
|
|
||||||
import org.jibble.pircbot.PircBot;
|
import org.jibble.pircbot.PircBot;
|
||||||
import org.jibble.pircbot.User;
|
import org.jibble.pircbot.User;
|
||||||
import org.jsoup.Jsoup;
|
import org.jsoup.Jsoup;
|
||||||
|
@ -267,16 +266,16 @@ public class Mobibot extends PircBot
|
||||||
*/
|
*/
|
||||||
private String identMsg = "";
|
private String identMsg = "";
|
||||||
|
|
||||||
/**
|
|
||||||
* The last player.
|
|
||||||
*/
|
|
||||||
private String lastPlayer = "";
|
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* The ident nick.
|
* The ident nick.
|
||||||
*/
|
*/
|
||||||
private String identNick = "";
|
private String identNick = "";
|
||||||
|
|
||||||
|
/**
|
||||||
|
* The last player.
|
||||||
|
*/
|
||||||
|
private String lastPlayer = "";
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* The number of days message are kept.
|
* The number of days message are kept.
|
||||||
*/
|
*/
|
||||||
|
@ -1365,7 +1364,7 @@ public class Mobibot extends PircBot
|
||||||
send(sender, "The op commands are:");
|
send(sender, "The op commands are:");
|
||||||
send(sender,
|
send(sender,
|
||||||
helpIndent(Commands.CYCLE_CMD + " " + Commands.INFO_CMD + " " + Commands.ME_CMD + " "
|
helpIndent(Commands.CYCLE_CMD + " " + Commands.INFO_CMD + " " + Commands.ME_CMD + " "
|
||||||
+ Commands.MSG_CMD + " " + Commands.SAY_CMD + " " + Commands.VERSION_CMD));
|
+ Commands.MSG_CMD + " " + Commands.SAY_CMD + " " + Commands.VERSION_CMD));
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
@ -2397,8 +2396,8 @@ public class Mobibot extends PircBot
|
||||||
if (!isMessage)
|
if (!isMessage)
|
||||||
{
|
{
|
||||||
send(nickname,
|
send(nickname,
|
||||||
Utils.bold("You") + " wanted me to remind you: " + Utils.reverseColor(message
|
Utils.bold("You") + " wanted me to remind you: " + Utils
|
||||||
.getMessage()), true);
|
.reverseColor(message.getMessage()), true);
|
||||||
|
|
||||||
message.setIsReceived();
|
message.setIsReceived();
|
||||||
message.setIsNotified();
|
message.setIsNotified();
|
||||||
|
@ -2409,7 +2408,8 @@ public class Mobibot extends PircBot
|
||||||
else
|
else
|
||||||
{
|
{
|
||||||
send(nickname,
|
send(nickname,
|
||||||
message.getSender() + " wanted me to tell you: " + Utils.reverseColor(message.getMessage()),
|
message.getSender() + " wanted me to tell you: " + Utils
|
||||||
|
.reverseColor(message.getMessage()),
|
||||||
true);
|
true);
|
||||||
|
|
||||||
message.setIsReceived();
|
message.setIsReceived();
|
||||||
|
@ -2421,9 +2421,8 @@ public class Mobibot extends PircBot
|
||||||
.isNotified())
|
.isNotified())
|
||||||
{
|
{
|
||||||
send(nickname,
|
send(nickname,
|
||||||
"Your message " + Utils.reverseColor("[ID " + message.getId() + ']')
|
"Your message " + Utils.reverseColor("[ID " + message.getId() + ']') + " was sent to " + Utils
|
||||||
+ " was sent to " + Utils.bold(message.getRecipient()) + " on " + Utils.UTC_SDF
|
.bold(message.getRecipient()) + " on " + Utils.UTC_SDF.format(message.getReceived()),
|
||||||
.format(message.getReceived()),
|
|
||||||
true);
|
true);
|
||||||
|
|
||||||
message.setIsNotified();
|
message.setIsNotified();
|
||||||
|
|
|
@ -90,8 +90,8 @@ class Twitter implements Runnable
|
||||||
* @param accessTokenSecret The Twitter access token secret.
|
* @param accessTokenSecret The Twitter access token secret.
|
||||||
* @param message The Twitter message.
|
* @param message The Twitter message.
|
||||||
*/
|
*/
|
||||||
public Twitter(final Mobibot bot, final String sender, final String consumerKey, final String consumerSecret, final String accessToken,
|
public Twitter(final Mobibot bot, final String sender, final String consumerKey, final String consumerSecret,
|
||||||
final String accessTokenSecret, final String message)
|
final String accessToken, final String accessTokenSecret, final String message)
|
||||||
{
|
{
|
||||||
this.bot = bot;
|
this.bot = bot;
|
||||||
this.consumerKey = consumerKey;
|
this.consumerKey = consumerKey;
|
||||||
|
|
|
@ -88,6 +88,18 @@ final class Utils
|
||||||
return bold(Integer.toString(i));
|
return bold(Integer.toString(i));
|
||||||
}
|
}
|
||||||
|
|
||||||
|
/**
|
||||||
|
* Makes the given string bold.
|
||||||
|
*
|
||||||
|
* @param s The string.
|
||||||
|
*
|
||||||
|
* @return The bold string.
|
||||||
|
*/
|
||||||
|
public static String bold(final String s)
|
||||||
|
{
|
||||||
|
return Colors.BOLD + s + Colors.BOLD;
|
||||||
|
}
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* Builds an entry's comment for display on the channel.
|
* Builds an entry's comment for display on the channel.
|
||||||
*
|
*
|
||||||
|
@ -154,18 +166,6 @@ final class Utils
|
||||||
return buff.toString();
|
return buff.toString();
|
||||||
}
|
}
|
||||||
|
|
||||||
/**
|
|
||||||
* Makes the given string bold.
|
|
||||||
*
|
|
||||||
* @param s The string.
|
|
||||||
*
|
|
||||||
* @return The bold string.
|
|
||||||
*/
|
|
||||||
public static String bold(final String s)
|
|
||||||
{
|
|
||||||
return Colors.BOLD + s + Colors.BOLD;
|
|
||||||
}
|
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* Makes the given string green.
|
* Makes the given string green.
|
||||||
*
|
*
|
||||||
|
@ -378,18 +378,6 @@ final class Utils
|
||||||
return false;
|
return false;
|
||||||
}
|
}
|
||||||
|
|
||||||
/**
|
|
||||||
* Makes the given int reverse color.
|
|
||||||
*
|
|
||||||
* @param i The int.
|
|
||||||
*
|
|
||||||
* @return The reverse color string.
|
|
||||||
*/
|
|
||||||
public static String reverseColor(final int i)
|
|
||||||
{
|
|
||||||
return reverseColor(Integer.toString(i));
|
|
||||||
}
|
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* Makes the given string reverse color.
|
* Makes the given string reverse color.
|
||||||
*
|
*
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue