mIRC Home    About    Download    Register    News    Help

Print Thread
#242611 10/08/13 11:50 AM
S
slowpace
slowpace
S
I have a script in my bot were any 1 in a channel can typ the command !topic , the bot will then show them the topic,

what i need now is the code so it will also show who set it and what date/time .

heres what im use now

on $*:text:/^!topic$/iS:#: .msg # 7 $+ # Topic: $chan(#).topic

#242612 10/08/13 01:46 PM
Joined: Feb 2003
Posts: 3,412
S
Hoopy frood
Offline
Hoopy frood
S
Joined: Feb 2003
Posts: 3,412
I belive you need to use raw.

raw 333 will give you the information about who put topic and when. To trigger the raw /topic $chan

; what channel.
$chan($2).topic

; who put it there.
$3

; What date/time topic was set.
$asctime($4)

#242655 14/08/13 01:53 AM
D
Deega
Deega
D
What sparta said will only give the time & date according to your local timezone, others don't have the same times/dates as you.

You could set and msg it in GMT time if you wish.
Code:
on $*:text:/^!topic$/iS:#:.msg # 7 $+ # Topic: $chan(#).topic $($+(%,topic.,$cid,#),2)

And to set it
Code:
; Grab and store the data from raw 333 when you join the channel
raw 333:*:{
  set -e $+(%,topic.,$cid,$2) [Set by $3 : $gmt($4) GMT]
}
; (Re-)Set the variable when topic is changed
on *:TOPIC:#:{
  set -e $+(%,topic.,$cid,#) [Set by $nick : $gmt($ctime) GMT]
}


#242758 28/08/13 08:56 AM
S
slowpace
slowpace
S
Hmmm thanks but how would look all in 1 file ?


Link Copied to Clipboard