mIRC Homepage
Posted By: SirPeter Autochanging the Topic if someone enters - 16/07/03 05:03 PM
Are there ways to autochang the Topicname if someone enters a chan?

e.g. " a visitor -=Welkom=- (>^^)> Visitors_name <(^^<)

So what i would like to do is replace "Visitors_name" by the name of the person that enters the channel.


(ps im a noob here, so please make it simple for me to understand smile)

Posted By: Dr4g0n Re: Autochanging the Topic if someone enters - 16/07/03 05:07 PM
on *:Join:#yourchan:{ topic $chan welcome $nick }
Note that that probably isn't a very good idea, if someone happens to load a bunch of clones into your channel, you will likely be killed for flooding.
Is it possible to make a timer in there?
Like only change the topic after 5 seconds after last topicchange?
Posted By: Dr4g0n Re: Autochanging the Topic if someone enters - 16/07/03 05:15 PM
do this:
/set %topicprot off

on *:Join:#:{
if (%topicprot == on) { goto end }
else { goto :start }
:start
topic $chan welcome $nick
set %topicprot on
.timerprot 1 5 set %topicprot off
:end
}
on @*:JOIN:#channelname: {
if (!%topic) { /topic # NEW_TOPIC_HERE | set -u5 %topic yes }
}
Ok this is what ive done so far, with help of Borg and dragon:

In variabels:
%topicprot on

In Remote:
on @*:JOIN:#kotrn: {
if (%topicprot == off) { goto end }
else { goto :start }
:start
/timerprot 1 5 set %topicprot on
if (!%topic) { /topic # OMG!!! a visitor 10-=Welkom=- 4(>^^)> $nick <(^^<)  | set -u5 %topic yes }
:end
}


Not working thou
Posted By: Dr4g0n Re: Autochanging the Topic if someone enters - 16/07/03 06:31 PM
do this:
/set %topicprot off

on *:Join:#yourchan:{
if (%topicprot == on) { goto end }
else { goto start }
:start
topic $chan welcome $nick
set %topicprot on
.timerprot 1 5 set %topicprot off
:end
}

This is the good one
Jep now it works

smile
Actually the code I pasted, was all you need to change the topic whenever someone joins, but no more than once every 5 seconds.... Don't need any goto stuff and timers...
Posted By: Dr4g0n Re: Autochanging the Topic if someone enters - 16/07/03 07:48 PM
if (!%topic) doe mean?¿
if (%topic != $null) { ?????
Posted By: MTech Re: Autochanging the Topic if someone enters - 16/07/03 08:03 PM
more or less

if (!%topic)
means
if (%topic == $null)
Or , in english, if %topic has no value. Be careful tho, because the value 0 is considered to not be a value.
$false is also treated that way as well.
© mIRC Discussion Forums