L* R*
HOME FORUM DOWNLOADS
Content
  Links
     Browse SVN
     SVN Commit log
     Documentation (Wiki)
  Developers
     Taskmanager
User
Welcome, Guest. Please login or register.
Did you miss your activation email?
December 02, 2008, 10:04:04 AM

Login with username, password and session length
Search



Advanced search
Support GoPHP5.org
BeBot - An Anarchy Online/Age Of Conan chat automaton > Forum > Modules > Official modules > Topic: AFK Module - Sets a user AFK
Pages: [1] 2   Go Down
« previous next »
Print
Author Topic: AFK Module - Sets a user AFK  (Read 2718 times)
0 Members and 1 Guest are viewing this topic.
craized
BeBot Contributor
Experienced
*******
Offline Offline

Gender: Male
Posts: 165



WWW
AFK Module - Sets a user AFK
« on: April 28, 2005, 01:57:34 AM »

AFK MODULE

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]
Logged

Trailin [213/14][ADVENTURER][RK2]
Bigburtha [216/17][NT][RK2][FROZEN]
Abeham [199/7][TRADER][RK2][FROZEN]

Achali
Freshman
*
Offline Offline

Posts: 5


AFK Module - Sets a user AFK
« Reply #1 on: September 12, 2005, 08:52:22 AM »

link broken
Logged
Derroylo
Rookie
**
Offline Offline

Posts: 43



AFK Module - Sets a user AFK
« Reply #2 on: September 12, 2005, 03:07:21 PM »

yeah the site is down for a while Sad

use this link
http://nne-clan.clanintern.de/bebot/Afk.phps
Logged

Derroylo 220/23 NT RK2
Xenixa
BeBot Contributor
Expert
*******
Offline Offline

Posts: 307



AFK Module - Sets a user AFK
« Reply #3 on: September 19, 2005, 02:20:48 AM »

Getting Connection Refused errors from http://nne-clan.clanintern.de
Logged

<<< Hack's in Zend Studio

All my Custom Bebot files may be Found Here <-clicky
Derroylo
Rookie
**
Offline Offline

Posts: 43



AFK Module - Sets a user AFK
« Reply #4 on: September 19, 2005, 01:11:17 PM »

send me a PM with your email adress and i will mail it Smiley
Logged

Derroylo 220/23 NT RK2
myste
Freshman
*
Offline Offline

Posts: 12


shallabais


Re: AFK Module - Sets a user AFK
« Reply #5 on: December 25, 2005, 05:45:16 AM »

I got some strange recursive behaviour in this module..

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

Code:
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)
Logged
Ainen
Rookie
**
Offline Offline

Posts: 22



Re: AFK Module - Sets a user AFK
« Reply #6 on: February 06, 2006, 05: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.
Logged

BeBot 0.3.4 svn 91 // PHP 4.3.9 // MySQL 4.1.12
Tsuyoi
Rookie
**
Offline Offline

Gender: Male
Posts: 30


BigT


WWW
Re: AFK Module - Sets a user AFK
« Reply #7 on: February 08, 2006, 12:38:19 AM »

The call for joining/leaving for GC or PG looks like:
Code:
<?php

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

So just do something like:
Code:
<?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
Logged
MatHack
Guest
Re: AFK Module - Sets a user AFK
« Reply #8 on: February 08, 2006, 05:13:43 AM »

Code:
if($msg == 1)
should be:
Code:
if($msg != 1)
Logged
Tsuyoi
Rookie
**
Offline Offline

Gender: Male
Posts: 30


BigT


WWW
Re: AFK Module - Sets a user AFK
« Reply #9 on: February 08, 2006, 12: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. Cheesy

- Tsuyoi
Logged
craized
BeBot Contributor
Experienced
*******
Offline Offline

Gender: Male
Posts: 165



WWW
Re: AFK Module - Sets a user AFK
« Reply #10 on: March 14, 2006, 02:37:15 PM »

Updated AFK module to unset afk when a user logs off. Sorry I took so long.
Logged

Trailin [213/14][ADVENTURER][RK2]
Bigburtha [216/17][NT][RK2][FROZEN]
Abeham [199/7][TRADER][RK2][FROZEN]

porter
Rookie
**
Offline Offline

Posts: 28


Re: AFK Module - Sets a user AFK
« Reply #11 on: September 09, 2006, 08:14:16 AM »

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:
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 Smiley
Logged
nebhyper
Rookie
**
Offline Offline

Gender: Male
Posts: 62


Re: AFK Module - Sets a user AFK
« Reply #12 on: December 03, 2006, 12:26:22 AM »

Can anyone post this file with the fixes so !afk or afk works in guild chat?
Logged

Siocuffin (Squad Commander of United Notum Federation)
alts: Nebhyper, Nebalmighty.
Dracutza
Apprentice
***
Offline Offline

Posts: 126


Re: AFK Module - Sets a user AFK
« Reply #13 on: December 04, 2006, 12:31:49 PM »

zip contains both the afk, and a custom brb mod.  Both work the same, with ! and without !.
Logged
nebhyper
Rookie
**
Offline Offline

Gender: Male
Posts: 62


Re: AFK Module - Sets a user AFK
« Reply #14 on: December 04, 2006, 02:06:51 PM »

Thank you!
Logged

Siocuffin (Squad Commander of United Notum Federation)
alts: Nebhyper, Nebalmighty.
Pages: [1] 2   Go Up
Print
BeBot - An Anarchy Online/Age Of Conan chat automaton > Forum > Modules > Official modules > Topic: AFK Module - Sets a user AFK
« previous next »
 
Jump to:  

Recent
Log playtime from buddys ...
by IKShadow
[Today at 06:48:12 AM]

[request] Raid timers
by Elesar1
[December 01, 2008, 04:41:09 PM]

Shared DB online list
by Temar
[December 01, 2008, 01:55:47 AM]

relay colors
by Temar
[December 01, 2008, 01:54:56 AM]

BeBot v0.6.0 released
by Alreadythere
[November 30, 2008, 05:32:00 PM]

Change to Bid.php
by Temar
[November 30, 2008, 11:41:44 AM]

OnlineOrg
by Jiheld
[November 29, 2008, 12:44:27 PM]

Silly Newbie Question.
by Temar
[November 29, 2008, 12:00:02 PM]

massive_pvp_time_table 1
by gerborg
[November 29, 2008, 06:55:35 AM]

Bot not see Guild Chat
by Delvar
[November 28, 2008, 08:30:34 AM]
Stats
Members
Total Members: 1243
Latest: Whackoeng
Stats
Total Posts: 11145
Total Topics: 1505
Online Today: 15
Online Ever: 168
(July 01, 2007, 09:30:02 PM)
Users Online
Users: 3
Guests: 11
Total: 14
Jiheld
xlDanek

Powered by SMF 1.1.7 | SMF © 2006-2008, Simple Machines LLC
TinyPortal v0.9.8 © Bloc | NewDef design by Bloc
Page created in 1.219 seconds with 29 queries. (Pretty URLs adds 0.04s, 4q)
Loading...