[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]  Plugins
. . -> [Subject]  Hyperlinks + World redirects?
Home  |  Users  |  Search  |  FAQ
Username:
Register forum user name
Password:
Forgotten password?

Hyperlinks + World redirects?

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


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

Posted by Fiendish   USA  (1,641 posts)  [Biography] 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
[Go to top] top

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

Posted by Fiendish   USA  (1,641 posts)  [Biography] 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
[Go to top] top

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

Posted by Fiendish   USA  (1,641 posts)  [Biography] 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
[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.


591 views.

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]