collapse collapse
* User Info
 
 
Welcome, Guest. Please login or register.
* Search

* Board Stats
  • stats Total Members: 989
  • stats Total Posts: 18366
  • stats Total Topics: 2501
  • stats Total Categories: 7
  • stats Total Boards: 35
  • stats Most Online: 1144

Author Topic: Last Seen  (Read 13600 times)

0 Members and 1 Guest are viewing this topic.

Offline Wanuarmi

  • Contributor
  • *******
  • Posts: 121
  • Karma: +0/-0
Last Seen
« 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()
« Last Edit: January 30, 2006, 11:55:48 am by Wanuarmi »

Offline Handor

  • BeBot Rookie
  • *
  • Posts: 10
  • Karma: +0/-0
Re: Last Seen
« Reply #1 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.

Offline Wanuarmi

  • Contributor
  • *******
  • Posts: 121
  • Karma: +0/-0
Re: Last Seen
« Reply #2 on: December 22, 2005, 09:46:34 am »
there was an error, forgot a ")", fixed

Offline Akarah

  • Contributor
  • *******
  • Posts: 72
  • Karma: +0/-0
    • http://synergyfactor.net/
Re: Last Seen
« Reply #3 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 :)

Offline Handor

  • BeBot Rookie
  • *
  • Posts: 10
  • Karma: +0/-0
Re: Last Seen
« Reply #4 on: December 25, 2005, 11:03:22 am »
now i'm getting on line 58  =P  Merry xmas everyone!

Offline craized

  • Contributor
  • *******
  • Posts: 165
  • Karma: +0/-0
    • http://www.craized.net
Re: Last Seen
« Reply #5 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
Trailin [213/14][ADVENTURER][RK2]
Bigburtha [216/17][NT][RK2][FROZEN]
Abeham [199/7][TRADER][RK2][FROZEN]


Offline Wanuarmi

  • Contributor
  • *******
  • Posts: 121
  • Karma: +0/-0
Re: Last Seen
« Reply #6 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

Offline Xenixa

  • Contributor
  • *******
  • Posts: 307
  • Karma: +0/-0
Re: Last Seen
« Reply #7 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);
<<< Hack's in Zend Studio

All my Custom Bebot files may be Found Here <-clicky

Offline Wanuarmi

  • Contributor
  • *******
  • Posts: 121
  • Karma: +0/-0
Re: Last Seen
« Reply #8 on: December 29, 2005, 04:46:18 pm »
updated

Offline Glarawyn

  • BeBot Hero
  • ******
  • Posts: 521
  • Karma: +0/-0
Re: Last Seen
« Reply #9 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

Offline Wanuarmi

  • Contributor
  • *******
  • Posts: 121
  • Karma: +0/-0
Re: Last Seen
« Reply #10 on: January 02, 2006, 01:59:08 am »
updated

Offline Wanuarmi

  • Contributor
  • *******
  • Posts: 121
  • Karma: +0/-0
Re: Last Seen
« Reply #11 on: January 24, 2006, 11:50:29 pm »
updated, changed date() to gmdate()

let me know if you find bugs

Offline Akarah

  • Contributor
  • *******
  • Posts: 72
  • Karma: +0/-0
    • http://synergyfactor.net/
Re: Last Seen
« Reply #12 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).

Offline Akarah

  • Contributor
  • *******
  • Posts: 72
  • Karma: +0/-0
    • http://synergyfactor.net/
Re: Last Seen
« Reply #13 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.

Offline Wanuarmi

  • Contributor
  • *******
  • Posts: 121
  • Karma: +0/-0
Re: Last Seen
« Reply #14 on: January 30, 2006, 11:56:27 am »
found the bug, updated

was using the query result as $result[1] instead $result[0][1]

 

* Recent Posts
Com bot module by bitnykk
[November 25, 2024, 05:36:11 pm ]


0.8.x updates for AO by bitnykk
[June 23, 2024, 03:19:47 pm ]


0.8.x updates for AoC by bitnykk
[June 23, 2024, 03:19:44 pm ]


[AoC] special char for items module by bitnykk
[February 09, 2024, 09:41:18 pm ]


BeBot still alive & kicking ! by bitnykk
[December 17, 2023, 12:58:44 am ]

* Who's Online
  • Dot Guests: 340
  • Dot Hidden: 0
  • Dot Users: 0

There aren't any users online.
* Forum Staff
bitnykk admin bitnykk
Administrator
Khalem admin Khalem
Administrator
WeZoN gmod WeZoN
Global Moderator
SimplePortal 2.3.7 © 2008-2024, SimplePortal