Skip to content

Commit

Permalink
Updated to v0.14-b1.
Browse files Browse the repository at this point in the history
  • Loading branch information
23rd committed Dec 28, 2020
2 parents 31e31cd + 874d8c9 commit 2a57dfa
Show file tree
Hide file tree
Showing 78 changed files with 7,642 additions and 1,053 deletions.
2 changes: 1 addition & 1 deletion src/chatty/Chatty.java
Original file line number Diff line number Diff line change
Expand Up @@ -57,7 +57,7 @@ public class Chatty {
* by points. May contain a single "b" for beta versions, which are counted
* as older (so 0.8.7b4 is older than 0.8.7).
*/
public static final String VERSION = "0.13.0.168";
public static final String VERSION = "0.14.0.168";

/**
* Enable Version Checker (if you compile and distribute this yourself, you
Expand Down
14 changes: 14 additions & 0 deletions src/chatty/SettingsManager.java
Original file line number Diff line number Diff line change
Expand Up @@ -297,6 +297,7 @@ public void defineSettings() {
settings.addBoolean("msgColorsEnabled", false);
settings.addList("msgColors", new LinkedList(), Setting.STRING);
settings.addBoolean("msgColorsPrefer", false);
settings.addBoolean("msgColorsLinks", true);

// Usercolors
settings.addBoolean("customUsercolors", false);
Expand Down Expand Up @@ -346,6 +347,8 @@ public void defineSettings() {
settings.addBoolean("reuseUserDialog", false);
settings.addString("userDialogTimestamp", "[HH:mm:ss]");
settings.addLong("clearUserMessages", 12);
settings.addMap("userNotes", new HashMap(), Setting.STRING);
settings.addMap("userNotesChat", new HashMap(), Setting.STRING);

// History / Favorites
settings.addMap("channelHistory",new TreeMap(), Setting.LONG);
Expand Down Expand Up @@ -416,6 +419,8 @@ public void defineSettings() {
settings.addMap("windows", new HashMap<>(), Setting.STRING);
settings.addLong("restoreMode", WindowStateManager.RESTORE_ON_START);
settings.addBoolean("restoreOnlyIfOnScreen", true);
settings.addLong("highlightDock", 0);
settings.addLong("ignoreDock", 0);

// Popouts
settings.addBoolean("popoutSaveAttributes", true);
Expand All @@ -437,6 +442,12 @@ public void defineSettings() {
settings.addBoolean("tabsMwheelScrollingAnywhere", true);
settings.addString("tabsPlacement", "top");
settings.addString("tabsLayout", "wrap");
settings.addLong("tabsLive", 16);
settings.addLong("tabsMessage", 4);
settings.addLong("tabsHighlight", 8);
settings.addLong("tabsStatus", 32);
settings.addLong("tabsActive", 128);
settings.addLong("tabsPopoutDrag", 2);

// Chat Window
settings.addBoolean("chatScrollbarAlways", false);
Expand Down Expand Up @@ -682,6 +693,9 @@ public void defineSettings() {
settings.addList("autoUnhostStreams", new ArrayList(), Setting.STRING);

settings.addMap("rewards", new HashMap(), Setting.STRING);

settings.addBoolean("pronouns", false);
settings.addBoolean("pronounsChat", false);


//===============
Expand Down
10 changes: 7 additions & 3 deletions src/chatty/TwitchClient.java
Original file line number Diff line number Diff line change
Expand Up @@ -1513,6 +1513,8 @@ else if (command.equals("bantest")) {
} catch (NumberFormatException ex) { }
StreamInfo info = api.getStreamInfo("tduva", null);
info.set("Test 2", "Game", viewers, System.currentTimeMillis() - 1000, StreamType.LIVE);
} else if (command.equals("newstatus")) {
g.setChannelNewStatus(parameter, "");
} else if (command.equals("refreshstreams")) {
api.manualRefreshStreams();
} else if (command.equals("usericonsinfo")) {
Expand Down Expand Up @@ -2553,6 +2555,7 @@ private class MyStreamInfoListener implements StreamInfoListener {
public void streamInfoUpdated(StreamInfo info) {
g.updateState(true);
g.updateChannelInfo(info);
g.updateStreamLive(info);
g.addStreamInfo(info);
String channel = "#"+info.getStream();
if (isChannelOpen(channel)) {
Expand Down Expand Up @@ -2726,9 +2729,10 @@ public void usericonsReceived(List<Usericon> icons) {
}

@Override
public void botNamesReceived(Set<String> botNames) {
public void botNamesReceived(String stream, Set<String> botNames) {
if (settings.getBoolean("botNamesFFZ")) {
botNameManager.addBotNames(null, botNames);
String channel = Helper.toValidChannel(stream);
botNameManager.addBotNames(channel, botNames);
}
}

Expand Down Expand Up @@ -2899,7 +2903,7 @@ public void onChannelJoined(User user) {
if (user.getRoom().hasTopic()) {
g.printLine(user.getRoom(), user.getRoom().getTopicText());
}
g.loadRecentMessages(user.getChannel());
g.loadRecentMessages(user);

// Icons and FFZ/BTTV Emotes
//api.requestChatIcons(Helper.toStream(channel), false);
Expand Down
5 changes: 4 additions & 1 deletion src/chatty/TwitchConnection.java
Original file line number Diff line number Diff line change
Expand Up @@ -920,6 +920,9 @@ private void updateUserFromTags(User user, MsgTags tags) {

Map<String, String> badgeInfo = Helper.parseBadges(tags.get("badge-info"));
String subMonths = badgeInfo.get("subscriber");
if (subMonths == null) {
subMonths = badgeInfo.get("founder");
}
if (subMonths != null) {
user.setSubMonths(Helper.parseShort(subMonths, (short)0));
}
Expand Down Expand Up @@ -1151,7 +1154,7 @@ void onUsernotice(String channel, String message, MsgTags tags) {
if (tags.isValueOf("msg-id", "resub", "sub", "subgift", "anonsubgift")) {
text = text.trim();
if (giftMonths > 1 && !text.matches(".* gifted "+giftMonths+" .*")) {
text += " They gifted "+giftMonths+" months!";
text += " It's a "+giftMonths+"-month gift!";
}
// There are still some types of notifications that don't have
// this info, and it might be useful
Expand Down
Loading

0 comments on commit 2a57dfa

Please sign in to comment.