[Mod] Away Mod [1.0] [away]

Post Reply
kahrl
Member
Posts: 236
Joined: Fri Sep 02, 2011 07:51
Location: Rös̓̇chenhof

[Mod] Away Mod [1.0] [away]

by kahrl » Post

This is a simple mod that adds an /away command. It's inspired by jordan4ibanez's extra commands mod, but works slightly differently than its /afk command.

Download
1.0: tar.gz zip
Git: github

License: WTFPL

Basic usage

/away <reason> marks you as being away. The reason is optional. When you're back, simply type /away again. Writing a chat message (except commands) clears your away status too. You can check your away status with the command /away?, and that of other people with /away? <name>.

Other players don't immediately see when you set yourself as away, unless they constantly watch you with /away? yourname. However, when somebody mentions your name in chat, they receive an away notice. If that happens, they're also notified as soon as you come back. The intent of this delayed notice system is to reduce away message spam.

Notes
  • No dependencies. Should be compatible with almost all other mods, if an incompatibility is found I'll list it here.
  • If the name of an away player is mentioned multiple times in succession, only one notice is printed per minute.
  • Players without the shout privilege can not set a reason in /away.
  • Away statuses are not persistent, as that would make no sense. They're cleared when the server quits or the player disconnects (but see "Bugs" below).
Command documentation
  • /away [reason]: If you are not marked as away or a reason parameter is given, marks you as away (or changes the away reason). If you are marked as away and no reason parameter is given, sets you as not away and possibly notifies other players (if they tried to talk to you while you were away).
  • /away? [name]: Checks the away status of the player with the specified name, or yourself if no name parameter is given. Possible statuses are: present, away (<reason>), disconnected.
Bugs
  • Moving around or interacting with things should probably reset the away status. Ideally this should be configurable.
  • Away statuses are not immediately reset when a player disconnects. If the player was marked away and reconnects within 1-2 minutes after disconnecting, he may still be marked away. (Problem: there's no register_on_disconnect callback.)
Last edited by kahrl on Sun May 05, 2013 05:36, edited 1 time in total.

User avatar
jordan4ibanez
Member
Posts: 1923
Joined: Tue Sep 27, 2011 18:44
GitHub: jordan4ibanez
IRC: jordan4ibanez
In-game: jordan4ibanez

by jordan4ibanez » Post

+1
hello, am program. do language in rust. make computer do. okay i go now.

Jordach
Member
Posts: 4534
Joined: Mon Oct 03, 2011 17:58
GitHub: Jordach
IRC: Jordach
In-game: Jordach
Location: Blender Scene

by Jordach » Post

if anyone makes or runs a server should have this.

User avatar
jordan4ibanez
Member
Posts: 1923
Joined: Tue Sep 27, 2011 18:44
GitHub: jordan4ibanez
IRC: jordan4ibanez
In-game: jordan4ibanez

by jordan4ibanez » Post

i see the "theres no register on disconnect" bug..why not have it so if a player reconnects it unmarks him as away
hello, am program. do language in rust. make computer do. okay i go now.

sfan5
Moderator
Posts: 4095
Joined: Wed Aug 24, 2011 09:44
GitHub: sfan5
IRC: sfan5
Location: Germany

by sfan5 » Post

Amazing Mod!
Mods: Mesecons | WorldEdit | Nuke & Minetest builds for Windows (32-bit & 64-bit)

kahrl
Member
Posts: 236
Joined: Fri Sep 02, 2011 07:51
Location: Rös̓̇chenhof

by kahrl » Post

jordan4ibanez wrote:i see the "theres no register on disconnect" bug..why not have it so if a player reconnects it unmarks him as away
Well... there's no "on connect" either. ;)
Or is there?

sfan5
Moderator
Posts: 4095
Joined: Wed Aug 24, 2011 09:44
GitHub: sfan5
IRC: sfan5
Location: Germany

by sfan5 » Post

kahrl wrote:
jordan4ibanez wrote:i see the "theres no register on disconnect" bug..why not have it so if a player reconnects it unmarks him as away
Well... there's no "on connect" either. ;)
Or is there?
There is no "minetest.register_on_connect"... ...sadly
Mods: Mesecons | WorldEdit | Nuke & Minetest builds for Windows (32-bit & 64-bit)

mr_dean
Member
Posts: 30
Joined: Fri Jan 06, 2017 00:38
In-game: mr_dean
Location: Modding...

Re: [Mod] Away Mod [1.0] [away]

by mr_dean » Post

Is this still even an active mod? and, if so, will it still work with the current version of Minetest?
I know you believe you understand what you think I said, but, I am not sure that what you heard is not what I meant. - Author Unknown

User avatar
kaeza
Moderator
Posts: 2162
Joined: Thu Oct 18, 2012 05:00
GitHub: kaeza
IRC: kaeza diemartin blaaaaargh
In-game: kaeza
Location: Montevideo, Uruguay
Contact:

Re: [Mod] Away Mod [1.0] [away]

by kaeza » Post

From a quick look at the sources it looks like it may still work, but do note that it's very outdated and doesn't use capabilities we take for granted now.

You may be better looking for alternatives (unless teh kahrl wants to update :) ). A quick Google search brought up this one.
Your signature is not the place for a blog post. Please keep it as concise as possible. Thank you!

Check out my stuff! | Donations greatly appreciated! PayPal

User avatar
Festus1965
Member
Posts: 4181
Joined: Sun Jan 03, 2016 11:58
GitHub: Festus1965
In-game: Festus1965 Thomas Thailand Explorer
Location: Thailand ChiangMai
Contact:

Re: [Mod] Away Mod [1.0] [away]

by Festus1965 » Post

an gamer mentioned using a afk mod a day ago,

and when I checked his mentioned version
https://github.com/KodaTheGuy/AFK : d3247db / Feb 2, 2021
I see only that instead I type afk, I have to type /afk, and instead of back I use /back so mod tell in chat what I could do myself, even if I do myself, I still can add some reason, like shower, dinner, whatever ...

missing the main helping part,
that the mod should listen to chat, and IF someone mention the name of an afk gamer,
THEN repeat a message that game is afk, as reminder, or maybe gamer new in and could not see the afk mesasage before


so this one the same:
https://github.com/Lymkwi/minetest-mod- ... k/init.lua : e72ce7f on Aug 15, 2014
this if a funny ... it does not help;


more interesting is:
viewtopic.php?f=9&t=25903
https://github.com/AspireMint/am_afk : 794d1b2 / on Jan 7, 2021
with this costume ... but that need that you are nearby, and can see, visit the other gamer easy, fast to mention


so this here of this Thread:
https://github.com/kahrl/minetest-mod-away : 4c1e5a9 / Mar 9, 2012
is most interesting, even old ... but I will give it a try
as we are spread over a huge area

the only other option might be a hud name extension, show my status afk ... but as I know now since 6 years how gamer look, and use faster chat ... kahrl version is most fix my needs.
Human has no future (climate change)
If urgend, you find me in Roblox (as CNXThomas)

Post Reply

Who is online

Users browsing this forum: No registered users and 40 guests