mIRC Homepage
Posted By: slowpace show topic - 10/08/13 11:50 AM
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
Posted By: sparta Re: show topic - 10/08/13 01:46 PM
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)
Posted By: Deega Re: show topic - 14/08/13 01:53 AM
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]
}

Posted By: slowpace Re: show topic - 28/08/13 08:56 AM
Hmmm thanks but how would look all in 1 file ?
© mIRC Discussion Forums