Login
User Name:

Password:



Register
Forgot your password?
Vote for Us!
tintin++ ogg sound player script for linux
Author: Robert Smith
Submitted by: Vladaar
6Dragons ogg Soundpack
Author: Vladaar
Submitted by: Vladaar
6Dragons 4.4
Author: Vladaar
Submitted by: Vladaar
LoP 1.46
Author: Remcon
Submitted by: Remcon
LOP 1.45
Author: Remcon
Submitted by: Remcon
Users Online
CommonCrawl, dextermovies

Members: 1
Guests: 9
Stats
Files
Topics
Posts
Members
Newest Member
481
3,740
19,387
627
MargoThurb
Today's Birthdays
There are no member birthdays today.
Related Links
» SmaugMuds.org » General » Smaug Snippets » Need help with the Pfile Prun...
Forum Rules | Mark all | Recent Posts

Need help with the Pfile Pruning Module
< Newer Topic :: Older Topic >

Pages:<< prev 1 next >>
Post is unread #1 May 31, 2003, 4:50 am
Go to the top of the page
Go to the bottom of the page

Greyson

GroupMembers
Posts5
JoinedMay 31, 2003

Hello,
I just recently downloaded and installed the pfile pruning module found on this website. I did it into a SWR codebase and everything works fine. Well almost. It seems that we already have this finger code that writes a .F file in the player directory. It uses the file to store the finger info. Now the only problem I have is the pfile pruning module won't delete that .F file. I've only been coding a few months so I'm not sure how to read some of the code I found in pfiles.c.
That said, could anyone please tell me how to make it delete these .F files? I don't know that it's going to cause a problem or not because so far all the code is on the muds test port. And there's no one there but imms and testchars. When I first ran it, it did clean out about 12 pfiles, so I'm sure it's working. Just leaving the .F file lying around in the player directory.
I just opened the finger.c file and it's showing to be stock Smaug stuff. I would change it over to the finger routines found on this site, except I was told that if I do that, it'll store the finger info in the pfile. And if the player then writes a pfile that's too large, it'll crash the mud every time the player connects.
Any help would be greatly appreciated.
       
Post is unread #2 May 31, 2003, 10:40 am
Go to the top of the page
Go to the bottom of the page

Samson
Black Hand
GroupAdministrators
Posts3,643
JoinedJan 1, 2002

It would take quite a feat to create a pfile large enough to crash the game. I think whoever told you that was smoking something they should be sharing :P

That said, you should be fine installing the updated finger code. The .F version may well have been one of the older versions I ported from at one time so it should be more or less the same code. I would upgrade to that, then just manually delete any .F files lying about. Easiest solution.
       
Post is unread #3 Jun 1, 2003, 12:24 am
Go to the top of the page
Go to the bottom of the page

Somnio

GroupMembers
Posts39
JoinedMay 25, 2003

Not true. There could be many reasons that can make the pfile crash the system... unfortuantly, most of them involve water and a trained chipanzee.
       
Post is unread #4 Jun 1, 2003, 10:42 am
Go to the top of the page
Go to the bottom of the page

Samson
Black Hand
GroupAdministrators
Posts3,643
JoinedJan 1, 2002

Yes, there could be many reasons a pfile would crash the system. But being too large isn't one of them. Not unless you manage to somehow store gigabytes worth of data on one.
       
Post is unread #5 Jun 1, 2003, 2:26 pm
Go to the top of the page
Go to the bottom of the page

Somnio

GroupMembers
Posts39
JoinedMay 25, 2003

Ooh.. do we get a cookie if we can manage that?
       
Post is unread #6 Jun 1, 2003, 11:58 pm
Go to the top of the page
Go to the bottom of the page

Samson
Black Hand
GroupAdministrators
Posts3,643
JoinedJan 1, 2002

Heh, if you manage to avoid destroying your system in the attempt, I'll give you 2 cookies
       
Post is unread #7 Jun 2, 2003, 3:52 pm
Go to the top of the page
Go to the bottom of the page

Greyson

GroupMembers
Posts5
JoinedMay 31, 2003

Well I downloaded and 'attempted' to install finger v3... It was written for Smaug, and wasn't very happy at all with SWR, is there one written specifically for SWR? I followed the instructions to the letter. (as best I could since some things were different, but got everything where it was supposed to be in the code). End result, I ended up with about 4 pages of errors.
       
Post is unread #8 Jun 3, 2003, 5:46 am
Go to the top of the page
Go to the bottom of the page

Xorith
The Null Value
GroupAFKMud Team
Posts254
JoinedFeb 23, 2003

This is why I need to learn C and unix file handling better. *g* I take it that the unlink(fname) is what deletes the file. If that is the case, you could do:
char finger_fname[MAX_STRING_LENGTH];
sprintf( finger_fname, "%s.F", fname);
and then copy the unlink check...

if ( unlink(finger_fname) == -1 )
perror("Unlink finger data";);

This is all found in fread_pfile in the pfile.c or equiv file.
       
Post is unread #9 Jun 4, 2003, 1:50 am
Go to the top of the page
Go to the bottom of the page

Samson
Black Hand
GroupAdministrators
Posts3,643
JoinedJan 1, 2002

SWR is merely a derivative of Smaug. Nothing overly special. You simply need to work out which bits are missing and add support for them. Fundamentally it's all the same though.
       
Post is unread #10 Jun 9, 2003, 3:21 am
Go to the top of the page
Go to the bottom of the page

Greyson

GroupMembers
Posts5
JoinedMay 31, 2003

Thanks for the help, I got the pfile cleanup stuff working great, except for the removal the .F files. And I solved that by getting finger v3 installed. Now I have a problem with that. So, I'll post a new topic about the finger snippet. That one's probably an easy one for you guys.

Thanks again,
       
Pages:<< prev 1 next >>