diff --git a/src/chatty/TwitchClient.java b/src/chatty/TwitchClient.java
index a1d8c4932..c2b18aa5c 100644
--- a/src/chatty/TwitchClient.java
+++ b/src/chatty/TwitchClient.java
@@ -1628,6 +1628,11 @@ private void addCommands() {
commands.add("marker", p -> {
commandAddStreamMarker(p.getRoom(), p.getArgs());
});
+ commands.add("createClip", p -> {
+ api.createClip(p.getRoom().getStream(), result -> {
+ g.printLine(p.getRoom(), result);
+ });
+ });
c.addNewCommands(commands, this);
commands.add("addStreamHighlight", p -> {
commandAddStreamHighlight(p.getRoom(), p.getArgs());
diff --git a/src/chatty/User.java b/src/chatty/User.java
index a132b5d46..65fcd44f3 100644
--- a/src/chatty/User.java
+++ b/src/chatty/User.java
@@ -1,6 +1,7 @@
package chatty;
+import chatty.gui.Highlighter;
import chatty.gui.colors.UsercolorManager;
import chatty.util.api.usericons.Usericon;
import chatty.util.api.usericons.UsericonManager;
@@ -588,6 +589,38 @@ public synchronized int getNumberOfSimilarChatMessages(String compareMsg, int me
return result;
}
+ public synchronized int getMatchingMessages(Highlighter.HighlightItem item, int num, long time, boolean beforeTime) {
+ if (lines == null) {
+ return 0;
+ }
+ int result = 0;
+ int numMsgs = 0;
+ for (int i=lines.size() - 1; i>=0; i--) {
+ Message m = lines.get(i);
+ if (beforeTime) {
+ if (m.time > time) {
+ continue;
+ }
+ }
+ else {
+ if (m.time < time) {
+ return result;
+ }
+ }
+ if (m instanceof TextMessage) {
+ TextMessage tm = (TextMessage) m;
+ if (item.matchesTextOnly(tm.text, null)) {
+ result++;
+ }
+ numMsgs++;
+ if (numMsgs == num) {
+ return result;
+ }
+ }
+ }
+ return result;
+ }
+
public synchronized int getNumberOfMessagesAfterBan() {
if (lines == null) {
return -1;
diff --git a/src/chatty/gui/Channels.java b/src/chatty/gui/Channels.java
index c15e193b0..cfaeafb44 100644
--- a/src/chatty/gui/Channels.java
+++ b/src/chatty/gui/Channels.java
@@ -1601,6 +1601,12 @@ private static boolean isChanOffline(DockContent content) {
}
return false;
}
+
+ public void closeModPanels() {
+ for (Channel chan : getChannels()) {
+ chan.closeModPanel();
+ }
+ }
/**
* Sets the focus to the input bar when clicked anywhere on the channel.
diff --git a/src/chatty/gui/Highlighter.java b/src/chatty/gui/Highlighter.java
index 9e7824f60..e34a8d5c4 100644
--- a/src/chatty/gui/Highlighter.java
+++ b/src/chatty/gui/Highlighter.java
@@ -6,6 +6,7 @@
import chatty.Helper;
import chatty.Logging;
import chatty.User;
+import chatty.util.DateTime;
import chatty.util.Debugging;
import chatty.util.MiscUtil;
import chatty.util.Pair;
@@ -441,12 +442,12 @@ private void clearRecentMatches() {
* retrieve all match indices and some meta information.
*/
public static class HighlightItem {
-
+
public enum Type {
REGULAR("Regular chat messages"),
INFO("Info messages"),
ANY("Any type of message"),
- TEXT_MATCH_TEST("Only match text, any message type");
+ TEXT_MATCHING_ONLY("Only match text, any message type");
public final String description;
@@ -618,6 +619,12 @@ public boolean matches(Type type, String text, int msgStart, int msgEnd, Blackli
private ListModeration
Other Twitch Commands
/marker
)/createClip
- Attempt to create a clip. If it succeeds
+ it will output the clip edit link.Settings / Customization Commands
diff --git a/src/chatty/gui/components/help/help-settings.html b/src/chatty/gui/components/help/help-settings.html
index 7d40cf3c3..ac4dc7b6a 100644
--- a/src/chatty/gui/components/help/help-settings.html
+++ b/src/chatty/gui/components/help/help-settings.html
@@ -1026,6 +1026,39 @@ Meta Prefixes (Matching)
updated on channel join and when sending a message, so e.g. if you
get modded while already in the channel it will not be recognized
until after you have sent a message.
+ msgs:
/ !msgs:
matches on the
+ past messages of the user as they are shown in the User Dialog,
+ not including the message that triggered this Highlight checking.
+ The value is a list of one or several Highlight items, which will be
+ used to match against the text of the user's past messages (only one
+ item has to match, to require several items to match use separate
+ msgs:
prefixes).
+ For example msgs:"mlimit:1 start:!v","!vote"
checks if
+ the latest message begins with "!v" or any message contains "!vote".
+ The usual text matching related prefixes can be used, as well as
+ these additional prefixes:
+
+
+ mlimit:
limits how many messages are checked
+ (starting from the latest), for example mlimit:2
+ only checks the latest two messages (by default it checks
+ all).mtime:
limits how long ago messages are
+ checked, for example mtime:1h
only checks
+ messages from the last hour, whereas mtime:>1h
+ only checks messages from before the last hour (by
+ default it checks all).mreq:
defines how many messages must match, for
+ example mreq:3
requires at least three past
+ messages to match (by default at least one has to match).mtype:outer
ignores text matching in the msgs:
+ prefix itself (so for msgs:"mtype:outer abc"
+ the "abc" would have no effect) and instead uses the outer
+ item's text matching. For example msgs:"mtype:outer" start:!vote
+ would match if both the message and also a past message
+ begin with "!vote" (msgs:"start:!vote" start:!vote
+ would have the same effect).config:
to specify on or more options (separated by comma, no spaces):
config:firstmsg
- Restrict matching to the
diff --git a/src/chatty/gui/components/help/help-troubleshooting.html b/src/chatty/gui/components/help/help-troubleshooting.html
index 5736d5cbc..6a763c739 100644
--- a/src/chatty/gui/components/help/help-troubleshooting.html
+++ b/src/chatty/gui/components/help/help-troubleshooting.html
@@ -279,8 +279,9 @@ Error: Java is not recognized as an internal or external command (Windows)
should point to Java.
See next section. Of course you'll have to navigate to the folder - manually.
+Check if Chatty writes to any files in the debuglogs
folder
+ (by default <homedir>/.chatty/debuglogs
,
+ for example C:\Users\yourname\.chatty\debuglogs
).
@@ -1462,6 +1462,7 @@ |