diff options
author | snowleo <schneeleo@gmail.com> | 2011-11-21 02:55:26 +0100 |
---|---|---|
committer | snowleo <schneeleo@gmail.com> | 2011-11-21 02:55:26 +0100 |
commit | e3fa24375342bdf58494c26cc125acb7d621cc87 (patch) | |
tree | 457ec062b09eb5c6aec08111e76e7991c61efb1a /EssentialsUpdate/src/org/jibble | |
parent | 0d0eb1e8bd50d0ed8cbb0a496fa8c6a349e88635 (diff) | |
download | Essentials-e3fa24375342bdf58494c26cc125acb7d621cc87.tar Essentials-e3fa24375342bdf58494c26cc125acb7d621cc87.tar.gz Essentials-e3fa24375342bdf58494c26cc125acb7d621cc87.tar.lz Essentials-e3fa24375342bdf58494c26cc125acb7d621cc87.tar.xz Essentials-e3fa24375342bdf58494c26cc125acb7d621cc87.zip |
Switch to the new I18n class and format cleanup of all classes
Diffstat (limited to 'EssentialsUpdate/src/org/jibble')
4 files changed, 14 insertions, 12 deletions
diff --git a/EssentialsUpdate/src/org/jibble/pircbot/InputThread.java b/EssentialsUpdate/src/org/jibble/pircbot/InputThread.java index 1c30ad815..a24815210 100755 --- a/EssentialsUpdate/src/org/jibble/pircbot/InputThread.java +++ b/EssentialsUpdate/src/org/jibble/pircbot/InputThread.java @@ -15,8 +15,8 @@ found at http://www.jibble.org/licenses/ package org.jibble.pircbot; import java.io.*; -import java.net.*; -import java.util.*; +import java.net.Socket; +import java.util.StringTokenizer; /** * A Thread which reads lines from the IRC server. It then diff --git a/EssentialsUpdate/src/org/jibble/pircbot/OutputThread.java b/EssentialsUpdate/src/org/jibble/pircbot/OutputThread.java index 86ac404d2..7eddee873 100755 --- a/EssentialsUpdate/src/org/jibble/pircbot/OutputThread.java +++ b/EssentialsUpdate/src/org/jibble/pircbot/OutputThread.java @@ -14,8 +14,7 @@ found at http://www.jibble.org/licenses/ package org.jibble.pircbot; -import java.io.*; -import java.net.*; +import java.io.BufferedWriter; /** * A Thread which is responsible for sending messages to the IRC server. diff --git a/EssentialsUpdate/src/org/jibble/pircbot/PircBot.java b/EssentialsUpdate/src/org/jibble/pircbot/PircBot.java index a5f049cde..acdf01b46 100755 --- a/EssentialsUpdate/src/org/jibble/pircbot/PircBot.java +++ b/EssentialsUpdate/src/org/jibble/pircbot/PircBot.java @@ -15,7 +15,8 @@ found at http://www.jibble.org/licenses/ package org.jibble.pircbot; import java.io.*; -import java.net.*; +import java.net.InetAddress; +import java.net.Socket; import java.util.*; /** @@ -2558,7 +2559,7 @@ public abstract class PircBot implements ReplyConstants { * @see #onUserList(String,User[]) onUserList */ public final User[] getUsers(String channel) { - channel = channel.toLowerCase(); + channel = channel.toLowerCase(Locale.ENGLISH); User[] userArray = new User[0]; synchronized (_channels) { Hashtable users = (Hashtable) _channels.get(channel); @@ -2631,7 +2632,7 @@ public abstract class PircBot implements ReplyConstants { * Overwrite the existing entry if it exists. */ private final void addUser(String channel, User user) { - channel = channel.toLowerCase(); + channel = channel.toLowerCase(Locale.ENGLISH); synchronized (_channels) { Hashtable users = (Hashtable) _channels.get(channel); if (users == null) { @@ -2647,7 +2648,7 @@ public abstract class PircBot implements ReplyConstants { * Remove a user from the specified channel in our memory. */ private final User removeUser(String channel, String nick) { - channel = channel.toLowerCase(); + channel = channel.toLowerCase(Locale.ENGLISH); User user = new User("", nick); synchronized (_channels) { Hashtable users = (Hashtable) _channels.get(channel); @@ -2695,7 +2696,7 @@ public abstract class PircBot implements ReplyConstants { * Removes an entire channel from our memory of users. */ private final void removeChannel(String channel) { - channel = channel.toLowerCase(); + channel = channel.toLowerCase(Locale.ENGLISH); synchronized (_channels) { _channels.remove(channel); } @@ -2713,7 +2714,7 @@ public abstract class PircBot implements ReplyConstants { private final void updateUser(String channel, int userMode, String nick) { - channel = channel.toLowerCase(); + channel = channel.toLowerCase(Locale.ENGLISH); synchronized (_channels) { Hashtable users = (Hashtable) _channels.get(channel); User newUser = null; diff --git a/EssentialsUpdate/src/org/jibble/pircbot/User.java b/EssentialsUpdate/src/org/jibble/pircbot/User.java index cb2bfa051..37f981b19 100755 --- a/EssentialsUpdate/src/org/jibble/pircbot/User.java +++ b/EssentialsUpdate/src/org/jibble/pircbot/User.java @@ -13,6 +13,8 @@ found at http://www.jibble.org/licenses/ package org.jibble.pircbot; +import java.util.Locale; + /** * This class is used to represent a user on an IRC server. * Instances of this class are returned by the getUsers method @@ -38,7 +40,7 @@ public class User { User(String prefix, String nick) { _prefix = prefix; _nick = nick; - _lowerNick = nick.toLowerCase(); + _lowerNick = nick.toLowerCase(Locale.ENGLISH); } @@ -109,7 +111,7 @@ public class User { * @return true if the nicks are identical (case insensitive). */ public boolean equals(String nick) { - return nick.toLowerCase().equals(_lowerNick); + return nick.toLowerCase(Locale.ENGLISH).equals(_lowerNick); } |