Changeset 3a6277a
- Timestamp:
- Aug 20, 2009, 2:46:46 AM (15 years ago)
- Branches:
- master, release-1.10, release-1.4, release-1.5, release-1.6, release-1.7, release-1.8, release-1.9
- Children:
- 362c932
- Parents:
- c854e74
- git-author:
- Anders Kaseorg <andersk@mit.edu> (08/20/09 02:17:47)
- git-committer:
- Anders Kaseorg <andersk@mit.edu> (08/20/09 02:46:46)
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
perl/lib/BarnOwl/Message/Zephyr.pm
r30e7ffd r3a6277a 83 83 my $mclass = shift; 84 84 my $minstance = shift; 85 my $class = "";85 my @class; 86 86 if (lc($mclass) ne "message") { 87 $class = "-c " . BarnOwl::quote($mclass);88 } 89 my $instance = "";87 @class = ('-c', $mclass); 88 } 89 my @instance; 90 90 if (lc($minstance) ne "personal") { 91 $instance = "-i " . BarnOwl::quote($minstance); 92 } 93 if (($class eq "") or ($instance eq "")) { 94 return $class . $instance; 95 } else { 96 return $class . " " . $instance; 97 } 91 @instance = ('-i', $minstance); 92 } 93 return (@class, @instance); 98 94 } 99 95 100 96 sub personal_context { 101 97 my ($m) = @_; 102 return context_reply_cmd($m->class, $m->instance);98 return BarnOwl::quote(context_reply_cmd($m->class, $m->instance)); 103 99 } 104 100 … … 178 174 } 179 175 180 my $cmd;176 my @cmd; 181 177 if(lc $self->opcode eq 'crypt' and ( not $sender or $self->is_private)) { 182 178 # Responses to zcrypted messages should be zcrypted, so long as we 183 179 # aren't switching to personals 184 $cmd = 'zcrypt';180 @cmd = ('zcrypt'); 185 181 } else { 186 $cmd = 'zwrite'; 187 } 188 189 my $context_part = context_reply_cmd($class, $instance); 190 $cmd .= " " . $context_part unless ($context_part eq ''); 182 @cmd = ('zwrite'); 183 } 184 185 push @cmd, context_reply_cmd($class, $instance); 191 186 if ($to ne '') { 192 187 $to = strip_realm($to); … … 196 191 delete $cc{strip_realm(BarnOwl::zephyr_getsender())}; 197 192 @cc = keys %cc; 198 $cmd .= " -C " . join(" ", @cc);193 push @cmd, '-C', @cc; 199 194 } else { 200 195 if(BarnOwl::getvar('smartstrip') eq 'on') { 201 196 $to = BarnOwl::zephyr_smartstrip_user($to); 202 197 } 203 $cmd .= " $to";198 push @cmd, $to; 204 199 } 205 200 } 206 return $cmd;201 return BarnOwl::quote(@cmd); 207 202 } 208 203
Note: See TracChangeset
for help on using the changeset viewer.