mIRC Home    About    Download    Register    News    Help

Print Thread
R
replay
replay
R
How to message the topic of a channel?

if you type !saytopic that the bot says the topic of the channel?

Joined: Sep 2004
Posts: 237
J
Fjord artisan
Offline
Fjord artisan
J
Joined: Sep 2004
Posts: 237
this command tells you the current topic in the channel /topic #ChannelName .... are you wanting this to be messaged to the channel? Because the /topic command just tells you the current topic.

Joined: Nov 2003
Posts: 2,321
T
Hoopy frood
Offline
Hoopy frood
T
Joined: Nov 2003
Posts: 2,321
Code:
on *:text:!saytopic:#:{ msg $chan $chan($chan).topic }

R
replay
replay
R
It didn't worked frown

Joined: Nov 2003
Posts: 2,321
T
Hoopy frood
Offline
Hoopy frood
T
Joined: Nov 2003
Posts: 2,321
You can't type !saytopic using the same nickname that the script's in.

R
replay
replay
R
i know, i didn't do that

D
DaveC
DaveC
D
are your remotes on, becuase that worked fine for me.

Joined: May 2004
Posts: 132
N
Vogon poet
Offline
Vogon poet
N
Joined: May 2004
Posts: 132
Can you explain to me why it's $chan($chan).topic ? msg $chan tells the "bot" to msg the channel. And $chan($chan).topic tells what? My best shoot would me that($chan).topic is the topic of the channel and i don't know whant the $chan before that should do. Can you tell me?

D
DaveC
DaveC
D
It is two seperate $chan meanings, the $chan on its own is a remote (event) identifier, and is the channel the event occured in.
The $chan(channel name here).prop is a Widnow identifier and gives info about a channel, so

$chan( $chan ).topic, can only be isssued from inside an event or an alias called from an event, sicne it relys on the $chan remote identifier to tell it what channel to look up in the window identifier $chan()

try typing this on the mirc line

//echo -a $chan(insert a channel name here your on).topic


also see

/help $chan

both topics

Joined: May 2004
Posts: 132
N
Vogon poet
Offline
Vogon poet
N
Joined: May 2004
Posts: 132
AAaaah... Then I understand smile It just looked wierd with 3 $chan i a rough wink


Link Copied to Clipboard