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 ➜ Hyperlinks + World redirects?

Hyperlinks + World redirects?

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


Posted by SierraK   (8 posts)  Bio
Date Tue 19 Sep 2017 09:24 PM (UTC)

Amended on Tue 19 Sep 2017 09:28 PM (UTC) by SierraK

Message
Hello! I'm not very skilled with LUA yet, but have been able to write my own/remix others. Right now, I've been stuck because I cannot get MUSHclient to do what I want.

The goals of this plugin:
-Make all links clickable.
-Send links to a separate window with a source tag before them(1)
-Prevent content from sub-Worlds(2) (channel chats a la Rod Chat plugin) that has hyperlinks from sending a copy to the original World.
-Preserve original content in original World(3)

1 - (I.E., Channel Chats with a link would be like...
[Civic] http://www.google.com <-- So far I can do this, but it breaks when I use tells/ooc.

2 - I'm okay with it not being clickable in the sub-Worlds, and showing just the clickable link in the history window (which I've been able to do successfully).



3 - I was able to do this without the clickable links, however, it would also send the text + clickable link to the main window.

Here's the meat of the code, line ~130 is where the crux of what I'm talking about is:
https://pastebin.com/kKwM5tHY

I'm hoping for some help. Again, what I'd like to do is have every World and sub-World (a la Rod Chats - I have 3, Channel Chats, OOC, and a Notifications window (only the Channel Chats and OOC sub-Worlds need this). Here's what I've managed to piece together using the Hyperlink_URL2 plugin, the Rod Chat plugin, and another URL handler a friend wrote for me.

I'd really appreciate it if someone could point me in the right direction - I'm not asking for a solution (though that would be awesome), but where I should start looking for information on how to make this work.
Top

Posted by Fiendish   USA  (2,534 posts)  Bio   Global Moderator
Date Reply #1 on Sat 23 Sep 2017 03:02 AM (UTC)
Message
Is the problem just that you don't know how to trigger on URLs in order to send them to the other world window?

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

Posted by SierraK   (8 posts)  Bio
Date Reply #2 on Sun 24 Sep 2017 04:28 AM (UTC)

Amended on Sun 24 Sep 2017 08:36 AM (UTC) by SierraK

Message
My apologies, I did a horrible job of describing what I'm trying to do.

I have two dummy worlds (Channel Chats and OOC) that are fed via the main world window. I've tried using the Hyperlink_URL2 plugin, but things that should only be being sent to either the Channel Chats or OOC windows are also showing up on the main window. That's the crux of my problem. I'm able to read enough of LUA to cobble things together (horribly, I know), but I'm still trying to figure out how the puzzle pieces fit together.

Second, I'd like to take just the URL portion (I've been able to do this successfully) and send that to a separate Link History sub-World, and append where it came from (Channel Chats, OOC, Main, for instance) and a timestamp. Unfortunately, the way that I did that also meant that it sent that to the server, so it would be "page bob=Hey, check this link out: link.link," but go through as "page bob=OOC <garbage from timestamp messing with MUSH code> Hey, check this ... etc."

Third, I ran into a problem where cutting the text with the hyperlinks out of the main world window would completely remove it from there, send only the link, and anything that would be linked in say, a room, or a description, would be completely lost. The alternative was to send the full text to the Link History window, but that seemed like a very poor solution and would have been less useful than the original problem I was trying to solve.

None of this is anything that's necessary to be solved, and it's just super creature comfort/quality of life stuff for my admittedly quirky setup, but I've shared it with a few people and I know that they would also like a solid URL handler for worlds with sub-worlds.

Please note that I'm saying sub-worlds, and *not* mini-windows. The purpose behind using sub-worlds is so that I can take advantage of the additional inputs (Those get redirected back to the main window), so that I can chat/look at descriptions/check information/help files without losing poses. It's been especially helpful for working on MUSH softcode on the fly.

If I could get, like, a list of functions that I should read up on, or some insight into how things are sent from a main world to a dummy world, and how to make sure hyperlinks and ANSI formatting remain intact, it would really be helpful.

I've tried reading the stuff for note, colournote/tell, but I haven't been able to find anything about NoteStyle? At least, not in how it's used here.

I know this is probably super confusing to anyone that isn't me, and I'm really sorry about that. Hopefully there's someone that gets it and can point me in the right direction. If not, thank you all for your help. I've used y'all as a resource for about a decade now.
Top

Posted by Fiendish   USA  (2,534 posts)  Bio   Global Moderator
Date Reply #3 on Sun 24 Sep 2017 07:29 PM (UTC)

Amended on Sun 24 Sep 2017 07:41 PM (UTC) by Fiendish

Message
I think you're going to need to show screenshots. I don't quite understand what you're trying to describe.

Quote:
I've tried using the Hyperlink_URL2 plugin, but things that should only be being sent to either the Channel Chats or OOC windows are also showing up on the main window. That's the crux of my problem.


The Hyperlink() function called by the Hyperlink_URL2 plugin internally marks the result text as a Tell rather than raw server text. Once that happens you can't readily omit it from output anymore. That means that if you have the plugin running in your main world then it will replace all URLs it finds with things that can't be ommitted unless trigger processing is halted by other scripts before it sees them.

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

Posted by SierraK   (8 posts)  Bio
Date Reply #4 on Sun 24 Sep 2017 07:34 PM (UTC)

Amended on Sun 24 Sep 2017 07:49 PM (UTC) by SierraK

Message
Fiendish said:

So only install Hyperlink_URL2 in your secondary worlds and not in your main world.


See, I thought that would be a solution, but it still sends things to the main world like that, and none of the links in the sub-worlds are clickable.
Top

Posted by Fiendish   USA  (2,534 posts)  Bio   Global Moderator
Date Reply #5 on Sun 24 Sep 2017 07:41 PM (UTC)
Message
Sorry, I edited my response. Please read it again.

https://github.com/fiendish/aardwolfclientpackage
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.


17,326 views.

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.