Register to post in forums, or Log in to your existing account
 

Play RetroMUD
Post new topic  Reply to topic     Home » Forums » zMUD General Discussion
yelayon
Novice


Joined: 15 Mar 2005
Posts: 42

PostPosted: Sun Dec 11, 2005 9:53 am   

LDMuds coding and putfile/getfile
 
Hello

Recently I've started to code LPC mud and I have problem with putfile/getfile to/from mud. (putfile/getfile are my aliases that I've coded in the way they are in TF (sic!) ).
The problem is when file is big - over 10kB.
Trying to get such a file I get *** Text lost in transmition ***.

Is there a way to fix that 'text lost' and improve connection?

Rgds, W.
Reply with quote
TonDiening
GURU


Joined: 26 Jul 2001
Posts: 1958
Location: Canada

PostPosted: Tue Dec 13, 2005 1:24 am   
 
How exactly does putfile and getfile work with that mud?

I've been using a web based UI far too long.
Reply with quote
yelayon
Novice


Joined: 15 Mar 2005
Posts: 42

PostPosted: Tue Dec 13, 2005 9:45 am   
 
It is just symulation of using 'ed' on LDMuds.

My script looks like:
Code:

#CLASS {Dune|Wizard|Files}
#ALIAS getFile {#IF (%len(%1)) {#T+ getFileTrg1;#VARIABLE getFileName %1;#SEND {ed %1}}}
#ALIAS putFile {#PRI {#IF (%len(%1)) {#VARIABLE putFileName %1;#SEND {cp %concat(@curDirectory, "/", @putFileName) %concat("/players/absurd/backup/",@putFileName,".",%time(yymmddhhnn))};#SEND {ed %concat(@curDirectory, "/", @putFileName)};#SEND {1,$d};#SEND {a};#SEND %replace(%concat(@rootFileDir, @curDirectory, "/", %if(@putFileName="CHANGE","CHANGE.txt",@putFileName)),"/","\");#SEND {.};#SEND {w};#SEND {q};#IF (%right(@putFileName,%len(@putFileName)-2) = ".c") {#SEND {compile %concat(@curDirectory, "/", @putFileName)};#SEND {update %concat(@curDirectory, "/", @putFileName)}};#IF (%right(@putFileName,%len(@putFileName)-2) = ".h") {#SEND {compile %concat(@curDirectory, "/", @putFileName)}}}}}
#VAR rootFileDir {C:/Waldek/zMud/Dune/Files/SRC} {C:/Waldek/zMud/Dune/Files/SRC}
#VAR getFileName {} {}
#VAR curDirectory {/players/absurd} {}
#VAR putFileName {} {}
#REGEX "getFileTrg2" {^:Exit from ed\.$} {#LOG;#T- getFileTrg2} "" {disable}
#REGEX "getFileTrg1" {^(.*)} {#IF ("%1" = ":") {#T- getFileTrg1;#IF (@getFileName & @curDirectory) {#T+ getFileTrg2;#SEND {1,$p};#SEND {q};#LOG %concat(@rootFileDir,@curDirectory,"/",@getFileName) new}}} "" {prompt|disable}
#REGEX {^Current directory: (.*)$} {#VARIABLE curDirectory %1} "" {disable}
#REGEX {^Absurd@(.*)>$} {#VARIABLE curDirectory %1}
#CLASS 0


I had to make workaround for trigger for single ':' because it doesn't worked (tried everything, regexp and old-way, special chars etc).

Rgds, W.
Reply with quote
TonDiening
GURU


Joined: 26 Jul 2001
Posts: 1958
Location: Canada

PostPosted: Tue Dec 13, 2005 1:50 pm   
 
#SEND {1,$d}

How big is variable $d?

How is variabe $d storing information?

I'm assuming its there that is too fast for transmissing.
Reply with quote
yelayon
Novice


Joined: 15 Mar 2005
Posts: 42

PostPosted: Tue Dec 13, 2005 2:37 pm   
 
1,$d means display lines from first (number: 1) to the last line (sign: $) and 'd' is just display command for 'ed'.
Those are parameters to LDMud's 'ed' editor.
Result is that whole file is displayed as mud output.
And aprox. if file is 10kB or bigger I got *** TEXT LOST .... *** info.

W.
Reply with quote
TonDiening
GURU


Joined: 26 Jul 2001
Posts: 1958
Location: Canada

PostPosted: Tue Dec 13, 2005 2:49 pm   
 
Ahh the mud is spamming you the 10kB+ file and its overloading its interface.

Google reveals this problem:
http://mantis.bearnip.com/view.php?id=401
http://lists.bearnip.com/pipermail/ldmud-bugs/2005-September/000745.html

Code example:
http://www.oompa-loompa.net/mush/softcode/muSource/ldmud/src/comm.c

Maybe the hardcoders can add tail and head to get the 1/2 half and second half of large files?

Of can you change the $d to half way or get from line 1 to line 50, then 50 to 100, 101 to 150 etc?

That or try a few times during non-peak times to see if it can get through.
Reply with quote
Display posts from previous:   
Post new topic   Reply to topic     Home » Forums » zMUD General Discussion All times are GMT
Page 1 of 1

 
Jump to:  
You cannot post new topics in this forum
You cannot reply to topics in this forum
You cannot edit your posts in this forum
You cannot delete your posts in this forum
You cannot vote in polls in this forum

© 2009 Zugg Software. Hosted by Wolfpaw.net