mIRC Homepage
Posted By: bunar Topic identifier - 07/07/04 11:49 AM
is there in mirc 6.03+ a way to make topic identifier for this:

on join IF topic = "some crap"
change it....


?
Posted By: Coolkill Re: Topic identifier - 07/07/04 11:57 AM
$chan(#Channel).topic - will give you whats in the topic.

You would have to do something like this which would check if the topic is whatever text...

On me:*:Join:#Channel:{
var %topic = If this topic is this then...
if ($chan($chan).topic == %topic) { set %chgonop 1 }
else { unset %chgonop }
}

Then you would have to have something like this for when you are op'd to change the topic:

On *:op:#Channel:{
if (($opnick == $me) && (%chgonop == 1)) {
topic $chan Your new topic text
}

However, that may seem a little inefficent since you can just do it ON OP using the following:

On *:op:#Channel:{
var %topic = If this topic is this then...
if (($chan($chan).topic == %topic) && ($opnick == $me)) {
topic $chan Your new topic text
}
}

Eamonn.
Posted By: bunar Re: Topic identifier - 07/07/04 12:05 PM
wow, that was fast shocked


thanx !
Posted By: Coolkill Re: Topic identifier - 07/07/04 12:18 PM
smile

A better method, might have been:

TYPE:

/set %topic Your Text here

PLACE IN REMOTES:

On *:op:#Channel:{
if (($chan($chan).topic == %topic) && ($opnick == $me)) {
topic $chan Your NewText here
}
}

Allowing you to change the topic text without having to edit the code, by typing /set %topic text.

Also note that this may not work "as expected" on some networks, especially DALnet where topiclock maybe enabled.

Eamonn.
Posted By: bunar Re: Topic identifier - 07/07/04 12:55 PM
heh, yeah i kno..



tnx again !
© mIRC Discussion Forums