File: timer.pl.diff

package info (click to toggle)
irssi-scripts 20231031
  • links: PTS, VCS
  • area: main
  • in suites: forky, sid, trixie
  • size: 4,120 kB
  • sloc: perl: 73,010; sh: 193; makefile: 6
file content (21 lines) | stat: -rw-r--r-- 872 bytes parent folder | download | duplicates (2)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
Description: "timer.pl: add repeat rate to /timer list"
Forwarded: not-needed
Author: "Christoph Berg <myon@debian.org>"
Last-Update: 2006-07-22
--- a/scripts/timer.pl
+++ b/scripts/timer.pl
@@ -144,11 +144,12 @@
 command_bind 'timer list' => sub {
     print( CRAP "Active timers:" );
     foreach my $name ( keys %timers ) {
+        my $msg = "$name = $timers{$name}->{'command'} every $timers{$name}->{'interval'}s";
         if ( $timers{$name}->{repeat} == -1 ) {
-            print( CRAP "$name = $timers{$name}->{'command'} (until stopped)");
+            print( CRAP "$msg (until stopped)");
         }
         else {
-            print( CRAP "$name = $timers{$name}->{'command'} ($timers{$name}->{'repeat'} repeats left)" );
+            print( CRAP "$msg ($timers{$name}->{'repeat'} repeats left)" );
         }
     }
     print( CRAP "End of /timer list" );