Thread View: news.software.readers
3 messages
3 total messages
Started by Gerbrand van Dieijen
Tue, 29 Jun 1999 00:00
Multiple perso. in slrn
Author: Gerbrand van Dieijen
Date: Tue, 29 Jun 1999 00:00
Date: Tue, 29 Jun 1999 00:00
6 lines
894 bytes
894 bytes
Is there a way to have multiple personalities in slrn, different ones per group? I suppose it's possible (it's possible in other newsreaders), but I don't know how to do it.
Re: Multiple perso. in slrn
Author: Tomasz 'tsca' Sienicki
Date: Tue, 29 Jun 1999 00:00
Date: Tue, 29 Jun 1999 00:00
17 lines
1513 bytes
1513 bytes
Gerbrand van Dieijen wrote
[in <slrn7ni9h2.afj.gerbrand@twisted.demon.nl>]:
> Is there a way to have multiple personalities in slrn, different ones per
> group? I suppose it's possible (it's possible in other newsreaders), but I
> don't know how to do it.
Yes, slrn is very schizophrenia-friendly. Read README.macros in slrn
documentation, and play with post_hook and followup_hook.
--
tsca life is short: take risks *
Tomasz Sienicki <tsca@cryogen.com> if you win, you'll be happy *
if you lose, you'll be wise *
--- [ phevbfvgl xvyyrq gur png ] --------------------------- (anonymous) *
Re: Multiple perso. in slrn
Author: Anonymous
Date: Tue, 29 Jun 1999 00:00
Date: Tue, 29 Jun 1999 00:00
104 lines
3334 bytes
3334 bytes
On Tue, 29 Jun 1999 22:01:38 +0200, Gerbrand van Dieijen wrote:
> Is there a way to have multiple personalities in slrn, different ones per
> group?
ITYM different names, slrn is good but I don't think, even if you /really/
want to change, that it can change your personality.
There are two ways, AFAIK. I'm sure someone will ppost one, so I will do the
other. Both use a little s-lang...
In your slrn.sl, or whatever is executed at startup:
define SetFromAddress(strNewsgroups)
{
if (is_substr (strNewsgroups, "alt.devilbunnies"))
{
set_string_variable ("realname", "Bugs Moron");
}
else
{
set_string_variable ("realname", "Gary Jones");
}
}
define SetNameByNG (file)
{
variable header_file, body_file;
variable fp, header_fp, body_fp;
variable line;
variable strNewsgroups;
fp = fopen (file, "r");
if (fp == NULL)
return;
header_file = file + "-header";
body_file = file + "-body";
header_fp = fopen (header_file, "w");
body_fp = fopen (body_file, "w");
if ((header_fp == NULL) or (body_fp == NULL))
return;
while (-1 != fgets (&line, fp))
{
if (line == "\n")
{
break;
}
else
{
if (is_substr(line, "Newsgroups: "))
{
strNewsgroups = substr(line,
strlen("Newsgroups: ")+1,
strlen(line) - strlen("Newsgroups: ") - 1);
% just setting the realname variable is fine at this point,
% as no From line has yet been written
SetFromAddress(strNewsgroups);
}
}
() = fputs (line, header_fp);
}
() = fclose (header_fp);
% Now do body
while (-1 != fgets (&line, fp))
{
() = fputs (line, body_fp);
}
() = fclose (body_fp);
fp = fopen (file, "w");
body_fp = fopen (body_file, "r");
header_fp = fopen (header_file, "r");
while (-1 != fgets (&line, header_fp))
() = fputs (line, fp);
() = fputs ("\n", fp);
while (-1 != fgets (&line, body_fp))
() = fputs (line, fp);
% No need to close files unless we want to check for errors. When
% file pointer variables go out of scope, slang will close the file.
}
define post_file_hook(file)
{
SetNameByNG(file);
}
The other method, which uses the current_newsgroup variable (?) doesn't work
if you post from the group list - this can be a bit embrassing :-/
Thread Navigation
This is a paginated view of messages in the thread with full content displayed inline.
Messages are displayed in chronological order, with the original post highlighted in green.
Use pagination controls to navigate through all messages in large threads.
Back to All Threads