mIRC Home    About    Download    Register    News    Help

Print Thread
Joined: Nov 2006
Posts: 5
C
Nutrimatic drinks dispenser
OP Offline
Nutrimatic drinks dispenser
C
Joined: Nov 2006
Posts: 5
Anyone know the command to show the topic for whatever active channel window I'm in? I thought it was something along the lines of "/topic $chan" but that doesn't work. And someone told me just "/topic" should work but that doesn't either. Any help would be appreciated.

Joined: Nov 2009
Posts: 117
Vogon poet
Offline
Vogon poet
Joined: Nov 2009
Posts: 117
Code:
//echo $chan(#).topic

Joined: Dec 2008
Posts: 95
A
Babel fish
Offline
Babel fish
A
Joined: Dec 2008
Posts: 95
In a script you would use $chan() and its 'topic' property,
but if you just want to view the topic of a channel then '/topic #channelname' or '//topic $chan' or '//topic #' will do exactly that.

Mind the double slash when using $chan or # (same thing), though, to make mIRC evaluate $chan/# to the actual channel name.

Joined: Nov 2009
Posts: 117
Vogon poet
Offline
Vogon poet
Joined: Nov 2009
Posts: 117

/help /topic

/TOPIC #channel newtopic
Changes the topic for a channel that you are on.

Joined: Dec 2008
Posts: 95
A
Babel fish
Offline
Babel fish
A
Joined: Dec 2008
Posts: 95
Right, if a new topic is given, else display the topic.

http://www.faqs.org/rfcs/rfc1459.html
Quote:
4.2.4 Topic message

Command: TOPIC
Parameters: <channel> [<topic>]

The TOPIC message is used to change or view the topic of a channel.
The topic for channel <channel> is returned if there is no <topic>
given. If the <topic> parameter is present, the topic for that
channel will be changed, if the channel modes permit this action.

Joined: Nov 2009
Posts: 117
Vogon poet
Offline
Vogon poet
Joined: Nov 2009
Posts: 117

asdfasdf
That document is May 1993
You may be confusing server commands with client commands.
At any rate it does not work on unreald or another daemon I tried it on.
No matter what you shouldn't have to ask the server what the topic is since mIRC will know it already.

Joined: Dec 2008
Posts: 95
A
Babel fish
Offline
Babel fish
A
Joined: Dec 2008
Posts: 95
The RFC1459 is from May 1993 and the RFC2812 is from April 2000, indeed, but that doesn't make them any less relevant today.
'/topic #channel', as defined in the RFCs, returns the topic on any IRCd that remotely conforms to the RFCs including UnrealIRCd, to name the one you had mentioned.
And mIRC doesn't do anything special with the /topic command clientsidedly, it just rawly sends whatever you enter to the server.

Now, it's true that mIRC knows the topic already and that there is no actual need to ask the server for it,
but considering that mIRC outputs the topic (as well as the additional information on who set it and when) properly that way,
and that codeseven had specifically mentioned the universal and easy-to-remember /topic command, he should be told how to use that correctly one instead.

Joined: Nov 2009
Posts: 117
Vogon poet
Offline
Vogon poet
Joined: Nov 2009
Posts: 117
So your advice to him is that /topic did not work for him then he should use /topic since something you read said it should work. Btw, /topic does NOT work for me on two different servers including unreald. Also not working /topic #channelname /raw /topic #channelname /raw topic #channelname And btw, let's not forget the original post complained that it did not work. At what point do you get the message it does not work and test it yourself?

Joined: Jan 2003
Posts: 1,063
D
Hoopy frood
Offline
Hoopy frood
D
Joined: Jan 2003
Posts: 1,063
he is making a valid point: the RFC states the command is "/topic <channelname> [topic]"

some clients have a /topic alias which will automatically do '/topic #current_active_channelname'. mIRC by default has this alias aswell (see script editor > aliasses).

if this does not work for you, than there could be several causes:
* the IRCd does not support the command, and isn't RFC compliant (which is a bad thing)
* you have a script which causes you to not see the server reply
* you have a script, overriding the /topic command with something else, causing it to never be (correctly) sent to the server

I think one of the 3 above options will be the case, and I actually put my money with the 2nd or 3rd option since I'm pretty sure for instance unrealIRDd does support this, as do most IRCd's I've ever worked with.

reason why the //echo version wouldn't work is if the topic starts with a number. use //echo -a instead.


If it ain't broken, don't fix it!
Joined: Dec 2008
Posts: 95
A
Babel fish
Offline
Babel fish
A
Joined: Dec 2008
Posts: 95
What he (Doqnach) said.

Also...

Originally Posted By: gooshie
And btw, let's not forget the original post complained that it did not work.

Of course "/topic $chan" does not work, unless // instead of / is used to make mIRC evaluate $chan to the name of the current channel.
Of course "/topic" does not work either, unless you have a special /topic alias.



Originally Posted By: gooshie
Btw, /topic does NOT work for me on two different servers including unreald.

Originally Posted By: gooshie
At what point do you get the message it does not work and test it yourself?

"/topic #channel" or "/raw topic #channel" (and I hope you didn't seriously try "/raw /topic #channelname") do work well,
you have to show me one excact IRCd that doesn't reply as defined in the RFCs.
If "/topic #channel" fails for you then it might be some screwed up /topic alias of yours,
if "/raw topic #channel" topic fails for you then it's how you handle the server's reply.

Joined: May 2010
Posts: 1
C
Mostly harmless
Offline
Mostly harmless
C
Joined: May 2010
Posts: 1
You may use
//echo -a $chan($active).topic
for reading topic of the current channel

I also recommend adding an alias for this command such as
/mytopic //echo -a $chan($active).topic


Link Copied to Clipboard