Page 1 of 1

[Mod] Teleport Request [git rolling release][tpr]

PostPosted: Tue Jan 15, 2013 23:16
by Traxie21
This mod is a response to the need I have seen on several Minetest servers.
It clones the popular tpa feature in the MineCraft Bukkit mod, Essentials.

Usage:
Type /tpr [playername] to request permission to teleport to a player.
The other player may now type /tpy to allow you to teleport to them, or /tpn to deny.

Type /tphr [playername] to request permission to teleport another player to you.
The other player may now type /tpy to allow you to teleport them to you, or /tpn to deny.

Download:
From CWz's repository: https://github.com/ChaosWormz/teleport-request/archive/master.zip
...or browse the code: https://github.com/ChaosWormz/teleport-request

Install: after downloading and/or extracting, rename the top-level directory to "tpr". Then either place it in your worldmods directory, or put it in your global mods directory and enable it like usual.

Changelog:
Versions beyond 1.0:
Just bugfixes and internal code improvements.

1.0:
Pretty sure this is bug free.
Added /tphr (only visible difference)
Cleaned up code again, variables are still confusing, but it works fine.
Last release unless bugs are found, or good suggestions are added.

0.2:
Fixed major bug
Changed accept command to /tpy
Added deny command /tpn
Added configurable timeout, default 30 seconds.

0.1a:
Base release.

License:
WTFPL

Upcoming:
Change accept/deny commands to /tpy and /tpn. Thanks jojoa -DONE
Fix assumed bug. - DONE
System to /tphr - DONE
Configurable teleport canceling after time - DONE

Credits:
PlitzAdam: for helping me with file.io and showing me an excellent lua tutorial
celeron55: I copied the find_free_place_near function until I write my own :3
jojoa1997: For making my code a bit more logical and helping me get past a syntax error.

PostPosted: Tue Jan 15, 2013 23:23
by jojoa1997
what about
/tp <name>
/tpy
/tpn

y and n are yes and no. the reason i say /tp and not /tpaccept because /tp is way quicker. also /tpy and /tpn are kinda self explanitory and also easy.

PostPosted: Tue Jan 15, 2013 23:53
by InfinityProject
+1 this is pretty sweet.

PostPosted: Wed Jan 16, 2013 07:35
by Traxie21
Good idea jojoa! I just used the same command Essentials used.
However, I think I'll stick with /tpr as the request command to ensure better compatibility.

Ty Infinity :D
ALSO: I was brainstorming earlier, and it occoured to me that there is probably a bug in this version. If more than one person have pending teleportation requests to the same person, either the server will crash, or both players will be teleported.

I will fix this as soon as I get home, which may be as late as next Monday.

Adding Credits to main post as well.

Posted from my Kindle Keyboard.

PostPosted: Wed Jan 16, 2013 11:56
by jojoa1997
Traxie21 wrote:Good idea jojoa! I just used the same command Essentials used.
However, I think I'll stick with /tpr as the request command to ensure better compatibility.

Ty Infinity :D
ALSO: I was brainstorming earlier, and it occoured to me that there is probably a bug in this version. If more than one person have pending teleportation requests to the same person, either the server will crash, or both players will be teleported.

I will fix this as soon as I get home, which may be as late as next Monday.

Adding Credits to main post as well.

Posted from my Kindle Keyboard.

Well /tpr is good. It thought it was /tprequest. I think that there should be one for admins /tpr all and everyone getrs a request.

PostPosted: Wed Jan 16, 2013 13:00
by Traxie21
Erm... what happens if they all accept?
Admin bouncing XD
However, I will probably add a bypass perm so that admins, typing /tpr will be able to teleport without needing to be accepted.

Would that work for you?

PostPosted: Wed Jan 16, 2013 13:17
by jojoa1997
No they teleport to the admin. As in a admin saying everyone come here

PostPosted: Thu Jan 17, 2013 01:54
by Traxie21
New release: 0.2

Changelog:
0.2:
Fixed major bug
Changed accept command to /tpy
Added deny command /tpn
Added configurable timeout, default 30 seconds.

And jojo, I see what you mean, will add a /tphere

PostPosted: Thu Jan 17, 2013 02:00
by jojoa1997
make tphere for everyone though

PostPosted: Thu Jan 17, 2013 13:09
by Traxie21
Thats what I meant. However, Its going to be a little tricky to teleport everyone to the admin, but I think I can manage.

This is my first mod after all.

PostPosted: Thu Jan 17, 2013 13:40
by Likwid H-Craft
Hey why not /goto since that a main teleport, code inport.

PostPosted: Thu Jan 17, 2013 23:47
by Traxie21
What? Could you explain that more clearly please?

PostPosted: Fri Jan 18, 2013 00:55
by jojoa1997
Likwid H-Craft wrote:Hey why not /goto since that a main teleport, code inport.

that is what /tpr is teleport request

PostPosted: Tue Jan 22, 2013 17:21
by Traxie21
New release: 1.0 (hopefully final)

Changelog:
1.0:
Pretty sure this is bug free.
Added /tphr (only visible difference)
Cleaned up code again, variables are still confusing, but it works fine.
Last release unless bugs are found, or good suggestions are added.

Re: [Mod] Teleport Request [git rolling release][tpr]

PostPosted: Thu Jul 31, 2014 04:49
by Zeno
Major rewrite (see original post for new download links)

Potential issues: This version requires no special privs apart from interact. The new priv "tpr_admin" is now only registered if regnewpriv is set to true. Currently the new privilege does nothing and may be deprecated unless somebody would like the feature.

Re:

PostPosted: Fri May 13, 2016 13:13
by JoshMars
Traxie21 wrote:Pretty sure this is bug free.


Famous last words...