| View previous topic :: View next topic |
| Author |
Message |
fredvil Voice
Joined: 01 Dec 2005 Posts: 21
|
Posted: Wed Aug 23, 2006 9:02 am Post subject: last talk / last line |
|
|
just asking, is there a tcl script that records the date/time of last talk or last line on the channel before user leave. and when someone use:
!lastline nick or
!lasttalk nick
the bot will repond with the time nick last talked on the channel.
semilar with the seen script but reporting the last talked time.
thanks |
|
| Back to top |
|
 |
demond Revered One

Joined: 12 Jun 2004 Posts: 3073 Location: San Francisco, CA
|
Posted: Wed Aug 23, 2006 10:48 pm Post subject: |
|
|
| Code: |
bind pubm - * foo
bind pub - !last bar
proc foo {n args} {set ::last($n) [unixtime]}
proc bar {n u h c t} {catch {puthelp "privmsg $c :[ctime $::last($t)]"}}
|
_________________ connection, sharing, dcc problems? click <here>
before asking for scripting help, read <this>
use [code] tag when posting logs, code |
|
| Back to top |
|
 |
fredvil Voice
Joined: 01 Dec 2005 Posts: 21
|
Posted: Thu Aug 24, 2006 6:40 am Post subject: |
|
|
thanks a lot demond... that's exactly what im looking for...
<fredvil> !last hannah23
<botnick> Thu Aug 24 18:27:25 2006
demond one thing if it's ok... how can i put a little comment on the reply.. something like this:
<fredvil> !last hannah23
<botnick> hannah23 last talk - Thu Aug 24 18:27:25 2006
your help is very much appreciated... thanks again.. God bless!
fredvil |
|
| Back to top |
|
 |
r0t3n Owner
Joined: 31 May 2005 Posts: 507 Location: UK
|
Posted: Thu Aug 24, 2006 8:25 am Post subject: |
|
|
change
| Code: | | proc bar {n u h c t} {catch {puthelp "privmsg $c :[ctime $::last($t)]"}} |
to
| Code: | | proc bar {n u h c t} {catch {puthelp "privmsg $c :$t last talk - [ctime $::last($t)]"}} |
_________________ r0t3n @ #r0t3n @ Quakenet |
|
| Back to top |
|
 |
fredvil Voice
Joined: 01 Dec 2005 Posts: 21
|
Posted: Fri Aug 25, 2006 3:53 am Post subject: |
|
|
got it! thank you very much...
regards! |
|
| Back to top |
|
 |
|