Article View: news.software.readers
Article #205865Re: [Dialog] User-Agent Header PCLinuxOS 2007
From: Gember Breuk
Date: Fri, 14 Sep 2007 19:56
Date: Fri, 14 Sep 2007 19:56
64 lines
2819 bytes
2819 bytes
On Thu, 13 Sep 2007 01:30:43 -0400, Anon wrote:
> On Thu, 13 Sep 2007 00:48:06 -0400, Gember Breuk wrote:
>> On Wed, 12 Sep 2007 23:38:27 -0400, anonymous@free.fr wrote:
>>
>> Yes, there is.
>>
>> http://www.40tude.com/dialog/wiki/index.php/CustomizeUserAgent
>
> That just adds something at the end of the User-Agent string. But I want to
> change the words "Dialog/etc". That script does NOT do what I want!
Oh, don't get excited. Here's a script that will change almost any text
you want before sending the post. Just change the "old_text" and
"new_text" constructs as needed:
<-------------------------------------->
program OnBeforeSendingMessage;
const old_text='A Dialog by any other name... ';
const new_text ='Dialog by any other name...';
function StringReplace(S, OldPattern, NewPattern: string): string;
var
SearchStr, Patt, NewStr: string;
Offset: Integer;
begin
SearchStr := S;
Patt := OldPattern;
NewStr := S;
Result := '';
while SearchStr <> '' do
begin
Offset := AnsiPos(Patt, SearchStr);
if Offset = 0 then
begin
Result := Result + NewStr;
Break;
end;
Result := Result + Copy(NewStr, 1, Offset - 1) + NewPattern;
NewStr := Copy(NewStr, Offset + Length(OldPattern), 2147483647);
SearchStr := Copy(SearchStr, Offset + Length(Patt), 2147483647);
end;
end;
function OnBeforeSendingMessage(var Message: TStringlist; Servername:
string; IsEmail: boolean):boolean;
var s:string;
begin
result:=true;
s:=message.text;
s:=StringReplace(s,old_text,new_text);
message.text:=s;
end;
begin
end.
<-------------------------------------->
--
Gem
Technical Details
Message-ID:
<irrz30ed4cbb.dlg@blackholespam.net>Path:
mbox-mo1.pugleaf.net!archive.usenet.blueworldhosting.com!illumos!news.pugleaf.net!.TX!archive.pugleaf.net!archive.newsdeef.eu!mbox2nntp-news.software.readers.20140922.mbox.gz!number1.nntp.dca.giganews.com!border1.nntp.dca.giganews.com!nntp.giganews.com!newsfeed00.sul.t-online.de!newsfeed01.sul.t-online.de!t-online.de!fu-berlin.de!uni-berlin.de!individual.net!not-for-mailReferences:
<dr7lcptqw7pe.qqc1uiyng334$.dlg@40tude.net> <1blxavupdk9bb$zmnl@blackholespam.net> <1tr6kfbi66c3o$.1n54cwiu0xypu$.dlg@40tude.net>Show Full Headers
Complete Article Headers
Message-ID: <irrz30ed4cbb.dlg@blackholespam.net> Subject: Re: [Dialog] User-Agent Header PCLinuxOS 2007 Date: Fri, 14 Sep 2007 15:56:46 -0400 From: Gember Breuk <dumpspam@blackholespam.net> References: <dr7lcptqw7pe.qqc1uiyng334$.dlg@40tude.net> <1blxavupdk9bb$zmnl@blackholespam.net> <1tr6kfbi66c3o$.1n54cwiu0xypu$.dlg@40tude.net> Path: mbox-mo1.pugleaf.net!archive.usenet.blueworldhosting.com!illumos!news.pugleaf.net!.TX!archive.pugleaf.net!archive.newsdeef.eu!mbox2nntp-news.software.readers.20140922.mbox.gz!number1.nntp.dca.giganews.com!border1.nntp.dca.giganews.com!nntp.giganews.com!newsfeed00.sul.t-online.de!newsfeed01.sul.t-online.de!t-online.de!fu-berlin.de!uni-berlin.de!individual.net!not-for-mail Newsgroups: news.software.readers Organization: Willekeurige orde Lines: 64 Mime-Version: 1.0 Content-Type: text/plain; charset="us-ascii" Content-Transfer-Encoding: 7bit X-Trace: individual.net TnvP1eR+6+s9YU7VsBktugImjbiV1c4evKjU+d2LPFPQfTAVk= Cancel-Lock: sha1:1V/x214oH23pRDW4xl5905ED2xQ= User-Agent: A Dialog by any other name... (1a438687.102.72)