Search FAQ

Gammon Forum

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.
 Entire forum ➜ MUSHclient ➜ Plugins ➜ Communications Miniwindow

Communications Miniwindow

Posting of new messages is disabled at present.

Refresh page


Posted by Aralia Faal   (25 posts)  Bio
Date Sat 30 Jun 2012 07:27 PM (UTC)

Amended on Sat 30 Jun 2012 07:32 PM (UTC) by Aralia Faal

Message
I've got a plugin to move all OOC conversation to a miniwindow. It does this but on ocasion the prompt does not force a new line sending the following to the miniwindow:

[Health] 64077/67369 [Movement] 2000/2000 [Money] 1,000,420 > (=OOC=) Gilbert: Yea thats what I said.

I was wondering if there was a way to make it so it removes the prompt bits before sending it to the miniwindow.

I use the plugin from http://www.gammon.com.au/forum/bbshowpost.php?bbsubject_id=10728

with the following edited:

From:


<triggers>
    <trigger
    enabled="y"
    match="You say '*'"
    script="chats"
    omit_from_output="y"
    sequence="100"
    ></trigger>

    <trigger
    enabled="y"
    match="You tell * '*'"
    script="chats"
    omit_from_output="y"
    sequence="100"
    ></trigger>

    <trigger
    enabled="y"
    match="You OOC '*'"
    script="chats"
    omit_from_output="y"
    sequence="100"
    ></trigger>
</triggers>


to:


<triggers>
    <trigger
    enabled="y"
    match="(=OOC=) *: *"
    script="chats"
    omit_from_output="y"
    sequence="100"
    ></trigger>

    <trigger
    enabled="y"
    match="(=IMM:OOC=) *: *"
    script="chats"
    omit_from_output="y"
    sequence="100"
    ></trigger>

    <trigger
    enabled="y"
    match="(NEWBIE) *: *"
    script="chats"
    omit_from_output="y"
    sequence="100"
    ></trigger>
</triggers>
Top

Posted by Nick Gammon   Australia  (23,122 posts)  Bio   Forum Administrator
Date Reply #1 on Sat 30 Jun 2012 11:19 PM (UTC)
Message
It can be done. Probably I would edit the plugin, look for the "chats" function, and before it puts the styles into rawlines, check that the style starts with "(" and if not, remove it.

- Nick Gammon

www.gammon.com.au, www.mushclient.com
Top

Posted by Aralia Faal   (25 posts)  Bio
Date Reply #2 on Sun 01 Jul 2012 (UTC)
Message
Nick Gammon said:

It can be done. Probably I would edit the plugin, look for the "chats" function


I was following you up to this point.

Quote:
and before it puts the styles into rawlines, check that the style starts with "(" and if not, remove it.


And then I got lost.
Top

Posted by Nick Gammon   Australia  (23,122 posts)  Bio   Forum Administrator
Date Reply #3 on Sun 01 Jul 2012 07:20 AM (UTC)
Message
Is the part starting (=OOC=) a different colour to the stuff in the prompt? Or not? That will affect the way we tackle this.

- Nick Gammon

www.gammon.com.au, www.mushclient.com
Top

Posted by Nick Gammon   Australia  (23,122 posts)  Bio   Forum Administrator
Date Reply #4 on Sun 01 Jul 2012 07:25 AM (UTC)
Message
If the text you want to keep is in a different colour (and hence starts a new style run) you can add the lines shown to the chats function:


-- Main capture routine
function chats (name, line, wildcards, styles)
    
    -- echo in this world as well if the user wants
    if echo then
        for _, v in ipairs (styles) do
            ColourTell (RGBColourToName (v.textcolour),RGBColourToName (v.backcolour),v.text)
        end -- for each style run
        Note ("")  -- wrap up line
    end -- echo wanted

    // add this ----------------->
    while next (styles) do
      if styles [1].text:sub (1, 1) == "(" then
        break
      end -- if
      table.remove (styles, 1)
    end -- for


- Nick Gammon

www.gammon.com.au, www.mushclient.com
Top

Posted by Aralia Faal   (25 posts)  Bio
Date Reply #5 on Sun 01 Jul 2012 11:27 AM (UTC)
Message
I added the edit and ran tests by command stacking which I know would cause it to print after the prompt, which it still did.

I don't know if this will help but i'm going to include the line styles from the prompt and OOC.
Top

Posted by Aralia Faal   (25 posts)  Bio
Date Reply #6 on Sun 01 Jul 2012 11:28 AM (UTC)
Message
Line 180 (180), Sunday, July 01, 7:18:37 AM
 Flags = End para: no, Note: no, User input: no, Log: YES, Bookmark: no
 Length = 75, last space = 75
 Text = "[Health] 43620/66595  [Movement] 2000/2000  [Money] 1,179 > (=OOC=) Aralia:"

27 style runs

1: Offset = 0, Length = 1, Text = "["
 No action.
 Flags = Hilite: YES, Underline: no, Blink: no, Inverse: no, Changed: no
 Foreground colour ANSI  : 4 (Blue)
 Background colour ANSI  : 0 (Black)

2: Offset = 1, Length = 6, Text = "Health"
 No action.
 Flags = Hilite: YES, Underline: no, Blink: no, Inverse: no, Changed: no
 Foreground colour ANSI  : 0 (Black)
 Background colour ANSI  : 0 (Black)

3: Offset = 7, Length = 2, Text = "] "
 No action.
 Flags = Hilite: YES, Underline: no, Blink: no, Inverse: no, Changed: no
 Foreground colour ANSI  : 4 (Blue)
 Background colour ANSI  : 0 (Black)

4: Offset = 9, Length = 5, Text = "43620"
 No action.
 Flags = Hilite: no, Underline: no, Blink: no, Inverse: no, Changed: no
 Foreground colour ANSI  : 6 (Cyan)
 Background colour ANSI  : 0 (Black)

5: Offset = 14, Length = 1, Text = "/"
 No action.
 Flags = Hilite: YES, Underline: no, Blink: no, Inverse: no, Changed: no
 Foreground colour ANSI  : 0 (Black)
 Background colour ANSI  : 0 (Black)

6: Offset = 15, Length = 7, Text = "66595  "
 No action.
 Flags = Hilite: YES, Underline: no, Blink: no, Inverse: no, Changed: no
 Foreground colour ANSI  : 6 (Cyan)
 Background colour ANSI  : 0 (Black)

7: Offset = 22, Length = 1, Text = "["
 No action.
 Flags = Hilite: YES, Underline: no, Blink: no, Inverse: no, Changed: no
 Foreground colour ANSI  : 4 (Blue)
 Background colour ANSI  : 0 (Black)

8: Offset = 23, Length = 8, Text = "Movement"
 No action.
 Flags = Hilite: YES, Underline: no, Blink: no, Inverse: no, Changed: no
 Foreground colour ANSI  : 0 (Black)
 Background colour ANSI  : 0 (Black)

9: Offset = 31, Length = 2, Text = "] "
 No action.
 Flags = Hilite: YES, Underline: no, Blink: no, Inverse: no, Changed: no
 Foreground colour ANSI  : 4 (Blue)
 Background colour ANSI  : 0 (Black)

10: Offset = 33, Length = 4, Text = "2000"
 No action.
 Flags = Hilite: no, Underline: no, Blink: no, Inverse: no, Changed: no
 Foreground colour ANSI  : 6 (Cyan)
 Background colour ANSI  : 0 (Black)

11: Offset = 37, Length = 1, Text = "/"
 No action.
 Flags = Hilite: YES, Underline: no, Blink: no, Inverse: no, Changed: no
 Foreground colour ANSI  : 0 (Black)
 Background colour ANSI  : 0 (Black)

12: Offset = 38, Length = 6, Text = "2000  "
 No action.
 Flags = Hilite: YES, Underline: no, Blink: no, Inverse: no, Changed: no
 Foreground colour ANSI  : 6 (Cyan)
 Background colour ANSI  : 0 (Black)

13: Offset = 44, Length = 1, Text = "["
 No action.
 Flags = Hilite: YES, Underline: no, Blink: no, Inverse: no, Changed: no
 Foreground colour ANSI  : 4 (Blue)
 Background colour ANSI  : 0 (Black)

14: Offset = 45, Length = 5, Text = "Money"
 No action.
 Flags = Hilite: YES, Underline: no, Blink: no, Inverse: no, Changed: no
 Foreground colour ANSI  : 0 (Black)
 Background colour ANSI  : 0 (Black)

15: Offset = 50, Length = 2, Text = "] "
 No action.
 Flags = Hilite: YES, Underline: no, Blink: no, Inverse: no, Changed: no
 Foreground colour ANSI  : 4 (Blue)
 Background colour ANSI  : 0 (Black)

16: Offset = 52, Length = 5, Text = "1,179"
 No action.
 Flags = Hilite: no, Underline: no, Blink: no, Inverse: no, Changed: no
 Foreground colour ANSI  : 6 (Cyan)
 Background colour ANSI  : 0 (Black)

17: Offset = 57, Length = 2, Text = " >"
 No action.
 Flags = Hilite: YES, Underline: no, Blink: no, Inverse: no, Changed: no
 Foreground colour ANSI  : 6 (Cyan)
 Background colour ANSI  : 0 (Black)

18: Offset = 59, Length = 1, Text = " "
 No action.
 Flags = Hilite: no, Underline: no, Blink: no, Inverse: no, Changed: no
 Foreground colour ANSI  : 7 (White)
 Background colour ANSI  : 0 (Black)

19: Offset = 60, Length = 1, Text = "("
 No action.
 Flags = Hilite: YES, Underline: no, Blink: no, Inverse: no, Changed: no
 Foreground colour ANSI  : 2 (Green)
 Background colour ANSI  : 0 (Black)

20: Offset = 61, Length = 1, Text = "="
 No action.
 Flags = Hilite: YES, Underline: no, Blink: no, Inverse: no, Changed: no
 Foreground colour ANSI  : 4 (Blue)
 Background colour ANSI  : 0 (Black)

21: Offset = 62, Length = 1, Text = "O"
 No action.
 Flags = Hilite: YES, Underline: no, Blink: no, Inverse: no, Changed: no
 Foreground colour ANSI  : 6 (Cyan)
 Background colour ANSI  : 0 (Black)

22: Offset = 63, Length = 1, Text = "O"
 No action.
 Flags = Hilite: no, Underline: no, Blink: no, Inverse: no, Changed: no
 Foreground colour ANSI  : 6 (Cyan)
 Background colour ANSI  : 0 (Black)

23: Offset = 64, Length = 1, Text = "C"
 No action.
 Flags = Hilite: YES, Underline: no, Blink: no, Inverse: no, Changed: no
 Foreground colour ANSI  : 6 (Cyan)
 Background colour ANSI  : 0 (Black)

24: Offset = 65, Length = 1, Text = "="
 No action.
 Flags = Hilite: YES, Underline: no, Blink: no, Inverse: no, Changed: no
 Foreground colour ANSI  : 4 (Blue)
 Background colour ANSI  : 0 (Black)

25: Offset = 66, Length = 2, Text = ") "
 No action.
 Flags = Hilite: YES, Underline: no, Blink: no, Inverse: no, Changed: no
 Foreground colour ANSI  : 2 (Green)
 Background colour ANSI  : 0 (Black)

26: Offset = 68, Length = 6, Text = "Aralia"
 No action.
 Flags = Hilite: YES, Underline: no, Blink: no, Inverse: no, Changed: no
 Foreground colour ANSI  : 6 (Cyan)
 Background colour ANSI  : 0 (Black)

27: Offset = 74, Length = 1, Text = ":"
 No action.
 Flags = Hilite: YES, Underline: no, Blink: no, Inverse: no, Changed: no
 Foreground colour ANSI  : 4 (Blue)
 Background colour ANSI  : 0 (Black)

75 columns in 27 style runs

------ (end line information) ------
Top

Posted by Aralia Faal   (25 posts)  Bio
Date Reply #7 on Sun 01 Jul 2012 11:28 AM (UTC)
Message
Line 181 (181), Sunday, July 01, 7:18:37 AM
 Flags = End para: YES, Note: no, User input: no, Log: YES, Bookmark: no
 Length = 7, last space = -1
 Text = " test 2"

1 style run

1: Offset = 0, Length = 7, Text = " test 2"
 No action.
 Flags = Hilite: YES, Underline: no, Blink: no, Inverse: no, Changed: no
 Foreground colour ANSI  : 2 (Green)
 Background colour ANSI  : 0 (Black)

7 columns in 1 style run

------ (end line information) ------
Top

Posted by Nick Gammon   Australia  (23,122 posts)  Bio   Forum Administrator
Date Reply #8 on Sun 01 Jul 2012 09:33 PM (UTC)
Message
Did you reinstall the plugin after making the change? That should have worked.

- Nick Gammon

www.gammon.com.au, www.mushclient.com
Top

Posted by Aralia Faal   (25 posts)  Bio
Date Reply #9 on Mon 02 Jul 2012 07:04 AM (UTC)
Message
I had reinstalled after editing and it didn't work. But when I loaded up today it seemed to work perfectly. Unfortunately one of the immortals took it upon themselves to change the output of OOC slightly. It now shows up as:

[Health] 33442/63676 [Movement] 2000/2000 [Money] 455,445 > [OOC] You say, 'Yea that messed it up'

All the [ from the prompt and [OOC] are the same color. With the edit you provided it how shows nothing but the timestamps in the miniwindow:

[02:56:39]
[02:56:43]
[02:56:45]
Top

Posted by Aralia Faal   (25 posts)  Bio
Date Reply #10 on Mon 02 Jul 2012 07:05 AM (UTC)
Message
Here is a new list of line styles:

Line 2045 (2045), Monday, July 02, 2:50:24 AM
 Flags = End para: YES, Note: no, User input: no, Log: YES, Bookmark: no
 Length = 84, last space = 75
 Text = "[Health] 33442/63676  [Movement] 2000/2000  [Money] 455,445 > [OOC] You say, 'Test2'"

27 style runs

1: Offset = 0, Length = 1, Text = "["
 No action.
 Flags = Hilite: YES, Underline: no, Blink: no, Inverse: no, Changed: no
 Foreground colour ANSI  : 4 (Blue)
 Background colour ANSI  : 0 (Black)

2: Offset = 1, Length = 6, Text = "Health"
 No action.
 Flags = Hilite: YES, Underline: no, Blink: no, Inverse: no, Changed: no
 Foreground colour ANSI  : 0 (Black)
 Background colour ANSI  : 0 (Black)

3: Offset = 7, Length = 2, Text = "] "
 No action.
 Flags = Hilite: YES, Underline: no, Blink: no, Inverse: no, Changed: no
 Foreground colour ANSI  : 4 (Blue)
 Background colour ANSI  : 0 (Black)

4: Offset = 9, Length = 5, Text = "33442"
 No action.
 Flags = Hilite: no, Underline: no, Blink: no, Inverse: no, Changed: no
 Foreground colour ANSI  : 6 (Cyan)
 Background colour ANSI  : 0 (Black)

5: Offset = 14, Length = 1, Text = "/"
 No action.
 Flags = Hilite: YES, Underline: no, Blink: no, Inverse: no, Changed: no
 Foreground colour ANSI  : 0 (Black)
 Background colour ANSI  : 0 (Black)

6: Offset = 15, Length = 7, Text = "63676  "
 No action.
 Flags = Hilite: YES, Underline: no, Blink: no, Inverse: no, Changed: no
 Foreground colour ANSI  : 6 (Cyan)
 Background colour ANSI  : 0 (Black)

7: Offset = 22, Length = 1, Text = "["
 No action.
 Flags = Hilite: YES, Underline: no, Blink: no, Inverse: no, Changed: no
 Foreground colour ANSI  : 4 (Blue)
 Background colour ANSI  : 0 (Black)

8: Offset = 23, Length = 8, Text = "Movement"
 No action.
 Flags = Hilite: YES, Underline: no, Blink: no, Inverse: no, Changed: no
 Foreground colour ANSI  : 0 (Black)
 Background colour ANSI  : 0 (Black)

9: Offset = 31, Length = 2, Text = "] "
 No action.
 Flags = Hilite: YES, Underline: no, Blink: no, Inverse: no, Changed: no
 Foreground colour ANSI  : 4 (Blue)
 Background colour ANSI  : 0 (Black)

10: Offset = 33, Length = 4, Text = "2000"
 No action.
 Flags = Hilite: no, Underline: no, Blink: no, Inverse: no, Changed: no
 Foreground colour ANSI  : 6 (Cyan)
 Background colour ANSI  : 0 (Black)

11: Offset = 37, Length = 1, Text = "/"
 No action.
 Flags = Hilite: YES, Underline: no, Blink: no, Inverse: no, Changed: no
 Foreground colour ANSI  : 0 (Black)
 Background colour ANSI  : 0 (Black)

12: Offset = 38, Length = 6, Text = "2000  "
 No action.
 Flags = Hilite: YES, Underline: no, Blink: no, Inverse: no, Changed: no
 Foreground colour ANSI  : 6 (Cyan)
 Background colour ANSI  : 0 (Black)

13: Offset = 44, Length = 1, Text = "["
 No action.
 Flags = Hilite: YES, Underline: no, Blink: no, Inverse: no, Changed: no
 Foreground colour ANSI  : 4 (Blue)
 Background colour ANSI  : 0 (Black)

14: Offset = 45, Length = 5, Text = "Money"
 No action.
 Flags = Hilite: YES, Underline: no, Blink: no, Inverse: no, Changed: no
 Foreground colour ANSI  : 0 (Black)
 Background colour ANSI  : 0 (Black)

15: Offset = 50, Length = 2, Text = "] "
 No action.
 Flags = Hilite: YES, Underline: no, Blink: no, Inverse: no, Changed: no
 Foreground colour ANSI  : 4 (Blue)
 Background colour ANSI  : 0 (Black)

16: Offset = 52, Length = 7, Text = "455,445"
 No action.
 Flags = Hilite: no, Underline: no, Blink: no, Inverse: no, Changed: no
 Foreground colour ANSI  : 6 (Cyan)
 Background colour ANSI  : 0 (Black)

17: Offset = 59, Length = 2, Text = " >"
 No action.
 Flags = Hilite: YES, Underline: no, Blink: no, Inverse: no, Changed: no
 Foreground colour ANSI  : 6 (Cyan)
 Background colour ANSI  : 0 (Black)

18: Offset = 61, Length = 1, Text = " "
 No action.
 Flags = Hilite: no, Underline: no, Blink: no, Inverse: no, Changed: no
 Foreground colour ANSI  : 7 (White)
 Background colour ANSI  : 0 (Black)

19: Offset = 62, Length = 1, Text = "["
 No action.
 Flags = Hilite: YES, Underline: no, Blink: no, Inverse: no, Changed: no
 Foreground colour ANSI  : 4 (Blue)
 Background colour ANSI  : 0 (Black)

20: Offset = 63, Length = 1, Text = "O"
 No action.
 Flags = Hilite: YES, Underline: no, Blink: no, Inverse: no, Changed: no
 Foreground colour ANSI  : 6 (Cyan)
 Background colour ANSI  : 0 (Black)

21: Offset = 64, Length = 1, Text = "O"
 No action.
 Flags = Hilite: no, Underline: no, Blink: no, Inverse: no, Changed: no
 Foreground colour ANSI  : 6 (Cyan)
 Background colour ANSI  : 0 (Black)

22: Offset = 65, Length = 1, Text = "C"
 No action.
 Flags = Hilite: YES, Underline: no, Blink: no, Inverse: no, Changed: no
 Foreground colour ANSI  : 6 (Cyan)
 Background colour ANSI  : 0 (Black)

23: Offset = 67, Length = 2, Text = "] "
 No action.
 Flags = Hilite: YES, Underline: no, Blink: no, Inverse: no, Changed: no
 Foreground colour ANSI  : 4 (Blue)
 Background colour ANSI  : 0 (Black)

24: Offset = 68, Length = 7, Text = "You say"
 No action.
 Flags = Hilite: no, Underline: no, Blink: no, Inverse: no, Changed: no
 Foreground colour ANSI  : 6 (Cyan)
 Background colour ANSI  : 0 (Black)

25: Offset = 75, Length = 3, Text = ", '"
 No action.
 Flags = Hilite: YES, Underline: no, Blink: no, Inverse: no, Changed: no
 Foreground colour ANSI  : 4 (Blue)
 Background colour ANSI  : 0 (Black)

26: Offset = 78, Length = 5, Text = "Test2"
 No action.
 Flags = Hilite: YES, Underline: no, Blink: no, Inverse: no, Changed: no
 Foreground colour ANSI  : 6 (Cyan)
 Background colour ANSI  : 0 (Black)

27: Offset = 83, Length = 1, Text = "'"
 No action.
 Flags = Hilite: YES, Underline: no, Blink: no, Inverse: no, Changed: no
 Foreground colour ANSI  : 4 (Blue)
 Background colour ANSI  : 0 (Black)

84 columns in 27 style runs

------ (end line information) ------
Top

Posted by Nick Gammon   Australia  (23,122 posts)  Bio   Forum Administrator
Date Reply #11 on Mon 02 Jul 2012 08:53 AM (UTC)
Message
Aralia Faal said:

Unfortunately one of the immortals took it upon themselves to change the output of OOC slightly.


They have to be reading this forum. That can't be a coincidence. :)

- Nick Gammon

www.gammon.com.au, www.mushclient.com
Top

Posted by Nick Gammon   Australia  (23,122 posts)  Bio   Forum Administrator
Date Reply #12 on Mon 02 Jul 2012 08:55 AM (UTC)

Amended on Mon 02 Jul 2012 08:56 AM (UTC) by Nick Gammon

Message
How about:


    while next (styles) and #styles >= 2 do
      if styles [1].text:sub (1, 1) == "[" and
         styles [2].text:sub (1, 1) == "O"
         then
        break
      end -- if
      table.remove (styles, 1)
    end -- for



If they change it back, they are onto you. ;)

- Nick Gammon

www.gammon.com.au, www.mushclient.com
Top

Posted by Aralia Faal   (25 posts)  Bio
Date Reply #13 on Mon 02 Jul 2012 04:54 PM (UTC)

Amended on Mon 02 Jul 2012 04:55 PM (UTC) by Aralia Faal

Message
Let’s hope not... :)

Unfortunately that did not solve the problem.
Top

Posted by Aralia Faal   (25 posts)  Bio
Date Reply #14 on Mon 02 Jul 2012 06:46 PM (UTC)
Message
Ok, so I closed mushclient all together and opened it again and it works now.
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.


33,890 views.

Posting of new messages is disabled at present.

Refresh page

Go to topic:           Search the forum


[Go to top] top

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