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.
Old posts that have not been replied to for several years.
Baidoc
Voice
Posts: 3 Joined: Sat Mar 06, 2004 7:45 pm
Location: Romania
Contact:
Post
by Baidoc » Wed Jul 06, 2005 10:36 am
Hi. I`m trying to make a TCL that gets this line:
* Set by X on Wed Jul 06 04:02:38 -> From the channel topic. For eg.
* Topic is 'Welcome'
* Set by X on Wed Jul 06 04:02:38
how can I get the last like? I have *no* idea
Thanks.
BaidocSan
demond
Revered One
Posts: 3073 Joined: Sat Jun 12, 2004 9:58 am
Location: San Francisco, CA
Contact:
Post
by demond » Wed Jul 06, 2005 11:52 am
Code: Select all
bind raw - 333 get_topic_ts
proc get_topic_ts {from keyword args} {
set args [split $args]
set chan [lindex $args 1]
set whom [lindex $args 2]
set timestamp [lindex $args 3]
puthelp "privmsg $chan :The topic was set by $whom on [ctime $timestamp]"
}
putserv "topic #channel"
Sir_Fz
Revered One
Posts: 3794 Joined: Sun Apr 27, 2003 3:10 pm
Location: Lebanon
Contact:
Post
by Sir_Fz » Wed Jul 06, 2005 1:08 pm
I was just wondering, isn't $args already a list? should it be split as well ?
demond
Revered One
Posts: 3073 Joined: Sat Jun 12, 2004 9:58 am
Location: San Francisco, CA
Contact:
Post
by demond » Wed Jul 06, 2005 1:20 pm
no, it's a string - the actual server reply, trimmed on the left to not include from/source and the numeric (it even retains the ':' separator as its first character)