Login
User Name:

Password:



Register
Forgot your password?
Vote for Us!
parse description bug
Dec 15, 2017, 10:08 pm
By Remcon
Couple bugs
Dec 12, 2017, 5:42 pm
By Remcon
Bug in disarm( )
Nov 12, 2017, 6:54 pm
By GatewaySysop
Bug in will_fall( )
Oct 23, 2017, 1:35 am
By GatewaySysop
Bug in do_zap( ), do_brandish( )
Oct 18, 2017, 1:52 pm
By GatewaySysop
LOP 1.45
Author: Remcon
Submitted by: Remcon
LOP Heroes Edition
Author: Vladaar
Submitted by: Vladaar
Heroes sound extras
Author: Vladaar
Submitted by: Vladaar
6Dragons 4.3
Author: Vladaar
Submitted by: Vladaar
Memwatch
Author: Johan Lindh
Submitted by: Vladaar
Users Online
CommonCrawl, Yahoo!, Bing

Members: 0
Guests: 10
Stats
Files
Topics
Posts
Members
Newest Member
477
3,706
19,240
608
LAntorcha
Today's Birthdays
There are no member birthdays today.
Related Links
» SmaugMuds.org » Codebases » SmaugFUSS » Stock Helpfiles incorrect list
Forum Rules | Mark all | Recent Posts

Stock Helpfiles incorrect list
< Newer Topic :: Older Topic >

Pages:<< prev 1, 2 next >>
Post is unread #21 May 12, 2005, 8:42 am
Go to the top of the page
Go to the bottom of the page

Zeno
Sorcerer
GroupMembers
Posts723
JoinedMar 5, 2005

Remcon's snippet still caused crashes, but we removed all the bad helpfiles, so there are no more crashes due to the similar helpfile snippet.
       
Post is unread #22 May 16, 2005, 3:10 pm
Go to the top of the page
Go to the bottom of the page

Zeno
Sorcerer
GroupMembers
Posts723
JoinedMar 5, 2005

Latest SmaugFUSS released unmodified, Remcon's snippet.
help 5
--- Disconnected on Monday, May 16, 2005, 6:11 PM ---
--- Connected for 1 minute, 2 seconds ---


#0  0x4007447e in vfprintf () from /lib/libc.so.6
(gdb) bt
#0  0x4007447e in vfprintf () from /lib/libc.so.6
#1  0x40095c70 in vsnprintf () from /lib/libc.so.6
#2  0x080ed354 in pager_printf (ch=0x8494df0, fmt=0x81c4d84 "&wNo help on '%s' found.&D\n\r";) at color.c:1377
#3  0x0808513a in do_help (ch=0x8494df0, argument=0xbff04600 "51";) at act_info.c:2030

And about x100 more frames.
       
Post is unread #23 May 16, 2005, 6:29 pm
Go to the top of the page
Go to the bottom of the page

GatewaySysop
Conjurer
GroupMembers
Posts367
JoinedMar 7, 2005

Zeno said:

Latest SmaugFUSS released unmodified, Remcon's snippet.
help 5
--- Disconnected on Monday, May 16, 2005, 6:11 PM ---
--- Connected for 1 minute, 2 seconds ---


#0  0x4007447e in vfprintf () from /lib/libc.so.6
(gdb) bt
#0  0x4007447e in vfprintf () from /lib/libc.so.6
#1  0x40095c70 in vsnprintf () from /lib/libc.so.6
#2  0x080ed354 in pager_printf (ch=0x8494df0, fmt=0x81c4d84 "&wNo help on '%s' found.&D\n\r";) at color.c:1377
#3  0x0808513a in do_help (ch=0x8494df0, argument=0xbff04600 "51";) at act_info.c:2030

And about x100 more frames.


I'm curious if adding the check proposed in an earlier post to get_help would solve this problem? I think this particular thing was what it was cooked up on the MudPlanet forums anyway. You might at least give it a shot on this thus-far unmodified install to see what happens. I know I'm personally very curious. :thinking:

Further, I have said snippet in (and said fix) and cannot reproduce this behavior at all. Another reason for my curiosity.

       
Post is unread #24 May 16, 2005, 7:38 pm
Go to the top of the page
Go to the bottom of the page

Zeno
Sorcerer
GroupMembers
Posts723
JoinedMar 5, 2005

You're using an unmodified SmaugFUSS (no helpfiles removed) and the Remcon snippet and it doesn't crash? It should...
       
Post is unread #25 May 16, 2005, 8:28 pm
Go to the top of the page
Go to the bottom of the page

Samson
Black Hand
GroupAdministrators
Posts3,639
JoinedJan 1, 2002

Crash confirmed - unmodified FUSS package, Remcon code added. Too a few random tries but it finally barfed for me on "help 51".

The get_help fix seems to work to stop the crash.
Only problem I see is it kinda cripples the point if someone types "help 53 wearlocs" and is told there are no matches and nothing suggestable for that, when "wearlocs" is pretty damn close.

Anyway, to recap, in get_help:

   if( isdigit( argument[0] ) )
   {
      lev = number_argument( argument, argnew );
      argument = argnew;
   }


Becomes:

   if( isdigit( argument[0] ) && !is_number( argument ) )
   {
      lev = number_argument( argument, argnew );
      argument = argnew;
   }


Will get this posted on the fixlist later, I need sleep right now :)
       
Post is unread #26 May 16, 2005, 10:22 pm
Go to the top of the page
Go to the bottom of the page

GatewaySysop
Conjurer
GroupMembers
Posts367
JoinedMar 7, 2005

Zeno said:

You're using an unmodified SmaugFUSS (no helpfiles removed) and the Remcon snippet and it doesn't crash? It should...


Egads, stock? :stare: Not for quite a while.

I was just using helpfiles like the one you describe to try and crash it, because I long since gutted all the duped entries and fixed the rest.

       
Post is unread #27 Aug 20, 2005, 7:03 pm
Go to the top of the page
Go to the bottom of the page

Remcon
Geomancer
GroupAdministrators
Posts1,866
JoinedJul 26, 2005

Sorry I am late on this reply but I hadnt read all this till today :)

Stock SmaugFUSS help
Handled help immo fine
Handled help 1 <-> 100 fine
Handled help righ fine

Suggested Help added
Handled help immo fine
Handled help righ fine
Handled help 1 <-> 100 fine (seen something in it though I didnt like so probably fix what it showed)
// Should really put the opening only suggested helpfile on next line.
*No help on '51' found.
*Suggested Help Files:
* 51 Opening only suggested helpfile.
*No help on that word.

Samson if you get a chance do this in the suggested help files snippet for me
Change
      if( totalmatched == 0 )
      {
         send_to_pager( "&C&GNo suggested help files.\n\r", ch );
         return;
      }
      if( totalmatched == 1 && lastmatch != NULL && lastmatch[0] != '\0' )
      {
         send_to_pager( "&COpening only suggested helpfile.&D\n\r", ch );
         do_help( ch, lastmatch );
         return;
      }
      if( found > 0 && found <= 3 )
         send_to_pager( "\n\r", ch );

to this
      if( found != 0 )
         send_to_pager( "\n\r", ch );
      if( totalmatched == 0 )
      {
         send_to_pager( "&GNo suggested help files.&D\n\r", ch );
         return;
      }
      if( totalmatched == 1 && lastmatch != NULL && lastmatch[0] != '\0' )
      {
         send_to_pager( "&COpening only suggested helpfile.&D\n\r", ch );
         do_help( ch, lastmatch );
         return;
      }


Similar Help snippet added
Valgrind complained on help immo
Valgrind complained on help righ
// This was reported from both the ones above
*==2005-08-20 21:45:08.244 14022==
*==2005-08-20 21:45:08.244 14022== Conditional jump or move depends on uninitialised value(s)
*==2005-08-20 21:45:08.244 14022== at 0x806E1A3: str_similarity (act_info.c:2017)
*==2005-08-20 21:45:08.244 14022== by 0x806E36C: similar_help_files (act_info.c:2078)
*==2005-08-20 21:45:08.244 14022== by 0x806E551: do_shelp (act_info.c:2134)
*==2005-08-20 21:45:08.244 14022== by 0x81116DB: interpret (interp.c:552)
*==2005-08-20 21:45:08.244 14022== by 0x80D5C95: game_loop (comm.c:893)
*==2005-08-20 21:45:08.244 14022== by 0x80D5235: main (comm.c:550)
Handled help 1 <-> 100 fine

Now it never actually crashed and I couldnt even get valgrind to complain on mine.
Guess it should also be mentioned that the get_help fix hasnt been added into smaugfuss yet :)
HELP_DATA *get_help( CHAR_DATA * ch, char *argument )
{
   char argall[MAX_INPUT_LENGTH];
   char argone[MAX_INPUT_LENGTH];
   char argnew[MAX_INPUT_LENGTH];
   HELP_DATA *pHelp;
   int lev;

   if( argument[0] == '\0' )
      argument = "summary";

   if( isdigit( argument[0] ) )
   {
      lev = number_argument( argument, argnew );
      argument = argnew;
   }

So it wasnt that fix keeping it from crashing, am i missing something or what?
Can anyone give me like something thats in stock smaugfuss that i could try to see the help on that would crash it?
       
Post is unread #28 Aug 20, 2005, 7:44 pm   Last edited Aug 20, 2005, 8:27 pm by Remcon
Go to the top of the page
Go to the bottom of the page

Remcon
Geomancer
GroupAdministrators
Posts1,866
JoinedJul 26, 2005

Since this is about helps and all and someone happened to mention that help ' wouldnt return the helpfile it should (since ' is a command and has a help file) i fiqured i would toss how i fixed it long ago on mine to allow help ' to display the help file for it
/* Moved into a separate function so it can be used for other things ie: online help editing -Thoric */
HELP_DATA *get_help(CHAR_DATA *ch, char *argument)
{
  char argall[MIL], argone[MIL], argnew[MIL];
  HELP_DATA *pHelp;
  int lev;
  bool blah = FALSE;

  if(argument[0] == '\0')
    argument = "summary";
  /* If it is ' make blah TRUE so it will work right lol */
  if(!str_cmp(argument, "'";))
    blah = TRUE;
  if(isdigit(argument[0]))
  {
    lev = number_argument(argument, argnew);
    argument = argnew;
  }
  else
    lev = -2;
  /* Tricky argument handling so 'help a b' doesn't match a. */
  argall[0] = '\0';
  while(argument[0] != '\0')
  {
    argument = one_argument(argument, argone);
    if(argall[0] != '\0')
      strcat(argall, " ";);
    strcat(argall, argone);
  }
  for(pHelp = first_help; pHelp; pHelp = pHelp->next)
  {
    if(pHelp->level > (ch ? get_trust(ch) : LEVEL_AVATAR))
      continue;
    if(lev != -2 && pHelp->level != lev)
      continue;
    if(is_name(argall, pHelp->keyword))
      return pHelp;
    else if(blah == TRUE && !str_cmp(pHelp->keyword, "'";))
      return pHelp;
  }
return NULL;
}

Yea the fix for get_help also isnt in this one and feel free to change it to better suit how you would like it to look but basicaly the problem is that if you use ' as the arg for help it actually never will display the help file for ' (even if one exist)
Hope someone finds it helpful :) I mainly did it back when i orginaly added nohelps and it complained about ' not having a help file even though the help file existed.

Yea its kind of crapy but i havent found a better way to handle it yet :) if you have ideas feel free to suggest them :)
       
Post is unread #29 Sep 8, 2005, 6:29 pm
Go to the top of the page
Go to the bottom of the page

Remcon
Geomancer
GroupAdministrators
Posts1,866
JoinedJul 26, 2005

Ok, well I decided to download and check stock Smaug1.4a with my snippet and yep managed to duplicate the crash and find the issue
57 WH 51~
.
~

The problem was that get_help didnt consider numbers valid while my snippet code as well as the similar help file snippet would consider numbers in keywords as valid. Since the only valid help entry it found was 51 it would then do "help '51'" again which, you guessed it would do it all again, it didnt actually crash it more or less looped until the server killed it. So I updated the snippet fixing that and other issues. Was going to not even allow a straight number to be used as an argument, but conner wanted it to be allowed. So I added in the snippet for the fix to be applyed to get_help also if it wasn't already. If you choose not to use the fix for get_help the code will still run fine on numbers now and shouldn't go into a loop from like "help 51". Now instead of it looping and trying to open up 51 again it will do this (note this is without the fix for get_help)
No help on '51' found.
Suggested Help Files:
 51      

Yea it says its valid still since its a keyword lol.
       
Post is unread #30 Sep 8, 2005, 7:32 pm
Go to the top of the page
Go to the bottom of the page

Conner
Sorcerer
GroupMembers
Posts870
JoinedMay 8, 2005

Just a quick clarification.. the reason "conner wanted it to be allowed" was because, while I can't really see a valid need to have a help file who keywords are just a number, it doesn't seem right that get_help should dictate that I can't have one as such, particularily since it has no problem with a help file whose keyword is only a symbol... even a single quote (since that was recently fixed for us too by Remcon). :)
       
Post is unread #31 Sep 9, 2005, 9:33 pm   Last edited Sep 9, 2005, 9:37 pm by Remcon
Go to the top of the page
Go to the bottom of the page

Remcon
Geomancer
GroupAdministrators
Posts1,866
JoinedJul 26, 2005

For now since the snippet hasn't been updated I'll just post it here for you all
that would care to use it.
Remcon's Suggested Helpfiles
----------------------------

Written by Remcon of Lands of Pabulum

What this code does
-------------------

This is a general replacement for the stock help command.
When a user types in a help for a topic which doesn't exist,
the command will suggest other entries in the helpfiles which
contain similar terms.

Installation Instructions
-------------------------
/* This is so it will consider numbers valid keywords in helps */
1. Open act_info.c, find get_help, and replace
    if ( isdigit( argument[0] ) )
with
    if ( isdigit( argument[0] ) && !is_number( argument ) )


2. Open act_info.c, find do_help, and replace it with the following:

/*
 * Now this is cleaner
 */
/* Updated do_help command provided by Remcon of The Lands of Pabulum 03/20/2004 */
void do_help( CHAR_DATA * ch, char *argument )
{
   HELP_DATA *pHelp;
   char *keyword;
   char arg[MAX_INPUT_LENGTH];
   char oneword[MAX_STRING_LENGTH], lastmatch[MAX_STRING_LENGTH];
   short matched = 0, checked = 0, totalmatched = 0, found = 0;
   bool uselevel = FALSE;
   int value = 0;

   set_pager_color( AT_NOTE, ch );

   if( !argument || argument[0] == '\0' )
      argument = "summary";
   if( !( pHelp = get_help( ch, argument ) ) )
   {
      pager_printf( ch, "No help on \'%s\' found.\n\r", argument );
      /* Get an arg incase they do a number seperate */
      one_argument( argument, arg );
      /* See if arg is a number if so update argument */
      if( is_number( arg ) )
      {
        argument = one_argument( argument, arg );
        if( argument && argument[0] != '\0' )
        {
            value = atoi( arg );
            uselevel = TRUE;
        }
        else /* If no more argument put arg as argument */
          argument = arg;
      }
      if( value > 0 )
         pager_printf( ch, "Checking for suggested helps that are level %d.\n\r", value );
      send_to_pager( "Suggested Help Files:\n\r", ch );
      strncpy( lastmatch, " ", MAX_STRING_LENGTH );
      for( pHelp = first_help; pHelp; pHelp = pHelp->next )
      {
         matched = 0;
         if( !pHelp || !pHelp->keyword || pHelp->keyword[0] == '\0' || pHelp->level > get_trust( ch ) )
            continue;
         /* Check arg if its avaliable */
         if( uselevel && pHelp->level != value )
           continue;
         keyword = pHelp->keyword;
         while( keyword && keyword[0] != '\0' )
         {
            matched = 0;   /* Set to 0 for each time we check lol */
            keyword = one_argument( keyword, oneword );
            /*
             * Lets check only up to 10 spots
             */
            for( checked = 0; checked <= 10; checked++ )
            {
               if( !oneword[checked] || !argument[checked] )
                  break;
               if( LOWER( oneword[checked] ) == LOWER( argument[checked] ) )
                  matched++;
            }
            if( ( matched > 1 && matched > ( checked / 2 ) ) || ( matched > 0 && checked < 2 ) )
            {
               pager_printf( ch, " %-20s ", oneword );
               if( ++found % 4 == 0 )
               {
                  found = 0;
                  send_to_pager( "\n\r", ch );
               }
               strncpy( lastmatch, oneword, MAX_STRING_LENGTH );
               totalmatched++;
               break;
            }
         }
      }
      if( found != 0 )
         send_to_pager( "\n\r", ch );
      if( totalmatched == 0 )
      {
         send_to_pager( "No suggested help files.\n\r", ch );
         return;
      }
      if( totalmatched == 1 && lastmatch != NULL && lastmatch && lastmatch[0] != '\0' && str_cmp(lastmatch, argument))
      {
         send_to_pager( "Opening only suggested helpfile.\n\r", ch );
         do_help( ch, lastmatch );
         return;
      }
      return;
   }
   /*
    * Make newbies do a help start. --Shaddai
    */
   if( !IS_NPC( ch ) && !str_cmp( argument, "start" ) )
      SET_BIT( ch->pcdata->flags, PCFLAG_HELPSTART );

   if( IS_IMMORTAL( ch ) )
      pager_printf( ch, "Help level: %d\n\r", pHelp->level );

   set_pager_color( AT_NOTE, ch );

   /*
    * Strip leading '.' to allow initial blanks.
    */
   if( pHelp->text[0] == '.' )
      send_to_pager( pHelp->text + 1, ch );
   else
      send_to_pager( pHelp->text, ch );
   return;
}

3. Changes
Fixed a crashing issue in the code.
Changed AT_HELP to AT_NOTE (since stock smaug1.4a didn't understand AT_HELP)
Stripped out colors like &G (since stock smaug1.4a didn't understand those)
Added in the fix to get_help incase you haven't added it.
Added in so you can do like "help 53 wearlocs" and it will use 53 as the level
of help files to check for wearlocs helpfile.

4. Compile and reboot. That's it!

Remcon can usually be reached via the muddomain.com site,
or you can also contact him on the Mud Domain Intermud Communication Network.

This code has been installed and tested on Smaug 1.6 FUSS, which is a bugfixed
and cleaned up version of the base Smaug 1.4a code. The SmaugFUSS Project is
maintained on servers which run the Redhat and Fedora family of Linux. Limited
testing has also been done on the Cygwin package under WindowsXP SP1 and SP2.
Users of BSD, MSVC, MSVC++, or Macintosh platforms are on their own as The
SmaugFUSS Project does not have access to these development environments for testing.

No guarantees are made that this code will be compatible with your codebase and any
modifications you may have made to it. No warranty of any kind is expressed or implied
by the use of this code, and we are not responsible for any damages which may result
from the application of this snippet to your codebase.

If you use it and notice issues do me a favor and let me know, Yea the colors got stripped out because in "stock Smaug1.4a" (which is what the snippet was designed for) it didn't support the color codes that smaugfuss does. So feel free to add those back in or just use the changes you need to, to fix possible crashing issues in your code.
       
Post is unread #32 Sep 11, 2005, 11:45 am
Go to the top of the page
Go to the bottom of the page

Remcon
Geomancer
GroupAdministrators
Posts1,866
JoinedJul 26, 2005

Unneeded help files
The helps are done with <level>.<help> that way you remove the right one.
Failure to use the level could cause you to remove the wrong ones.
I would suggest looking at each one and making your own decision on
if it should be removed or not from your mud.
63.goto
65.colorize
65.test
65.mind
65.mpfind (See note)
65.showlayers (See note)
65.rpfind (See note)
63.automapper (This was from old mapout code)
63.automapper2 (This was from old mapout code)
62.'this is a test'
62.centaur
62.greeting
62.magnetic
62.path
63.'group displayer'
63.desc
63.'group dispaly'
61.coevotes
61.diagnose (See note)
61.setrace
60.test1 (Sometimes funny to read these)
60.emerald.are
60.townahll
59.r
60.pc
59.amot
61.thoric1
63.oldchanges (Your call on this one)
61.paladinspells (Your call on this one)
61.thiefspells (Your call on this one)
61.thiefskills (Your call on this one)
62.quest (Already have a lower one for the 'quest council')
62.hand (Already have a lower one for the 'black hand')
62.whip (Already have a lower one for the 'galvanic whip')
59.maidenstone.are
59.repair
58.mptd
58.moblogstats
58.newbie (Already have a lower one about the newbiechat channel )
58.helpdelete
58.boarddelete
57.wh
57.imots
56.'me i'
54.grub2 (See note)
53.daily11
53.daily7
53.daily12
53.dail5
53.daily8
53.daily10
53.daily6
53.daily9
53.xyzzy
52.ogrub2 (See note)
52.'ogrub data' (See note)
52.jade.are
51.ogrub (See note)
2.daily2 (Sometimes funny to read these)
2.daily3 (Sometimes funny to read these)
2.daily4
2.daily5 (Sometimes funny to read these)
2.phhilostrate (Nice ansii)


helps that should probably have the levels changed
65.traffic


(NOTE)
The ones marked with (See note) basicaly mean if you choose to use
the code for them then don't remove the help files :)

This isn't all of them and I'll post others as I run across them :)
       
Post is unread #33 Oct 14, 2005, 6:24 pm
Go to the top of the page
Go to the bottom of the page

Zeno
Sorcerer
GroupMembers
Posts723
JoinedMar 5, 2005

In help exflags, it lists:
PUSHTYPE      | Players will be pushed or pulled by a type of force.
PUSH          | Players will be pushed or pulled with a degree of force.

Which are not exit flags. I suppose remove those, since they belong in help redit.
       
Post is unread #34 Jun 5, 2006, 12:34 pm
Go to the top of the page
Go to the bottom of the page

Zeno
Sorcerer
GroupMembers
Posts723
JoinedMar 5, 2005

HELP RESET needs to be updated to meet new reset fix.

HELP OBJECTTYPES needs to be fixed. It says "Drink_con", which is wrong. The type is actually "drinkcon".
       
Post is unread #35 Jan 28, 2010, 2:28 pm
Go to the top of the page
Go to the bottom of the page

Zeno
Sorcerer
GroupMembers
Posts723
JoinedMar 5, 2005

I'd like to mention that before we move on to modernizing the codebase or whatever we do, we still need to fix these helpfiles. I don't think any have been fixed.
       
Post is unread #36 Jan 28, 2010, 4:22 pm
Go to the top of the page
Go to the bottom of the page

Kayle
Off the Edge of the Map
GroupAdministrators
Posts1,195
JoinedMar 21, 2006

I keep meaning to do that... One of these days I'll remember all this shit. :P
       
Pages:<< prev 1, 2 next >>