[Mod] Away Mod [1.0] [away]

kahrl
Member
 
Posts: 236
Joined: Fri Sep 02, 2011 07:51

[Mod] Away Mod [1.0] [away]

by kahrl » Fri Mar 09, 2012 05:28

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: 1865
Joined: Tue Sep 27, 2011 18:44
GitHub: jordan4ibanez
IRC: jordan4ibanez
In-game: jordan4ibanez

by jordan4ibanez » Fri Mar 09, 2012 05:48

+1
If you can think it, you can make it.
 

User avatar
Jordach
Member
 
Posts: 4412
Joined: Mon Oct 03, 2011 17:58
GitHub: Jordach
IRC: Jordach
In-game: Jordach

by Jordach » Fri Mar 09, 2012 08:07

if anyone makes or runs a server should have this.

( ͡° ͜ʖ ͡°) ( ͡o ͜ʖ ͡o) [$ ( ͡° ͜ʖ ͡°) $] ( ͡$ ͜ʖ ͡$) ヽ༼ຈل͜ຈ༽ノ



My image and media server is back online and is functioning as normal.
 

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

by jordan4ibanez » Fri Mar 09, 2012 12:23

i see the "theres no register on disconnect" bug..why not have it so if a player reconnects it unmarks him as away
If you can think it, you can make it.
 

User avatar
sfan5
Member
 
Posts: 3636
Joined: Wed Aug 24, 2011 09:44
GitHub: sfan5
IRC: sfan5

by sfan5 » Fri Mar 09, 2012 13:23

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

by kahrl » Fri Mar 09, 2012 19:25

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?
 

User avatar
sfan5
Member
 
Posts: 3636
Joined: Wed Aug 24, 2011 09:44
GitHub: sfan5
IRC: sfan5

by sfan5 » Fri Mar 09, 2012 19:30

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: 24
Joined: Fri Jan 06, 2017 00:38
In-game: mr_dean

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

by mr_dean » Tue Mar 07, 2017 19:10

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
Member
 
Posts: 2141
Joined: Thu Oct 18, 2012 05:00
GitHub: kaeza
IRC: kaeza diemartin blaaaaargh
In-game: kaeza

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

by kaeza » Tue Mar 07, 2017 21:32

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 | BTC: 1DFZAa5VtNG7Levux4oP6BuUzr1e83pJK2
 


Return to Mod Releases

Who is online

Users browsing this forum: No registered users and 17 guests

cron