[Home] [Downloads] [Search] [Help/forum]

Gammon Forum

See www.mushclient.com/spam for dealing with forum spam. Please read the MUSHclient FAQ!

[Folder]  Entire forum
-> [Folder]  SMAUG
. -> [Folder]  SMAUG coding
. . -> [Subject]  SWR1.0 (maybe stock SMAUG) bug
Home  |  Users  |  Search  |  FAQ
Register forum user name
Forgotten password?

SWR1.0 (maybe stock SMAUG) bug

It is now over 60 days since the last post. This thread is closed.     [Refresh] Refresh page

Posted by Boborak   USA  (228 posts)  [Biography] bio
Date Sun 20 Apr 2003 08:07 AM (UTC)
An admin of mine pointed out that there's a potentially BAD flaw in the mudprogs for SWR1.0

It appears that some of the mudprogs in mud_comm.c don't take CHARM into account. This allows a charmed mob to execute a mudprog command for a player. The most dangerous of these is 'mp_withdraw' which allows a mob to withdraw money from the local economy, then give it to the player.

Easy fix:
in act_comm.c find the do_order() function

Find this chunk of code about mid-function:

        if ( !IS_AFFECTED(victim, AFF_CHARM) || victim->master != ch )
            send_to_char( "Do it yourself!\n\r", ch );


Add this directly after that: (note: this is AFTER the closing bracket of the else condition)


Recompile. You're good to go.

If you're REALLY want to play it safe or you have added functions that are similar to 'order' add this to the begining of every mpcommand in mud_comm.c that's missing it:


add it AFTER the IS_NPC check
[Go to top] top

The dates and times for posts above are shown in Universal Co-ordinated Time (UTC).

To show them in your local time you can join the forum, and then set the 'time correction' field in your profile to the number of hours difference between your location and UTC time.


It is now over 60 days since the last post. This thread is closed.     [Refresh] Refresh page

Go to topic:           Search the forum

[Go to top] top

Quick links: MUSHclient. MUSHclient help. Forum shortcuts. Posting templates. Lua modules. Lua documentation.

Information and images on this site are licensed under the Creative Commons Attribution 3.0 Australia License unless stated otherwise.


Written by Nick Gammon - 5K   profile for Nick Gammon on Stack Exchange, a network of free, community-driven Q&A sites   Marriage equality

Comments to: Gammon Software support
[RH click to get RSS URL] Forum RSS feed ( https://gammon.com.au/rss/forum.xml )

[Best viewed with any browser - 2K]    [Hosted at FutureQuest]