File: setmail

package info (click to toggle)
epic5 3.0.3-1
  • links: PTS
  • area: main
  • in suites: forky, sid
  • size: 5,328 kB
  • sloc: ansic: 75,810; makefile: 648; ruby: 227; python: 215; sh: 78; perl: 13
file content (34 lines) | stat: -rw-r--r-- 800 bytes parent folder | download | duplicates (5)
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
27
28
29
30
31
32
33
34
if (word(2 $loadinfo()) != [pf]) { load -pf $word(1 $loadinfo()); return; };

# SetMail -- Here's the plan.
#
# When you have /set mail 1, you want to see (Mail).
# When you have /set mail 2, you want to see (Mail :%d).
# Where (Mail) is controlled by /set mail_format1
# And (Mail :%d) is controlled by /set mail_format2.
#
# This script is a good example of how to use /on set to add a new /set
# and change the default behavior of an existing /set to do something that
# you otherwise couldn't do! =)
#

@ mail.format1 = [ (Mail)];
@ mail.format2 = [ (Mail: %M)];

on %set "mail 1" {
	^set status_mail $mail.format1;
};

on %set "mail 2" {
	^set status_mail $mail.format2;
};

on %set "mail_format1 *" {
	@ mail.format1 = [$1-];
};

on %set "mail_format2 *" {
	@ mail.format2 = [$1-];
};

#hop'97