BeBot - An Anarchy Online and Age Of Conan chat automaton

Archive => Anarchy Online Archive => 0.2.x Custom/Unofficial Modules => Topic started by: Wanuarmi on December 15, 2005, 08:59:34 pm

Title: Last Seen
Post by: Wanuarmi on December 15, 2005, 08:59:34 pm
Here is my attempt at the !seen command... It only works on bots with less than 1k members, so I couldnt test it, but it should work...

!seen <player>


updated: made a temp fix so the bot will only save dates 10 minutes after reboot, to fix the initial "buddy logged off" spam

updated again: now the bot will only save the "last seen" date if it sees the player logging on and off, so it doesnt save the wrong dates if the ao chat server resets

updated: forgot to add "$commands["buddy"][] = &$lastSeen;"

updated: changed date() to gmdate()
Title: Re: Last Seen
Post by: Handor on December 22, 2005, 06:47:26 am
Parse error: parse error in C:\bebot\modules\LastSeen.PHP


I'm getting this error. I dont see anything 'obviously wrong' on line 58.  Just my observation.  =/  Probly a silly mistake on my end but I'm curious.

Thank You,
Handor

P.S.  I copy pasted the text into a empty text file, then saved.
Title: Re: Last Seen
Post by: Wanuarmi on December 22, 2005, 09:46:34 am
there was an error, forgot a ")", fixed
Title: Re: Last Seen
Post by: Akarah on December 22, 2005, 12:02:19 pm
oh thank you thank you!

i'm going to expand this a tiny bit for my own use, but this gives me something to work with thank you sooo much :)
Title: Re: Last Seen
Post by: Handor on December 25, 2005, 11:03:22 am
now i'm getting on line 58  =P  Merry xmas everyone!
Title: Re: Last Seen
Post by: craized on December 26, 2005, 11:37:38 pm
I suggest using (.+) instead of (.*) in your regex so it requires they input a user. Otherwise, the bot won't be able to pull a date if someone just does !seen
Title: Re: Last Seen
Post by: Wanuarmi on December 28, 2005, 02:58:27 am
I suggest using (.+) instead of (.*) in your regex so it requires they input a user. Otherwise, the bot won't be able to pull a date if someone just does !seen

updated
Title: Re: Last Seen
Post by: Xenixa on December 29, 2005, 04:13:16 pm
Call to Undefined function error found in the above code.
This:
Code: [Select]
$time_ago = format_seconds($seconds);
Should be:
Code: [Select]
$time_ago = $this -> format_seconds($seconds);
Title: Re: Last Seen
Post by: Wanuarmi on December 29, 2005, 04:46:18 pm
updated
Title: Re: Last Seen
Post by: Glarawyn on January 01, 2006, 10:48:03 pm
Parse error: parse error, unexpected ';' in /srv/AO-Bots/stringtheory/BeBot_v0.2.2/modules/LastSeen.php on line 89
Title: Re: Last Seen
Post by: Wanuarmi on January 02, 2006, 01:59:08 am
updated
Title: Re: Last Seen
Post by: Wanuarmi on January 24, 2006, 11:50:29 pm
updated, changed date() to gmdate()

let me know if you find bugs
Title: Re: Last Seen
Post by: Akarah on January 25, 2006, 02:13:54 pm
[Synergy Factor] Sfbot: Gefjun was last seen 12:00:00 am 1/1/70 GMT (13173 days and 08:12:26 ago).
Title: Re: Last Seen
Post by: Akarah on January 30, 2006, 11:10:13 am
all my dates are being entered as 0 -- haven't had time to dig into why, but thought i'd bump this just in case anyone else had any ideas.
Title: Re: Last Seen
Post by: Wanuarmi on January 30, 2006, 11:56:27 am
found the bug, updated

was using the query result as $result[1] instead $result[0][1]
Title: Re: Last Seen
Post by: Akarah on January 31, 2006, 06:39:51 pm
thanks so much - my officers love you (so they can weed out unplayed applicants now :D )

SimplePortal 2.3.7 © 2008-2025, SimplePortal