Notice: Any messages purporting to come from this site telling you that your password has expired, or that you need to "verify" your details, 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.
Entire forum
➜ MUSHclient
➜ General
➜ Filter to Seperate Windows? (chat/tells/clans etc)
Filter to Seperate Windows? (chat/tells/clans etc)
|
It is now over 60 days since the last post. This thread is closed.
Refresh page
Pages: 1 2
Posted by
| Drauka
(10 posts) Bio
|
Date
| Tue 31 Oct 2006 03:17 AM (UTC) |
Message
| I'd like to filter text and remove it from the main window and put in seperate window(s) for several things (like channels, tells, clans, etc).
Is it possible to do this other than appending to the notepad? That is all I could find from searching. | Top |
|
Posted by
| Zeno
USA (2,871 posts) Bio
|
Date
| Reply #1 on Tue 31 Oct 2006 03:25 AM (UTC) Amended on Tue 31 Oct 2006 03:32 AM (UTC) by Zeno
|
Message
| What else would you be looking to put it into, besides notepad?
If it's because you want colors, I'm pretty sure the notepad can use colors. |
Zeno McDohl,
Owner of Bleached InuYasha Galaxy
http://www.biyg.org | Top |
|
Posted by
| Nick Gammon
Australia (23,046 posts) Bio
Forum Administrator |
Date
| Reply #2 on Tue 31 Oct 2006 04:06 AM (UTC) Amended on Tue 31 Oct 2006 04:07 AM (UTC) by Nick Gammon
|
Message
| If you want a fully coloured extra window, you can create a dummy world window.
There was a discussion about this in this post:
http://www.gammon.com.au/forum/?id=6551
An example of doing this is below. This trigger matches "Clan: xxx" and omits that line from the main window. It then locates the "clantalk" world using GetWorld, and if found, sends the message to that world.
<triggers>
<trigger
enabled="y"
match="Clan: *"
omit_from_output="y"
send_to="12"
sequence="100"
>
<send>
w = GetWorld ("clantalk")
if w then
w:ColourNote ("blue", "", "%0")
end -- world found</send>
</trigger>
</triggers>
The above example simply sends the line in the colour blue, however if you want to preserve the original colours, whatever they are, then a slightly more complex method is needed. You need to make a script file (this is using Lua scripting). Inside the script file put this:
function clantalk (name, line, wildcards, styles)
local w = GetWorld ("clantalk")
if w then
for _, v in ipairs (styles) do
w:ColourTell (RGBColourToName (v.textcolour),
RGBColourToName (v.backcolour),
v.text)
end -- for each style run
w:Note ("") -- wrap up line
end -- world found
end
What this does is send any trigger text to the clantalk world, keeping the original colours (it goes through the style runs in the original line).
Now your trigger needs to be:
<triggers>
<trigger
enabled="y"
match="Clan: *"
omit_from_output="y"
script="clantalk"
sequence="100"
>
</trigger>
</triggers>
The omitting from output is optional, if you want the line to be in the original window and the other one as well, just don't check "omit from output".
|
- Nick Gammon
www.gammon.com.au, www.mushclient.com | Top |
|
Posted by
| Drauka
(10 posts) Bio
|
Date
| Reply #3 on Tue 31 Oct 2006 04:18 AM (UTC) |
Message
| Wow, thank you very much. | Top |
|
Posted by
| Drauka
(10 posts) Bio
|
Date
| Reply #4 on Mon 20 Nov 2006 04:27 PM (UTC) |
Message
| Hrm, this seems to crash Mushclient under wine.
Tried appending to a new world and new note (through manual and gui) and the client crashes.
Will try at home tonite under Windows to verify that just a wine thing. | Top |
|
Posted by
| Nick Gammon
Australia (23,046 posts) Bio
Forum Administrator |
Date
| Reply #5 on Tue 21 Nov 2006 12:13 AM (UTC) |
Message
| Which version of MUSHclient are you using, and which action crashes it? Using a dummy world window, or appending to the notepad? |
- Nick Gammon
www.gammon.com.au, www.mushclient.com | Top |
|
Posted by
| Drauka
(10 posts) Bio
|
Date
| Reply #6 on Tue 21 Nov 2006 03:10 AM (UTC) |
Message
| It works in Windows.
Trying to append to notepad or send to another world window both seem to crash in Linux. I am not certain how to figure out the error or problem, as it crashes when trying to do the action on the trigger.
If it works in Windows, I am ok with that as it is a Windows program and I am lucky it runs in Wine.
Sorry Nick, I wish I could be more help.
Using 3.82 | Top |
|
Posted by
| Edoren
(31 posts) Bio
|
Date
| Reply #7 on Mon 16 Apr 2007 03:24 PM (UTC) |
Message
| Nick thanks for this one. Currently using it to filter out my chat/tells. Switched the plugin around to send the commands back to the main world and it works like a charm. Very convenient when you get spam coming left and right, while trying to pay attention to what's being said. | Top |
|
Posted by
| Shaun Biggs
USA (644 posts) Bio
|
Date
| Reply #8 on Mon 16 Apr 2007 05:14 PM (UTC) Amended on Mon 16 Apr 2007 05:16 PM (UTC) by Shaun Biggs
|
Message
| The SendToNotepad issue is the same issue that's been brought up due to the internal notepad in a few previous threads. Pretty much Wine has an incomplete dll for passing some of the values back and forth between MUSHclient and the internal editor, and this is causing the crash. I'm still trying to figure out which dlls to copy over, and I've tried all the mfc related dlls one by one. So far I've gotten it down to one error instead of three, but it still crashes.
I haven't had any issues with passing things back and forth to worlds, but I go only by world id numbers. Use GetWorldIdList() to see what the worlds are named, then pass things with GetWorldById(). My test for this was an empty world opening to 0.0.0.0, and I used this command in the world connected to the mud I play:
/GetWorldById( "4fbba8187ae44e23234467fe" ):Note( "foo" )
Sure enough, "foo" appeared in the other window with no problem.
Oh, and before I forget: MUSHclient v4.01, Wine-0.9.34 |
It is much easier to fight for one's ideals than to live up to them. | Top |
|
Posted by
| Edoren
(31 posts) Bio
|
Date
| Reply #9 on Mon 16 Apr 2007 08:30 PM (UTC) |
Message
| Alright i can't seem to figure this one out. I've got the channels being sent back properly, and sending information back to the world. my prompt is this:
^(\d+?)h\, (\d+?)m(?:\, \d+?e)?(?:\, \d+?w)? (c?e?x?k?d?b?@?)-
The problem is i just cant figure out how to set it up so that when the channel is sent, it needs to gag the next prompt and then stop gagging. Any suggestions? | Top |
|
Posted by
| Nick Gammon
Australia (23,046 posts) Bio
Forum Administrator |
Date
| Reply #10 on Tue 17 Apr 2007 12:16 AM (UTC) |
Message
| Have a trigger that matches the prompt, and omits from output. Give it a name. Set it to disabled initially.
When you need to gag the next prompt, enable this trigger. When the trigger fires it has a small script to disable itself. That way it only does it once. |
- Nick Gammon
www.gammon.com.au, www.mushclient.com | Top |
|
Posted by
| Edoren
(31 posts) Bio
|
Date
| Reply #11 on Tue 17 Apr 2007 02:24 PM (UTC) |
Message
| Thanks Nick. Just called a function to turn itself off and works like a charm. Any idea if its possible that when you send commands back to the main window, it can capture the response and send it back to the filtered window? | Top |
|
Posted by
| Nick Gammon
Australia (23,046 posts) Bio
Forum Administrator |
Date
| Reply #12 on Tue 17 Apr 2007 08:51 PM (UTC) |
Message
| Can you give an example? |
- Nick Gammon
www.gammon.com.au, www.mushclient.com | Top |
|
Posted by
| Edoren
(31 posts) Bio
|
Date
| Reply #13 on Tue 17 Apr 2007 11:54 PM (UTC) |
Message
| I mean like right now i can send commands to the main world such as look, but i would like to see the actual response in the dummy world rather than having to flip back over to the main. anyway to do that whenever a command is sent from the dummy world? | Top |
|
Posted by
| Nick Gammon
Australia (23,046 posts) Bio
Forum Administrator |
Date
| Reply #14 on Wed 18 Apr 2007 12:34 AM (UTC) |
Message
| Well I think that is a bit tricky, because "look" can generate lots of lines of output: room description, mobs, exits, objects, etc.
I don't see how you can easily "mark" those multiple lines as belonging to the other window. |
- Nick Gammon
www.gammon.com.au, www.mushclient.com | 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.
67,766 views.
This is page 1, subject is 2 pages long: 1 2
It is now over 60 days since the last post. This thread is closed.
Refresh page
top