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
-
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:
!afk [message]
Sets a user afk with optional [message]
-
link broken
-
yeah the site is down for a while :(
use this link
http://nne-clan.clanintern.de/bebot/Afk.phps
-
Getting Connection Refused errors from http://nne-clan.clanintern.de
-
send me a PM with your email adress and i will mail it :)
-
I got some strange recursive behaviour in this module..
Changed the lines comparing message name to botname like so.. :
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)
-
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.
-
The call for joining/leaving for GC or PG looks like:
<?php
$commands["pgjoin"][] = &$afk;
$commands["pgleave"][] = &$afk;
$commands["buddy"][] = &$afk;
So just do something like:
<?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
-
if($msg == 1)
should be:
if($msg != 1)
-
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
-
Updated AFK module to unset afk when a user logs off. Sorry I took so long.
-
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:
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 :)
-
Can anyone post this file with the fixes so !afk or afk works in guild chat?
-
zip contains both the afk, and a custom brb mod. Both work the same, with ! and without !.
-
Thank you!
-
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.)
-
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.
-
Abe?? :o