Register to post in forums, or Log in to your existing account
 

Play RetroMUD
Post new topic  Reply to topic     Home » Forums » zMUD General Discussion
zlam
Newbie


Joined: 06 Nov 2000
Posts: 4
Location: Sweden

PostPosted: 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
Reply with quote
Kjata
GURU


Joined: 10 Oct 2000
Posts: 4379
Location: USA

PostPosted: Wed Nov 28, 2001 12:37 pm   
 
How will someone abouse this?

Kjata
Reply with quote
zlam
Newbie


Joined: 06 Nov 2000
Posts: 4
Location: Sweden

PostPosted: 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
Reply with quote
Acaila
Apprentice


Joined: 30 Aug 2001
Posts: 187
Location: Netherlands

PostPosted: 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
Reply with quote
iljhar
GURU


Joined: 10 Oct 2000
Posts: 1116
Location: USA

PostPosted: 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
Reply with quote
zlam
Newbie


Joined: 06 Nov 2000
Posts: 4
Location: Sweden

PostPosted: 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
Reply with quote
iljhar
GURU


Joined: 10 Oct 2000
Posts: 1116
Location: USA

PostPosted: 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
Reply with quote
Display posts from previous:   
Post new topic   Reply to topic     Home » Forums » zMUD General Discussion All times are GMT
Page 1 of 1

 
Jump to:  
You cannot post new topics in this forum
You cannot reply to topics in this forum
You cannot edit your posts in this forum
You cannot delete your posts in this forum
You cannot vote in polls in this forum

© 2009 Zugg Software. Hosted by Wolfpaw.net