Register forum user name 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.

Due to spam on this forum, all posts now need moderator approval.

 Entire forum ➜ MUSHclient ➜ Plugins ➜ Tabbed scrolling miniwindow

Tabbed scrolling miniwindow

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


Pages: 1  2 3  4  

Posted by Xinefus   (106 posts)  Bio
Date Reply #15 on Thu 20 Aug 2020 04:30 PM (UTC)

Amended on Thu 20 Aug 2020 04:31 PM (UTC) by Xinefus

Message
Ref: https://github.com/DBNU-Braska/DBNU/tree/non-msdp

So I am trying to trace the path of information through the script so that I can understand where things may be going wrong for me. I've been trying to remove some of the colour stuff, but it is hard as some functions in the colour file don't necessarily do 'only' colour stuff.
I'm trying to trace the error from Reply #9. And in doing so, try to understand how the miniwindow prints the text.
When I run a test trigger in MUSHClient (all my files can be found at ref), the information is right away picked up and sent to my first function (non_channel) as it should, sent to stampAndStore and then storeNonChannel. I get(i just did some prints):
-Non-Channel-
Name:  Info
Line:  [Info] -> Alucard has left the game.
Wildcards:  table: 07781C20
Styles:  table: 077860B0
-stampAndStore-
msg sent to filter_as_needed
-filter_as_needed-
msg sent to ColoursToStyles:
Sent to storeNonChannel
-storeNonChannel-
styles:  table: 07785E10
label:  Info 

I'm not yet very good with tables, I understand them, but I don't know how gmatch is supposed to get a string when all along styles is a table (line 100 in text_rect.lua). Can someone explain/teach/enlighten me on how this works?
Top

Posted by Fiendish   USA  (2,534 posts)  Bio   Global Moderator
Date Reply #16 on Thu 20 Aug 2020 04:57 PM (UTC)

Amended on Thu 20 Aug 2020 05:07 PM (UTC) by Fiendish

Message
Quote:
some functions in the colour file don't necessarily do 'only' colour stuff

There are your server's color codes embedded into text, and there are ANSI sequences embedded into text, and there are MUSHclient's style run tables, and they are all different, and manipulating them requires navigating the different ways that they encode color information.


Quote:
I don't know how gmatch is supposed to get a string when all along styles is a table


Notice the word "text" in
re:gmatch(text,



Also the word "text" in
function TextRect:findURLs(text)



You've done:
local urls = self:findURLs(styles)
Notice the word "styles".


I do
local urls = self:findURLs(strip_colours_from_styles(styles))
See the difference?


This is why I said that you can't just remove functions calls and expect things to keep working without dealing with the results from your changes.

https://github.com/fiendish/aardwolfclientpackage
Top

Posted by Xinefus   (106 posts)  Bio
Date Reply #17 on Thu 20 Aug 2020 06:13 PM (UTC)

Amended on Thu 20 Aug 2020 06:30 PM (UTC) by Xinefus

Message
Oh gosh, I thought I had reverted all your colour stuff. Thank you.

So, the miniwindow prints the line of text that I throw at it. (almost perfectly)

I don't think I fully understand the extent of what your colour files do compared to the original chat_miniwindow that I have.

When I use the test trigger function within MUSHClient, I send/receive the following:
Send:[Info] -> Alucard has left the game.
Receive: &w[Info] -> Alucard has left the game.

It seems to be spitting out the code_prefix and w (white?).

Also, when I actually login and see how it performs, it works, but I don't understand how/why it is striping all the colours? I'm going to try and trace this one down now.

What part have I done wrong?
Top

Posted by Xinefus   (106 posts)  Bio
Date Reply #18 on Thu 20 Aug 2020 07:19 PM (UTC)

Amended on Thu 20 Aug 2020 07:20 PM (UTC) by Xinefus

Message
From what I can gather, the only part that I have omitted from your original code now is:
rc, msg = CallPlugin("48f867c18f6ff1d6d3b52918", "filter_string", msg)
Looking at this, it seems it requires the message to be run through
canonicalize_colours(msg):split("%f[@]@x%d%d%d", true)


I don't believe this is going to work out very good for me. I'm still trying to figure out if I am able to do colours the way you have. Ansi colours are easy, but the xterm stuff is not trivial for my MUD, and this function will undoubtedly be the death of me.

Then that split. In my MUD, colours are shown with both &%D format for ansi and `[F%d%d%d] format for xterm.

*scratches head furiously*
Top

Posted by Fiendish   USA  (2,534 posts)  Bio   Global Moderator
Date Reply #19 on Thu 20 Aug 2020 09:09 PM (UTC)

Amended on Thu 20 Aug 2020 09:13 PM (UTC) by Fiendish

Message
Xinefus said:

From what I can gather, the only part that I have omitted from your original code now is:
rc, msg = CallPlugin("48f867c18f6ff1d6d3b52918", "filter_string", msg)



You don't need that. That's for my gag/sub plugin, which is unrelated. You can just remove references to filter_as_needed from the plugin.

https://github.com/fiendish/aardwolfclientpackage
Top

Posted by Xinefus   (106 posts)  Bio
Date Reply #20 on Thu 20 Aug 2020 11:28 PM (UTC)

Amended on Thu 20 Aug 2020 11:34 PM (UTC) by Xinefus

Message
Hey, the colour came back!

All my triggers are working (it seems) except for one:
 match="[DBNU Auction House] (.+)$", and example being: [DBNU Auction House] -> The item [Some Instant Rice] is being auctioned for [0] Zeni by the player Braska

Function/Sub: non_channel called by trigger
Reason: processing trigger "Aution_House" when matching line: "[DBNU Auction House] -> The item [Some Instant Rice] is being auctioned for [0] Zeni by the player Braska"
[string "Plugin: DBNU_Chat_Capture_Miniwindow"]:726: attempt to index field '?' (a nil value)
stack traceback:
        [string "Plugin: DBNU_Chat_Capture_Miniwindow"]:726: in function 'storeNonChannel'
        [string "Plugin: DBNU_Chat_Capture_Miniwindow"]:630: in function 'stampAndStore'
        [string "Plugin: DBNU_Chat_Capture_Miniwindow"]:685: in function <[string "Plugin: DBNU_Chat_Capture_Miniwindow"]:684>


Any ideas what it is thinking here? the regex works since it is taken from my other miniwindow plugin, but it doesn't seem to like it here.

Lastly, I'm going to start looking at this right-click issue. Seems hotspots (which I don't fully understand) may not all be working? the scroll-wheel doesn't seem to be working yet either - doesn't throw any errors, but doesn't scroll other than with the scroll-bar.
Function/Sub: TextRect.mouseUp called by Plugin DBNU_Chat_Capture_Miniwindow
Reason: Executing plugin DBNU_Chat_Capture_Miniwindow sub TextRect.mouseUp
C:\Program Files (x86)\MUSHclient\lua\text_rect.lua:844: attempt to index local 'ems' (a nil value)
stack traceback:
        C:\Program Files (x86)\MUSHclient\lua\text_rect.lua:844: in function 'rightClickMenu'
        C:\Program Files (x86)\MUSHclient\lua\text_rect.lua:659: in function <C:\Program Files (x86)\MUSHclient\lua\text_rect.lua:655>
That's the right-click error. I had mentioned it earlier. Where do I find
self.external_menu_string_generator
Top

Posted by Fiendish   USA  (2,534 posts)  Bio   Global Moderator
Date Reply #21 on Fri 21 Aug 2020 12:54 AM (UTC)
Message
It looks like there was a bug in my plugin where the right-click menu text didn't get returned if my echo plugin wasn't loaded. Move https://github.com/DBNU-Braska/DBNU/blob/non-msdp/DBNU_channels_fiendish.xml#L1349 one line down.

https://github.com/fiendish/aardwolfclientpackage
Top

Posted by Xinefus   (106 posts)  Bio
Date Reply #22 on Sun 23 Aug 2020 09:22 PM (UTC)
Message
Thanks Fiendish, that certainly made things start to look a lot more interesting.

As stated earlier, it seems to be catching everything except the auction house channel. Not sure what is causing that one yet, but I haven't looked into it much actually.

I wanted to keep moving forward with the capabilities of the plugin. I am working on adding the echo capability. It seems that the plugin works so far as it removes echo for my non-channels, but not for the channels. I believe because I am not getting the channels from gmcp, I may have missed a few things when rewriting? I have added all the triggers, from the channels.xml. I don't believe I have added all the functionalities for channels yet and may still have some stuff commented out that I shouldn't.

Another question I have is ref addDefaultchannels or addDefaultnonchannels: Since all of my info is coming from triggers, should I be enabling all the channels and nonchannels within the respective function or can I just have them set to enabled="y" right from the beginning?
Top

Posted by Fiendish   USA  (2,534 posts)  Bio   Global Moderator
Date Reply #23 on Mon 24 Aug 2020 12:36 AM (UTC)

Amended on Mon 24 Aug 2020 12:37 AM (UTC) by Fiendish

Message
I don't have answers for "should" questions. If it works, then it's good. :)

https://github.com/fiendish/aardwolfclientpackage
Top

Posted by Xinefus   (106 posts)  Bio
Date Reply #24 on Tue 25 Aug 2020 12:39 PM (UTC)
Message
Ref: a. https://github.com/DBNU-Braska/DBNU/blob/non-msdp/DBNU_chat_echo.xml
b. https://github.com/DBNU-Braska/DBNU/blob/non-msdp/DBNU_channels_fiendish.xml

Working through the two plugins (chat_miniwindow, chat_echo), I've run into two issues.

1. With the Chat_miniwindow: I can't seem to get the trigger for my auction channel to work. It works in a regular chat miniwindow, but doesn't seem to want to in this plugin.

Is this something to do with it having more than one set of "[]" in the string? I can't seem to find the error.

2. With chat_echo: I somehow have mixed the tables up. My non-channels work just fine, but the channels do not work at all. I added a check within the code (ref a), 449-455, and notice that my channels are being included in my non-channels.

Can someone show me how/where I have gone wrong with the channels_table vs nonchannels_table?

Thanks again!
Top

Posted by Fiendish   USA  (2,534 posts)  Bio   Global Moderator
Date Reply #25 on Tue 25 Aug 2020 01:27 PM (UTC)
Message
Quote:
I can't seem to get the trigger for my auction channel to work. It works in a regular chat miniwindow, but doesn't seem to want to in this plugin.

You misspelled the name of the trigger.

Quote:
My non-channels work just fine, but the channels do not work at all.

You enable your nonchannel triggers but not your channel triggers.

https://github.com/fiendish/aardwolfclientpackage
Top

Posted by Xinefus   (106 posts)  Bio
Date Reply #26 on Tue 25 Aug 2020 01:54 PM (UTC)

Amended on Tue 25 Aug 2020 02:28 PM (UTC) by Xinefus

Message
ugh, spelling! Thank you.

To elaborate on my second problem. If you saw within my DBNU_channels, I had tried to do a enabletrigger/check_channel_trigger in extend_rightclick_menu_result. When I did this, I cannot change any of the "edit channel captures" under "Tab capture settings". They all just stay enabled.

The table issue as mentioned in my last post, I cannot seem to add/remove echo for my channels. The tables somehow are mixed up and can't find it. From the check I added, this is what shows up when I do "chats echo" and have "Echo none"
Current channel echo status: 
Ask_Answer false
Clan false
FriendChat false
IMM false
Music false
Newbie false
OOC false
RP_Chat false
Race false
Scouter false
Wartalk false
Yell false
say false
say_get false

Current non-channel echo status: 
Ask_Answer false
Auction_House false
Auto_Events false
Clan false
Clan_Info false
FriendChat false
Friend_Info false
HighScore false
IMM false
IMM_Logs false
Info false
Music false
Newbie false
News_Flash false
OOC false
RP_Chat false
RP_Story false
Race false
Scouter false
Wartalk false
Yell false
say false
say_get false

and when I do it again with "echo all":
Current channel echo status: 
Ask_Answer true
Clan true
FriendChat true
IMM true
Music true
Newbie true
OOC true
RP_Chat true
Race true
Scouter true
Wartalk true
Yell true
say true
say_get true

Current non-channel echo status: 
Ask_Answer false
Auction_House false
Auto_Events false
Clan false
Clan_Info false
FriendChat false
Friend_Info false
HighScore false
IMM false
IMM_Logs false
Info false
Music false
Newbie false
News_Flash false
OOC false
RP_Chat false
RP_Story false
Race false
Scouter false
Wartalk false
Yell false
say false
say_get false
See how in the nonchannel echos the channel echos are in there? I can't find where I mixed those up. Note that it does not change the echo state of the channels at all. They still do not echo.
Top

Posted by Xinefus   (106 posts)  Bio
Date Reply #27 on Tue 25 Aug 2020 02:28 PM (UTC)

Amended on Tue 25 Aug 2020 03:08 PM (UTC) by Xinefus

Message
Call me a liar... I did just uncomment those lines within extend_rightclick_menu_result and it seems that part is working now.

The rest I'd still like some insight.
Top

Posted by Fiendish   USA  (2,534 posts)  Bio   Global Moderator
Date Reply #28 on Tue 25 Aug 2020 05:30 PM (UTC)
Message
Delete your state file.

https://github.com/fiendish/aardwolfclientpackage
Top

Posted by Xinefus   (106 posts)  Bio
Date Reply #29 on Tue 25 Aug 2020 07:27 PM (UTC)

Amended on Tue 25 Aug 2020 07:29 PM (UTC) by Xinefus

Message
No change. Still cannot change the echo settings for my channels. Non channels seems to work fine.

I don't understand how the end_gag trigger group interacts with all the triggers. I see that it is set whenever I use the non-channels, but I don't have the same for channels.

Is this what I should have when I enable/disable echo for channels?
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.


98,572 views.

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

It is now over 60 days since the last post. This thread is closed.     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.