PDA

View Full Version : flagging scripts ``quiet''



Blushy
12-02-2010, 04:46 PM
So, I was trying to figure out how to prevent Lich from printing a message notifying the user whenever a scripts begins and exits (because this can cause a load of extra scroll when using a lot of little scripts, which I like to do). I couldn't find anything in the documentation, so I was looking through the code (although admittedly not _too_ hard) and noticed that those messages aren't printed if a script has the ``quiet'' flag set. It looks like (although, again, I wasn't looking too hard) one way to to do this is pass ``quiet'' as one (the first?) of the command line arguments. Is there some way to ensure that a script is _always_ run with this flag set, without having to pass a specific argument?

Thanks.

Alorn15
12-02-2010, 04:51 PM
Try calling silence_me

Blushy
12-02-2010, 07:29 PM
Try calling silence_me

That only prevents it from echoing the commands it sends to the game. I'm specifically looking to disable messages like this:

--- Lich: skin active.



[B]--- Lich: skin has exited.

But, hah, I figured it out. For posterity:

This line:


@quiet = true if data[0] =~ /^[\t\s]*#?[\t\s]*(?:quiet|hush)$/i

You just need to make the first line of your script read

# hush

or

# quiet