|
icedsun Novice
Joined: 20 Jan 2006 Posts: 45 Location: Minnesota
|
Posted: Tue Jan 31, 2006 7:30 pm
Safe trigger expression |
When I get a "tell" from a person on the MUD I want to record that entire block of text to FILE 2. I know that it's unsafe to use the (*) parameter in a trigger because people could send %dde commands and stuff through that. So, what's the proper trigger expression to capture the "tell" line and write it to my little tell log?
example:
Monkey tells you 'I want to kick you in the bananas."
Code: |
#TRIGGER {(%w) tells you '(*)'} {#WRITE 1 {TELL: ~(%1~) %2}} |
What would be an appropriate substitute for (*) that would be safe? |
|
_________________ "Build a man a fire and he's warm for a night. Light a man on fire and he's warm for the rest of his life." --My Mom |
|
|
|
icedsun Novice
Joined: 20 Jan 2006 Posts: 45 Location: Minnesota
|
Posted: Tue Jan 31, 2006 7:39 pm |
Thinking about this... I suppose I could just do
#TRIGGER {(%w) tells you '(%a)(%s)(%a)(%s)(%a)(%s)(%a)(%s)(%a)(%s)(%a)(%s)(%a)(%s)(%a)(%s)(%a)(%s)(%a)'} {#WRITE 2 {TELL: ~(%1~) %2 %3 %4 %5 %6 %7 %8 %9}
Which would just end up showing me the first x amount of words they wrote... not really as nice as I'd like but it's an option...
Okay upon thinking about that option, it wouldn't work either because of punctuation and such... Ie: tells you 'Hey! It's a nice day' would end with the !, etc... Hmph.
Is there a way to tell the mud not to expand the (*), meaning that I could write that line to my log file exactly as it is and it would never execute anything potentially inside of it? LIke, if they tried a %dde() call in it, it would just write that text to my log file and not actually parse the %dde()? |
|
_________________ "Build a man a fire and he's warm for a night. Light a man on fire and he's warm for the rest of his life." --My Mom |
|
|
|
TonDiening GURU
Joined: 26 Jul 2001 Posts: 1958 Location: Canada
|
|
|
|
icedsun Novice
Joined: 20 Jan 2006 Posts: 45 Location: Minnesota
|
Posted: Tue Jan 31, 2006 9:06 pm |
Thanks much... sorry for posting on an already-resolved issue!!! I'll try to be more careful.
|
|
_________________ "Build a man a fire and he's warm for a night. Light a man on fire and he's warm for the rest of his life." --My Mom |
|
|
|
|
|