]> git.99rst.org Git - irssi-scripts.irssi.org.git/commitdiff
Added an /ack_spoke command to make as though you spoke in the current window without...
authorIsaacG <redacted>
Tue, 19 Oct 2010 16:43:29 +0000 (12:43 -0400)
committerbw1 <redacted>
Mon, 8 Jan 2018 17:18:10 +0000 (18:18 +0100)
scripts/ack.pl

index d7687f5cdac68d42ae8e944c4765a63cd620762a..518739485839aab724d7c8b92fda954c6df28b57 100644 (file)
@@ -99,7 +99,13 @@ sub cmd_own_public
        my ($server, $msg, $target) = @_;
        my $window = $server->window_find_item($target);
        my $refnum = $window->{'refnum'};
-       # First remove the refnum from the list if it exists
+       $last_spoke{$refnum} = time;
+}
+
+sub cmd_ack_spoke
+{
+       my ($data, $server, $witem) = @_;
+       my $refnum = $witem->window()->{'refnum'};
        $last_spoke{$refnum} = time;
 }
 
@@ -111,6 +117,9 @@ Irssi::command_bind("ack", "cmd_ack");
 Irssi::command_bind("ack_del", "cmd_ack_del"); 
 Irssi::command_bind("ack_add", "cmd_ack_add"); 
 
+# Command to add a window to the last_spoke hash for temporary priority increase
+Irssi::command_bind("ack_spoke", "cmd_ack_spoke"); 
+
 # Hook to track when you last_spoke in a channel
 Irssi::signal_add("message own_public", "cmd_own_public"); 
 Irssi::signal_add("message irc own_action", "cmd_own_public"); 
git clone https://git.99rst.org/PROJECT