![](templates/Classic/images/spacer.gif) |
zlam Newbie
Joined: 06 Nov 2000 Posts: 4 Location: Sweden
|
Posted: Wed Nov 28, 2001 12:05 pm
Trigger "tweaking" |
Hello,
I have the following trigger enabled to caputer tells sent to me and put them in a "tell" window with timestamps etc.
It looks like this:
#TRIGGER {(*) tells you '} {
#sub {%time( "hh.nn") %1 :" "}
#CAP tell
#GAG
}
Sometimes the tells I recieve are not at the start of the line, therefor I've omitted the ^.
This could probably be abused and I was sort of wondering how I can prevent that from happening. That is, how do I prevent someone from abusing this trigger? Possible?
Cheers,
zlam |
|
|
![](templates/Classic/images/spacer.gif) |
Kjata GURU
![](images/avatars/190086853941eff9946d4cf.jpg)
Joined: 10 Oct 2000 Posts: 4379 Location: USA
|
Posted: Wed Nov 28, 2001 12:37 pm |
How will someone abouse this?
Kjata |
|
|
![](templates/Classic/images/spacer.gif) |
zlam Newbie
Joined: 06 Nov 2000 Posts: 4 Location: Sweden
|
Posted: Wed Nov 28, 2001 4:55 pm |
Well since I havent "Anchored" the trigger line, it'd be possible for someone to send me text that'd trigger the action, and also maybe adding a few commands that I would not like to do :)
--
zlam |
|
|
![](templates/Classic/images/spacer.gif) |
Acaila Apprentice
Joined: 30 Aug 2001 Posts: 187 Location: Netherlands
|
Posted: Wed Nov 28, 2001 7:24 pm |
All you're doing with that trigger is a substitute. So, unless someone sends you something before "tells you" with the EXACT syntax they know will fire one of your other triggers, it's pretty harmless. Either way, if a character on your mud can have more than one word as their name, there's nothing you can do about it. If a name can only exist of one word, then change "(*)" to "^(%w)".
Acaila |
|
|
![](templates/Classic/images/spacer.gif) |
iljhar GURU
![](images/avatars/1581021766476c274e1258d.gif)
Joined: 10 Oct 2000 Posts: 1116 Location: USA
|
Posted: Wed Nov 28, 2001 8:39 pm |
Hmm...well, since it's not really doing any actions, ie casting a spell, dropping eq, etc., then what kind of abuse is there besides extra lines of text in the tell window? Anyhoo, If you want to try to reduce that chance, then you can try something like this:
#var badword {gossips|chats|ooc|sings}
#TRIGGER {(*) tells you '} {
#forall @badword {#if (%pos(%i, %1)) {#abort 1}}
#sub {%time( "hh.nn") %1 :" "}
#CAP tell
#GAG
}
Iljhar |
|
|
![](templates/Classic/images/spacer.gif) |
zlam Newbie
Joined: 06 Nov 2000 Posts: 4 Location: Sweden
|
Posted: Wed Dec 05, 2001 5:35 pm |
Thanks. I think this is moving me into the right direction.
Now, I've got another "issue". Sometimes people send me tells wich are line wrapped. This will cause the first part that "fits" to appear in my "tell" window, the other part after the wrap will appear in my "main" window...any ideas how to make it "wrap" properly in the "tell" window.
TIA,
zlam |
|
|
![](templates/Classic/images/spacer.gif) |
iljhar GURU
![](images/avatars/1581021766476c274e1258d.gif)
Joined: 10 Oct 2000 Posts: 1116 Location: USA
|
Posted: Fri Dec 07, 2001 12:43 am |
You can try something like this:
#var badword {gossips|chats|ooc|sings}
#TRIGGER {(*) tells you '} {
#forall @badword {#if (%pos(%i, %1)) {#abort 1}}
#t+ Tells
#sub {%time( "hh.nn") %1 :" "}
#CAP tell
#GAG
}
#trigger {(*)} {
#if %ends(%1, "'") {#t- Tells}
#sub {%time("hh.nn") %1 :" "}
#CAP tell
#GAG
} "Tells"
Not tested so you may have to tweak it a bit.
Iljhar |
|
|
![](templates/Classic/images/spacer.gif) |
|
|