[Home] [Downloads] [Search] [Help/forum]

Gammon Forum

See www.mushclient.com/spam for dealing with forum spam. Please read the MUSHclient FAQ!

[Folder]  Entire forum
-> [Folder]  MUSHclient
. -> [Folder]  General
. . -> [Subject]  Filter to Seperate Windows? (chat/tells/clans etc)
Home  |  Users  |  Search  |  FAQ
Username:
Register forum user name
Password:
Forgotten password?

Filter to Seperate Windows? (chat/tells/clans etc)

It is now over 60 days since the last post. This thread is closed.     [Refresh] Refresh page


Pages: 1 2  

Posted by Drauka   (10 posts)  [Biography] 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.
[Go to top] top

Posted by Zeno   USA  (2,871 posts)  [Biography] 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
[Go to top] top

Posted by Nick Gammon   Australia  (21,407 posts)  [Biography] 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
[Go to top] top

Posted by Drauka   (10 posts)  [Biography] bio
Date Reply #3 on Tue 31 Oct 2006 04:18 AM (UTC)
Message
Wow, thank you very much.
[Go to top] top

Posted by Drauka   (10 posts)  [Biography] 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.
[Go to top] top

Posted by Nick Gammon   Australia  (21,407 posts)  [Biography] 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
[Go to top] top

Posted by Drauka   (10 posts)  [Biography] 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
[Go to top] top

Posted by Edoren   (31 posts)  [Biography] 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.
[Go to top] top

Posted by Shaun Biggs   USA  (644 posts)  [Biography] 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.
[Go to top] top

Posted by Edoren   (31 posts)  [Biography] 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?
[Go to top] top

Posted by Nick Gammon   Australia  (21,407 posts)  [Biography] 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
[Go to top] top

Posted by Edoren   (31 posts)  [Biography] 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?
[Go to top] top

Posted by Nick Gammon   Australia  (21,407 posts)  [Biography] 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
[Go to top] top

Posted by Edoren   (31 posts)  [Biography] 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?
[Go to top] top

Posted by Nick Gammon   Australia  (21,407 posts)  [Biography] 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
[Go to top] 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,323 views.

This is page 1, subject is 2 pages long: 1 2  [Next page]

It is now over 60 days since the last post. This thread is closed.     [Refresh] Refresh page

Go to topic:           Search the forum


[Go to top] top

Quick links: MUSHclient. MUSHclient help. Forum shortcuts. Posting templates. Lua modules. Lua documentation.

Information and images on this site are licensed under the Creative Commons Attribution 3.0 Australia License unless stated otherwise.

[Home]


Written by Nick Gammon - 5K   profile for Nick Gammon on Stack Exchange, a network of free, community-driven Q&A sites   Marriage equality

Comments to: Gammon Software support
[RH click to get RSS URL] Forum RSS feed ( https://gammon.com.au/rss/forum.xml )

[Best viewed with any browser - 2K]    [Hosted at FutureQuest]