mIRC Home    About    Download    Register    News    Help

Print Thread
Joined: Nov 2004
Posts: 14
R
replay Offline OP
Pikka bird
OP Offline
Pikka bird
R
Joined: Nov 2004
Posts: 14
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
Fjord artisan
Offline
Fjord artisan
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,327
T
Hoopy frood
Offline
Hoopy frood
T
Joined: Nov 2003
Posts: 2,327
Code:
on *:text:!saytopic:#:{ msg $chan $chan($chan).topic }


New username: hixxy
Joined: Nov 2004
Posts: 14
R
replay Offline OP
Pikka bird
OP Offline
Pikka bird
R
Joined: Nov 2004
Posts: 14
It didn't worked frown

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


New username: hixxy
Joined: Nov 2004
Posts: 14
R
replay Offline OP
Pikka bird
OP Offline
Pikka bird
R
Joined: Nov 2004
Posts: 14
i know, i didn't do that

Joined: Sep 2003
Posts: 4,230
D
Hoopy frood
Offline
Hoopy frood
D
Joined: Sep 2003
Posts: 4,230
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?


if ($me != geek) { $life is $false }
else { $life is $true }
NoPleX
Joined: Sep 2003
Posts: 4,230
D
Hoopy frood
Offline
Hoopy frood
D
Joined: Sep 2003
Posts: 4,230
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


if ($me != geek) { $life is $false }
else { $life is $true }
NoPleX

Link Copied to Clipboard