- Timestamp:
- Jan 28, 2003, 12:55:37 PM (22 years ago)
- Branches:
- master, barnowl_perlaim, debian, owl, release-1.10, release-1.4, release-1.5, release-1.6, release-1.7, release-1.8, release-1.9
- Children:
- ddb8252
- Parents:
- 5a35ae8e
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
examples/owlconf.simple
r1770f30 r2b14303 34 34 ### and when owl::format_msg() and owl::receive_msg() are run. 35 35 ### 36 ### $owl::class, $owl::instance, $owl::recipient, 36 ### $owl::class, $owl::instance, $owl::recipient, $owl::direction, 37 37 ### $owl::sender, $owl::opcode, $owl::zsig, 38 38 ### $owl::msg, $owl::time, $owl::host, @owl::fields, $owl::id … … 165 165 $owl::sender=~s/\@ATHENA\.MIT\.EDU$//; 166 166 $owl::sender=~s/\@local-realm$//; 167 $owl::recipient=~s/\@ATHENA\.MIT\.EDU$//; 168 $owl::recipient=~s/\@local-realm$//; 167 169 168 170 ## Format ping, login, and mail messages. … … 189 191 190 192 ## The remainder formats normal messages (eg, to classes and instances). 193 ## Outgoing messages have different headers than incoming messages. 191 194 ## Note that: 192 195 ## $out .= "foo"; appends "foo" to the end of the variable $out. … … 196 199 ## "foo"."bar" will append the two strings together. 197 200 198 $out = sprintf "[mit,%s,%s] / %s / %s", lc($owl::class), 199 lc($owl::instance), $owl::time, lc($owl::host); 200 if ($owl::opcode ne "") {$out.=" op:$owl::opcode";} 201 $out.="\n"; 202 $out.= " \@bold($owl::sender)> "; 203 if ($owl::zsig ne "") { 204 my $zsig = $owl::zsig; 205 $zsig =~ s/(\n.*)+$/ [...]/; 206 if (length($zsig)+5+length($owl::sender) > 70) { 207 $out.="# ..."; 208 } else { 209 $out.="# $zsig"; 201 202 if ($owl::direction eq "out") { 203 # Outgoing messages 204 205 $out .= sprintf "[outgoing to %s] / %s", $owl::recipient, $owl::time; 206 if ($owl::opcode ne "") {$out.=" op:$owl::opcode";} 207 $out.="\n"; 208 $out.= " \@bold($owl::sender)> "; 209 if ($owl::zsig ne "") { 210 my $zsig = $owl::zsig; 211 $zsig =~ s/(\n.*)+$/ [...]/; 212 if (length($zsig)+5+length($owl::sender) > 70) { 213 $out.="# ..."; 214 } else { 215 $out.="# $zsig"; 216 } 217 } 218 } else { 219 # Incoming messages 220 221 $out .= sprintf "[mit,%s,%s] / %s / %s", lc($owl::class), 222 lc($owl::instance), $owl::time, lc($owl::host); 223 if ($owl::opcode ne "") {$out.=" op:$owl::opcode";} 224 $out.="\n"; 225 $out.= " \@bold($owl::sender)> "; 226 if ($owl::zsig ne "") { 227 my $zsig = $owl::zsig; 228 $zsig =~ s/(\n.*)+$/ [...]/; 229 if (length($zsig)+5+length($owl::sender) > 70) { 230 $out.="# ..."; 231 } else { 232 $out.="# $zsig"; 233 } 210 234 } 211 235 } … … 220 244 # This makes personal messages bold. 221 245 if (uc($owl::class) eq "MESSAGE" && 222 uc($owl::instance) eq "PERSONAL") { 246 uc($owl::instance) eq "PERSONAL" && 247 $owl::direction eq "in") { 223 248 $out="\@bold{".$out."}"; 224 249 }
Note: See TracChangeset
for help on using the changeset viewer.