mIRC Home    About    Download    Register    News    Help

Print Thread
#242611 10/08/13 11:50 AM
Joined: Dec 2012
Posts: 6
S
Nutrimatic drinks dispenser
OP Offline
Nutrimatic drinks dispenser
S
Joined: Dec 2012
Posts: 6
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

slowpace #242612 10/08/13 01:46 PM
Joined: Feb 2003
Posts: 3,432
S
Hoopy frood
Offline
Hoopy frood
S
Joined: Feb 2003
Posts: 3,432
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)


if ($me != tired) { return } | else { echo -a Get a pot of coffee now $+($me,.) }
slowpace #242655 14/08/13 01:53 AM
Joined: Oct 2012
Posts: 164
D
Vogon poet
Offline
Vogon poet
D
Joined: Oct 2012
Posts: 164
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]
}


Deega #242758 28/08/13 08:56 AM
Joined: Dec 2012
Posts: 6
S
Nutrimatic drinks dispenser
OP Offline
Nutrimatic drinks dispenser
S
Joined: Dec 2012
Posts: 6
Hmmm thanks but how would look all in 1 file ?


Link Copied to Clipboard