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.
 Entire forum ➜ MUSHclient ➜ Lua ➜ Remote control plugin.

Remote control plugin.

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


Posted by Poromenos   Greece  (1,037 posts)  Bio
Date Fri 10 Dec 2004 09:21 AM (UTC)
Message
I want to make a plugin to remotely control an instance of MC on another pc (see what they see, etc), and I need TCP, UDP is just too... stateless. I think the best way to do this is lua, since other languages will freeze MC, not respond to events, etc. I am totally lost though, I don't know where to begin. Can I make a script in lua to open/transmit through a TCP socket, or do I have to write an external DLL and link it to MC?

Vidi, Vici, Veni.
http://porocrom.poromenos.org/ Read it!
Top

Posted by Flannel   USA  (1,230 posts)  Bio
Date Reply #1 on Fri 10 Dec 2004 11:02 AM (UTC)

Amended on Fri 10 Dec 2004 11:16 AM (UTC) by Flannel

Message
Why not use the chat protocol?

Its real easy to do. Well... once you get into triggers and stuff, it's a bit like putting a ship in a bottle. But it is indeed easy, once you get the hang of it.

You already have everything you need. Snooping, Commands. Just no notes. (You rewrite all your world.note's as chat messages)

~Flannel

Messiah of Rose
Eternity's Trials.

Clones are people two.
Top

Posted by Poromenos   Greece  (1,037 posts)  Bio
Date Reply #2 on Fri 10 Dec 2004 04:09 PM (UTC)
Message
Because chat pops up the box to allow snooping and stuff, and I need to be able to control it when noone is at the other PC :/

Vidi, Vici, Veni.
http://porocrom.poromenos.org/ Read it!
Top

Posted by Flannel   USA  (1,230 posts)  Bio
Date Reply #3 on Fri 10 Dec 2004 06:21 PM (UTC)

Amended on Fri 10 Dec 2004 06:23 PM (UTC) by Flannel

Message
You can get past that. There is an option "automatically allow snoop" that gets rid of the need for that box. That and 'automaticlly accept files' get rid of all need of anyone at the remote computer (I was thinking about this specifically when lobbying for those auto options).

~Flannel

Messiah of Rose
Eternity's Trials.

Clones are people two.
Top

Posted by Nick Gammon   Australia  (23,121 posts)  Bio   Forum Administrator
Date Reply #4 on Fri 10 Dec 2004 11:34 PM (UTC)
Message
Quote:

Can I make a script in lua to open/transmit through a TCP socket ...


The luasocket library, that I think I described recently, will do that. I think it lets you have non-blocking connections which is what you want.

However Flannel may be right about the chat system being an easier way of doing it.

- Nick Gammon

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

Posted by Poromenos   Greece  (1,037 posts)  Bio
Date Reply #5 on Sun 19 Dec 2004 10:04 AM (UTC)
Message
Flannel's way is great, but I *think* I tried that and it still popped up the box. I'll try again and see. Luasock also sounds nice for other general-purpose stuff.

Vidi, Vici, Veni.
http://porocrom.poromenos.org/ Read it!
Top

Posted by Flannel   USA  (1,230 posts)  Bio
Date Reply #6 on Sun 19 Dec 2004 10:34 AM (UTC)
Message
Something isn't getting set properly if you still get the box. Since it does indeed work, well, if everything works correctly.

~Flannel

Messiah of Rose
Eternity's Trials.

Clones are people two.
Top

Posted by Poromenos   Greece  (1,037 posts)  Bio
Date Reply #7 on Sun 19 Dec 2004 11:17 AM (UTC)
Message
Ah, great, I will do it that way then.

Vidi, Vici, Veni.
http://porocrom.poromenos.org/ Read it!
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.


19,927 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.