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 | 220d68f375bd117587c91f9478434eee517a33d7 (patch) | |
tree | 6344f983d195a4c8d091afffc9d2f8bdbca929bb /EssentialsUpdate/src/org/jibble/pircbot | |
parent | 19f5a2340d9fdb3902f5c388f463fd569943db07 (diff) | |
download | Essentials-220d68f375bd117587c91f9478434eee517a33d7.tar Essentials-220d68f375bd117587c91f9478434eee517a33d7.tar.gz Essentials-220d68f375bd117587c91f9478434eee517a33d7.tar.lz Essentials-220d68f375bd117587c91f9478434eee517a33d7.tar.xz Essentials-220d68f375bd117587c91f9478434eee517a33d7.zip |
Switch to the new I18n class and format cleanup of all classes
Diffstat (limited to 'EssentialsUpdate/src/org/jibble/pircbot')
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); } |