File: sirc-timestamp.pl

package info (click to toggle)
pisg 0.71-1
  • links: PTS
  • area: main
  • in suites: etch, etch-m68k
  • size: 1,228 kB
  • ctags: 357
  • sloc: perl: 7,472; xml: 3,144; sed: 169; makefile: 48; tcl: 23; awk: 15
file content (26 lines) | stat: -rw-r--r-- 708 bytes parent folder | download | duplicates (7)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
# sirc-timestamp.pl
# script for sirc irc client  which shows time in every line
# by bartko!misiopysio09@netscape.net
# http://mywebpage.netscape.com/bartek09/

$add_ons.="+sirc-timestamp.pl";

sub whattime {
   ($sec,$min,$hour) = localtime(time);
   ($min < 10) && ($min = "0" . $min);
   ($hour < 10) && ($hour = "0" . $hour);
   return "$hour:$min";
}
 
sub hook_timeprint {
  my ($theline) = $_[0];
  $_[0] = whattime() . ' ' . $theline;
}
addhook ('print','timeprint');

&addhelp("timestamp","This is \cusirc-timestamp.pl\cu for sirc by \cbbartko\cb

The script adds timestamps in format hh:mm at the
beginning of each line");

print("*\cba\cb* \cbbartko\cb's \cvsirc-timestamp.pl\cv loaded ... \n");