Re: Conditional From?

Morten Bo Johansen <[email protected]> Thu, 8 Jan 2015 17:42:02 +0100
Newsgroups gmane.network.slrn.user
Message-ID <[email protected]>
On 2015-01-08 J.B. Nicholson-Owens wrote:
> 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.

How about this?

    define set_cond_from ()
     {
        set_string_variable ("username", "user_default");
        set_string_variable ("hostname", "hostname_default");

        if (current_newsgroup == "gmane.network.slrn.user")
          {
             set_string_variable ("username", "other_user");
             set_string_variable ("hostname", "other_hostname");
          }
     }

There was also a misplaced semicolon after the if-statement.
  
  Morten
  


------------------------------------------------------------------------------
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