BeBot - An Anarchy Online and Age Of Conan chat automaton

Archive => AO 0.6.x Custom/Unofficial modules => Anarchy Online Archive => AO official modules => Topic started by: craized on April 28, 2005, 08:57:34 am

Title: AFK Module - Sets a user AFK
Post by: craized on April 28, 2005, 08:57:34 am
AFK MODULE (http://www.craized.net/junk/bebot/highlight.php?AFK)

Description:
Sets a user AFK an modifies the !online list to display who is afk.

Instructions:
Quote from: "Org/Tell:"
!afk [message]
Sets a user afk with optional [message]
Title: AFK Module - Sets a user AFK
Post by: Achali on September 12, 2005, 03:52:22 pm
link broken
Title: AFK Module - Sets a user AFK
Post by: Derroylo on September 12, 2005, 10:07:21 pm
yeah the site is down for a while :(

use this link
http://nne-clan.clanintern.de/bebot/Afk.phps
Title: AFK Module - Sets a user AFK
Post by: Xenixa on September 19, 2005, 09:20:48 am
Getting Connection Refused errors from http://nne-clan.clanintern.de
Title: AFK Module - Sets a user AFK
Post by: Derroylo on September 19, 2005, 08:11:17 pm
send me a PM with your email adress and i will mail it :)
Title: Re: AFK Module - Sets a user AFK
Post by: myste on December 25, 2005, 11:45:16 am
I got some strange recursive behaviour in this module..

Changed the lines comparing message name to botname like so.. :

Code: [Select]
function gmsg($name, $group, $msg) {
if(strtolower($name) != strtolower($this -> bot -> botname)) {

Any better way to do this perhaps?

(btw: im working with the SVN-trunk version)
Title: Re: AFK Module - Sets a user AFK
Post by: Ainen on February 06, 2006, 11:13:23 pm
Is there a way to make this module take a user off AFK when they log off? People are logging back on to find themselves still AFK, or, when someone logs off AFK, the bot responds to their name in chat with the 'afk' message.
Title: Re: AFK Module - Sets a user AFK
Post by: Tsuyoi on February 08, 2006, 06:38:19 am
The call for joining/leaving for GC or PG looks like:
Code: [Select]
<?php

$commands
["pgjoin"][] = &$afk
$commands["pgleave"][] = &$afk
$commands["buddy"][] = &$afk;

So just do something like:
Code: [Select]
<?php

function buddy($name$msg
{
  if(
$msg == 1)
    if(
$this -> afk[$name]) {
      unset(
$this -> afk[$name]);
    } 
  }
}

Or something to that effect, I'm getting ready to leave work, so I don't have time to show the module with that included.  I'll edit this when I get home.

- Tsuyoi
Title: Re: AFK Module - Sets a user AFK
Post by: MatHack on February 08, 2006, 11:13:43 am
Code: [Select]
if($msg == 1)should be:
Code: [Select]
if($msg != 1)
Title: Re: AFK Module - Sets a user AFK
Post by: Tsuyoi on February 08, 2006, 06:40:27 pm
Bah, sorry bout that.  Was a five second post right before I left work so I wasn't all there with teh excitement of going home. :D

- Tsuyoi
Title: Re: AFK Module - Sets a user AFK
Post by: craized on March 14, 2006, 08:37:15 pm
Updated AFK module to unset afk when a user logs off. Sorry I took so long.
Title: Re: AFK Module - Sets a user AFK
Post by: porter on September 09, 2006, 03:14:16 pm
Hm, maybe this module has been updated somewhere but just in case someone copies it to their 0.2.x as I did, a couple edits you might want to do:

In the function "tell" which is for handling an incoming tell from a user there are two "if" statements, latter one should be "elseif" otherwise if the user sends a "tell <bot> !afk show" that user is marked as afk with the message "show".

Matter of preference, but I also changed the "elseif" statement in function "gmsg" to:
Code: [Select]
elseif(preg_match('/^afk ?(.*)/i', $msg, $afkmsg) or (preg_match('/^'.$this -> bot -> commpre.'afk ?(.*)/i', $msg, $afkmsg
))) $c = $this -> gone($name, $afkmsg[1]);
That way people can do either afk or !afk (or whatever your command prefix is) in group chat and it marks them afk.

Forgive me if this is more thread necromancy & nitpicking than useful for the general public :)
Title: Re: AFK Module - Sets a user AFK
Post by: nebhyper on December 03, 2006, 06:26:22 am
Can anyone post this file with the fixes so !afk or afk works in guild chat?
Title: Re: AFK Module - Sets a user AFK
Post by: Dracutza on December 04, 2006, 06:31:49 pm
zip contains both the afk, and a custom brb mod.  Both work the same, with ! and without !.
Title: Re: AFK Module - Sets a user AFK
Post by: nebhyper on December 04, 2006, 08:06:51 pm
Thank you!
Title: Re: AFK Module - Sets a user AFK
Post by: Areteh on January 06, 2007, 12:53:45 pm
help files.  (yeah, I'm spamming them a bit, just figured since I'm writing them for my own bots, I may as well share.)
Title: Re: AFK Module - Sets a user AFK
Post by: craized on May 21, 2007, 07:15:56 am
Updated... no new changes, just changed to Dracutza's version... I'm willing to fix things in my modules, just PM me. Also if I updated it wrong let me know.
Title: Re: AFK Module - Sets a user AFK
Post by: Malosar on May 21, 2007, 02:28:41 pm
Abe??  :o
SimplePortal 2.3.7 © 2008-2024, SimplePortal