mIRC Home    About    Download    Register    News    Help

Print Thread
Topic identifier #89443 07/07/04 11:49 AM
Joined: Sep 2003
Posts: 584
B
bunar Offline OP
Fjord artisan
OP Offline
Fjord artisan
B
Joined: Sep 2003
Posts: 584
is there in mirc 6.03+ a way to make topic identifier for this:

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


?

Re: Topic identifier #89444 07/07/04 11:57 AM
Joined: Dec 2002
Posts: 788
C
Coolkill Offline
Hoopy frood
Offline
Hoopy frood
C
Joined: Dec 2002
Posts: 788
$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.

Re: Topic identifier #89445 07/07/04 12:05 PM
Joined: Sep 2003
Posts: 584
B
bunar Offline OP
Fjord artisan
OP Offline
Fjord artisan
B
Joined: Sep 2003
Posts: 584
wow, that was fast shocked


thanx !

Re: Topic identifier #89446 07/07/04 12:18 PM
Joined: Dec 2002
Posts: 788
C
Coolkill Offline
Hoopy frood
Offline
Hoopy frood
C
Joined: Dec 2002
Posts: 788
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.

Re: Topic identifier #89447 07/07/04 12:55 PM
Joined: Sep 2003
Posts: 584
B
bunar Offline OP
Fjord artisan
OP Offline
Fjord artisan
B
Joined: Sep 2003
Posts: 584
heh, yeah i kno..



tnx again !