Better MOTD formatting.

Update to pircbotx 2.0.2 (custom version includes motd fix).
This commit is contained in:
cnaude 2015-02-07 23:03:55 -07:00
parent 650674ecc6
commit 8a5a0988e1
5 changed files with 21 additions and 11 deletions

View File

@ -45,6 +45,7 @@
<minimizeJar>true</minimizeJar>
<artifactSet>
<includes>
<include>com.cnaude.pircbotx</include>
<include>org.pircbotx</include>
<include>org.slf4j</include>
<include>org.apache.commons</include>
@ -52,6 +53,10 @@
</artifactSet>
<filters />
<relocations>
<relocation>
<pattern>com.cnaude.pircbotx</pattern>
<shadedPattern>com.cnaude.pircbotx</shadedPattern>
</relocation>
<relocation>
<pattern>org.pircbotx</pattern>
<shadedPattern>org.pircbotx</shadedPattern>

11
pom.xml
View File

@ -235,10 +235,10 @@
<!-- PircBotX -->
<dependency>
<groupId>org.pircbotx</groupId>
<groupId>com.cnaude.pircbotx</groupId>
<artifactId>pircbotx</artifactId>
<version>2.0.1</version>
</dependency>
<version>2.0.2</version>
</dependency>
<!-- CleverNotch -->
<dependency>
@ -357,6 +357,7 @@
<minimizeJar>true</minimizeJar>
<artifactSet>
<includes>
<include>com.cnaude.pircbotx</include>
<include>org.pircbotx</include>
<include>org.slf4j</include>
<include>org.apache.commons</include>
@ -365,6 +366,10 @@
<filters>
</filters>
<relocations>
<relocation>
<pattern>com.cnaude.pircbotx</pattern>
<shadedPattern>com.cnaude.pircbotx</shadedPattern>
</relocation>
<relocation>
<pattern>org.pircbotx</pattern>
<shadedPattern>org.pircbotx</shadedPattern>

View File

@ -47,7 +47,7 @@ public class MotdListener extends ListenerAdapter {
@Override
public void onMotd(MotdEvent event) {
if (ircBot.showMOTD) {
plugin.logInfo(" - " + ircBot.botServer + " - Message of the Day -");
plugin.logInfo("- " + ircBot.botServer + " - Message of the Day -");
for (String s : event.getMotd().split("\n")) {
plugin.logInfo("- " + s);
}

View File

@ -48,21 +48,21 @@ public class ServerResponseListener extends ListenerAdapter {
@Override
public void onServerResponse(ServerResponseEvent event) {
int serverReply = event.getCode();
if (serverReply == ReplyConstants.ERR_BADCHANNELKEY) {
plugin.logInfo("Bad channel password.");
}
if (serverReply == ReplyConstants.ERR_BANNEDFROMCHAN) {
plugin.logInfo("Banned from the channel.");
}
if (serverReply == ReplyConstants.ERR_NICKNAMEINUSE) {
plugin.logInfo("Nickname already in use.");
ircBot.altNickChange();
}
//plugin.logDebug("Server response: " + event.getRawLine());
}
}
}

View File

@ -826,7 +826,7 @@ public class PurpleIRC extends JavaPlugin {
public void logInfo(String message) {
log.log(Level.INFO, String.format("%s %s", LOG_HEADER, message));
}
/**
*
* @param message