Updating ChangeLog for 4.22.10
[centerim.git] / misc / cimformathistory
blobb75bcea8e61877ef1de2503f7b0e75acd4308e5d
1 #!/bin/gawk -f
3 # 2008-06-04
4 # initial script by Ilya Sukhanov <ilya@sukhanov.net>
5 # http://dotcommie.net/?id=155
7 # 2010-07-31
8 # Documentation and formating by Boris Petersen <transacid@centerim.org>
10 # Usage: cimformathistory history
11 # where <history> is the history file in ~/.centerim/<id>/history
14 BEGIN \
16 FS="\n";
17 RS="\f\n";
18 # change this to the nick of the buddy
19 from="foo";
20 # change this to your nick
21 to="bar";
24 if (match ($2,"MSG")) { if (match($1,"IN")) a=from;
25 else a=to;
26 # you can modify the format of the timestamp
27 # here. please refer to `man 3 strftime`
28 # this example will look like:
29 # 2010/07/27 [16:31:36]
30 printf("%s %s: %s", strftime("%Y/%m/%d [%H:%M:%S]", $4), a, $5);
31 for (i=6; i<=NF;i++) printf("\t\t%s\n", $i);