This is the new home of the egghelp.org community forum.
All data has been migrated (including user logins/passwords) to a new phpBB version.


For more information, see this announcement post. Click the X in the top right-corner of this box to dismiss this message.

last talk / last line

Requests for complete scripts or modifications/fixes for scripts you didn't write. Response not guaranteed, and no thread bumping!
Post Reply
f
fredvil
Voice
Posts: 21
Joined: Thu Dec 01, 2005 9:16 pm

last talk / last line

Post by fredvil »

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
User avatar
demond
Revered One
Posts: 3073
Joined: Sat Jun 12, 2004 9:58 am
Location: San Francisco, CA
Contact:

Post by demond »

Code: Select all

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: Select all

 tag when posting logs, code
f
fredvil
Voice
Posts: 21
Joined: Thu Dec 01, 2005 9:16 pm

Post by fredvil »

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
r
r0t3n
Owner
Posts: 507
Joined: Tue May 31, 2005 6:56 pm
Location: UK

Post by r0t3n »

change

Code: Select all

proc bar {n u h c t} {catch {puthelp "privmsg $c :[ctime $::last($t)]"}}
to

Code: Select all

proc bar {n u h c t} {catch {puthelp "privmsg $c :$t last talk - [ctime $::last($t)]"}}
r0t3n @ #r0t3n @ Quakenet
f
fredvil
Voice
Posts: 21
Joined: Thu Dec 01, 2005 9:16 pm

Post by fredvil »

got it! thank you very much... :)

regards!
Post Reply