Re: Conditional From?

"J.B. Nicholson-Owens" <[email protected]> Wed, 07 Jan 2015 18:42:56 -0600
Newsgroups gmane.network.slrn.user
Message-ID <[email protected]>
Morten Bo Johansen wrote:
>      define set_cond_from ()
>      {
>         if (current_newsgroup == "gmane.network.slrn.user");
>           {
>              set_string_variable ("username", "user");
>              set_string_variable ("hostname", "hostname");
>           }
>      }

I suggest adding some code to handle how these variables should be set 
for all of the other newsgroups.

With that code they'll find slrn does the right thing until the user 
picks the gmane.network.slrn.user group. Then for all the groups they 
pick after picking that group they'll find the username and hostname 
variables are set incorrectly (namely, those variables are set to the 
values that are correct only for the gmane.network.slrn.user group).

Perhaps you could use a startup hook to record the initial values of the 
username and hostname variables and then set those variables to the 
initial values for all of the other groups.

Also, it could be interesting to parse the posts coming from the user so 
the post has the correct settings for outgoing posts too (just because 
the user is in group mode with group X selected, or in article mode 
inside group X, doesn't mean they're posting to group X).

------------------------------------------------------------------------------
Dive into the World of Parallel Programming! The Go Parallel Website,
sponsored by Intel and developed in partnership with Slashdot Media, is your
hub for all things parallel software development, from weekly thought
leadership blogs to news, videos, case studies, tutorials and more. Take a
look and join the conversation now. http://goparallel.sourceforge.net