Notice: Any messages purporting to come from this site telling you that your password has expired, or that you need to verify your details, confirm your email, resolve issues, making threats, or asking for money, are
spam. We do not email users with any such messages. If you have lost your password you can obtain a new one by using the
password reset link.
Due to spam on this forum, all posts now need moderator approval.
Entire forum
➜ MUSHclient
➜ General
➜ Line prepending without reparse and oninput functions
Line prepending without reparse and oninput functions
|
It is now over 60 days since the last post. This thread is closed.
Refresh page
Posted by
| Dontarion
USA (62 posts) Bio
|
Date
| Sun 10 Jul 2011 01:27 AM (UTC) |
Message
| So I'm trying to work out two odd things right now.
A: I've tried hijacking the newish timestamp setup to add in prepending lines but I only want the prepend on the lines that come in after it's been changed. The easiest way to say this is can I SetAlphaOption("timestamp_input", string) without having the system reparse the entire buffer? If there is a better way then this then I'll certainly give it a try.
B: Is there a method so that I can trigger a function to go off whenever I send any input to the mud from the command prompt? | Top |
|
Posted by
| Nick Gammon
Australia (23,158 posts) Bio
Forum Administrator |
Date
| Reply #1 on Sun 10 Jul 2011 09:26 AM (UTC) |
Message
| |
Posted by
| Dontarion
USA (62 posts) Bio
|
Date
| Reply #2 on Tue 12 Jul 2011 06:41 AM (UTC) |
Message
| For A: Let's say someone is doing something that is going to kill me in a very spammy situation (large group raids in Achaea). One of the best ways to make sure I get this is to prepend lines with something saying "X BEHEADING." I tried hijacking the timestamp options but they go through and reparse the entire buffer, which isn't what I wanted to accomplish (Every single line says X BEHEADING prepended). I just want the lines that have a prepending text of say "X BEHEADING" to display "X BEHEADING" in a permanent manner and not on all lines if possible.
Going to tinker with the OnPluginCommandEntered functions. Looks great. | Top |
|
Posted by
| Nick Gammon
Australia (23,158 posts) Bio
Forum Administrator |
Date
| Reply #3 on Tue 12 Jul 2011 06:55 AM (UTC) |
Message
| How about this? ...
|
- Nick Gammon
www.gammon.com.au, www.mushclient.com | Top |
|
Posted by
| Dontarion
USA (62 posts) Bio
|
Date
| Reply #4 on Tue 12 Jul 2011 07:07 AM (UTC) |
Message
| Oh good lord you just killed two birds with one stone.
Another thing I've been looking at is setting up popup windows like that which fade away fairly quickly for status updates like say you're getting destroyed.
Time to tinker with that. Thanks. | 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.
16,144 views.
It is now over 60 days since the last post. This thread is closed.
Refresh page
top