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, Yandex, Bing, Google

Members: 0
Guests: 24
Stats
Files
Topics
Posts
Members
Newest Member
481
3,739
19,386
621
KellieBusb
Today's Birthdays
There are no member birthdays today.
Related Links
» SmaugMuds.org » Bugfix Lists » SWFOTE FUSS Bugfix List » [Bug] Player only and ooc com...
Forum Rules | Mark all | Recent Posts

[Bug] Player only and ooc command flags don't actually do anything
< Newer Topic :: Older Topic >

Pages:<< prev 1 next >>
Post is unread #1 Jan 16, 2009, 11:41 am   Last edited Jan 16, 2009, 11:52 am by Keberus
Go to the top of the page
Go to the bottom of the page

Keberus
Conjurer
GroupFUSS Project Team
Posts341
JoinedJun 4, 2005

Bug: Player only and ooc command flags don't actually do anything
Danger: High - Code may not work as expect and could result in a crash
Found by: Ayuri/Keberus
Fixed by: Keberus

---


interp.c, interpret

Locate:
   if( ch->desc && ch->desc->snoop_by )
   {
      sprintf( logname, "%s", ch->name );
      write_to_buffer( ch->desc->snoop_by, logname, 0 );
      write_to_buffer( ch->desc->snoop_by, "% ", 2 );
      write_to_buffer( ch->desc->snoop_by, logline, 0 );
      write_to_buffer( ch->desc->snoop_by, "\r\n", 2 );
   }


Below that add:
    bool check = TRUE;

    if( cmd && IS_CMDFLAG( cmd, CMD_OOC ) )
        check = FALSE;


Locate:
  if( cmd && timer && str_cmp( command, "ooc" ) )


Change to:
  if( check && timer )


Locate:
      if( cmd && IS_NPC( ch ) && IS_AFFECTED( ch, AFF_CHARM ) && IS_CMD_MPROG( cmd ) )
      {
         send_to_char( "You can't do that while charmed!\r\n", ch );
         return;
      }


After that add:
      if( cmd && IS_NPC( ch ) && IS_CMDFLAG( cmd, CMD_PLR_ONLY ) )
      {
         send_to_char( "Only player's can use this command!\r\n", ch );
         return;
      }



mud.h
Locate:
#define IS_CMD_MPROG(cmd)          (IS_SET( (cmd)->flags, CMD_MUDPROG) )


After that add:
#define IS_CMDFLAG( cmd, flag )    ( IS_SET( (cmd)->flags, (flag) ) )



This fix will make any command flagged ooc not interrupt people with timers (people making things). The other part of this fix will allow Imms to flag commands as player_only to stop mobs from being able to use them, which is easier than adding that if( IS_NPC(ch) ) check everywhere.
       
Pages:<< prev 1 next >>