Changeset db2dd3d
- Timestamp:
- Oct 21, 2003, 9:43:29 AM (21 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:
- 8c92848
- Parents:
- 15283bb
- Files:
-
- 2 edited
Legend:
- Unmodified
- Added
- Removed
-
ChangeLog
r15283bb rdb2dd3d 3 3 2.0.11-pre-1 4 4 Updated basic help 5 Display CC: in outgoing CC messages 5 6 6 7 2.0.10 -
zwrite.c
r2a2bb60 rdb2dd3d 216 216 void owl_zwrite_set_message(owl_zwrite *z, char *msg) 217 217 { 218 int i, j; 219 char toline[LINE]; 220 218 221 if (z->message) owl_free(z->message); 219 z->message=owl_strdup(msg); 222 223 j=owl_list_get_size(&(z->recips)); 224 if (j>0 && z->cc) { 225 strcpy(toline, "CC: "); 226 for (i=0; i<j; i++) { 227 if (strcmp(z->realm, "")) { 228 sprintf(toline, "%s%s@%s ", toline, (char *) owl_list_get_element(&(z->recips), i), z->realm); 229 } else { 230 sprintf(toline, "%s%s ", toline, (char *) owl_list_get_element(&(z->recips), i)); 231 } 232 } 233 z->message=owl_sprintf("%s\n%s", toline, msg); 234 } else { 235 z->message=owl_strdup(msg); 236 } 220 237 } 221 238 … … 241 258 j=owl_list_get_size(&(z->recips)); 242 259 if (j>0) { 243 char *tmpmsg=NULL;244 char toline[LINE];245 246 if (z->cc) {247 strcpy(toline, "CC: ");248 for (i=0; i<j; i++) {249 if (strcmp(z->realm, "")) {250 sprintf(toline, "%s%s@%s ", toline, (char *) owl_list_get_element(&(z->recips), i), z->realm);251 } else {252 sprintf(toline, "%s%s ", toline, (char *) owl_list_get_element(&(z->recips), i));253 }254 }255 tmpmsg=owl_malloc(strlen(z->message)+strlen(toline)+30);256 sprintf(tmpmsg, "%s\n%s", toline, z->message);257 }258 259 260 for (i=0; i<j; i++) { 260 261 if (strcmp(z->realm, "")) { … … 263 264 strcpy(to, owl_list_get_element(&(z->recips), i)); 264 265 } 265 if (z->cc) { 266 send_zephyr(z->opcode, z->zsig, z->class, z->inst, to, tmpmsg); 267 } else { 268 send_zephyr(z->opcode, z->zsig, z->class, z->inst, to, z->message); 269 } 270 } 271 if (z->cc) { 272 owl_free(tmpmsg); 266 send_zephyr(z->opcode, z->zsig, z->class, z->inst, to, z->message); 273 267 } 274 268 } else {
Note: See TracChangeset
for help on using the changeset viewer.