1234567891011121314151617181920212223242526272829303132333435363738394041 |
- use strict;
- use v5.10;
- AddModuleDescription('signature.pl', 'Signature Extension');
- our ($Now, @MyRules, @MyMacros);
- push(@MyRules, \&SignatureExceptionRule);
- push(@MyMacros, sub{ s/(?<![!+])\+\+\+\+/'-- ' . GetParam('username', T('Anonymous'))
- . ' ' . TimeToText($Now) /eg });
- push(@MyMacros, sub{ s/(?<![!+])\+\+\+/'-- ' . GetParam('username', T('Anonymous'))/eg });
- push(@MyMacros, sub{ s/(?<![!+])\~\~\~\~/GetParam('username', T('Anonymous'))
- . ' ' . TimeToText($Now) /eg });
- push(@MyMacros, sub{ s/(?<![!~])\~\~\~/GetParam('username', T('Anonymous'))/eg });
- sub SignatureExceptionRule {
- if (m/\G!\+\+\+/cg) {
- return '+++';
- } elsif (m/\G!\~\~\~/cg) {
- return '~~~';
- }
- return;
- }
|