next message in archive
next message in thread
previous message in archive
previous message in thread
Index of Subjects
Index of Subjects On Sep 19, 2:51pm, "Michael T. Smith" wrote: } On Sat, 19 Sep 1998, David Lott wrote: } } > Can someone please point me in the right direction to accomplish this? The patch provided by Michael doesn't solve the problem at all. There are three problems with the patch. The first is that personal_mail_address isn't set in the default .lynxrc file. The second is that the user can use the S)ettings screen to modify personal_mail_address, which means that all this patch does is make it a bit harder for the user to change the address. And, finally, it doesn't provide a way to abort the posting. } At LYNews.c:130, you'll see: } } /* } * Get the mail address for the From header, } * offering personal_mail_address as default. } */ } addstr(_("\n\n Please provide your mail address for the From: header\n")); } strcpy(user_input, "From: "); } if (personal_mail_address) } strcat(user_input, personal_mail_address); } if (LYgetstr(user_input, VISIBLE, } sizeof(user_input), NORECALL) < 0 || } term_message) { } _statusline(NEWS_POST_CANCELLED); } sleep(InfoSecs); } fclose(fd); /* Close the temp file. */ } scrollok(stdscr, FALSE); /* Stop scrolling. */ } goto cleanup; } } } } Move addstr down 4 lines and add an #ifdef 0 / #endif to get: } } /* } * Get the mail address for the From header, } * offering personal_mail_address as default. } */ } strcpy(user_input, "From: "); } if (personal_mail_address) } strcat(user_input, personal_mail_address); This line should be changed to the following: { char hostname[128]; strcat(user_input, getpwuid(getuid())->pw_name); strcat(user_input, "@"); gethostname(hostname, 128); strcat(user_input, gethostbyname(hostname)->h_name); } Of course, if the information is already available in one of more variables, then those variables should be used. Also, the same thing should be done for the code that handles mailto: URL's. } #ifdef 0 } addstr(_("\n\n Please provide your mail address for the From: header\n")); } if (LYgetstr(user_input, VISIBLE, } sizeof(user_input), NORECALL) < 0 || } term_message) { } _statusline(NEWS_POST_CANCELLED); } sleep(InfoSecs); } fclose(fd); /* Close the temp file. */ } scrollok(stdscr, FALSE); /* Stop scrolling. */ } goto cleanup; } } } #endif This stuff should be replaced with something that will allow the canceling of the post. That work is being left as an exercise for the reader :-) }-- End of excerpt from "Michael T. Smith" Another change that I would like to see is for the "session start" syslog message to include the name of the account. P.S. Michael, how's the work coming on the new version of Lynx?
next message in archive
next message in thread
previous message in archive
previous message in thread
Index of Subjects