mIRC Home    About    Download    Register    News    Help

Print Thread
Joined: Jan 2003
Posts: 8
S
Nutrimatic drinks dispenser
OP Offline
Nutrimatic drinks dispenser
S
Joined: Jan 2003
Posts: 8
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)


Joined: Jun 2003
Posts: 68
D
Babel fish
Offline
Babel fish
D
Joined: Jun 2003
Posts: 68
on *:Join:#yourchan:{ topic $chan welcome $nick }

Joined: Dec 2002
Posts: 2,809
C
Hoopy frood
Offline
Hoopy frood
C
Joined: Dec 2002
Posts: 2,809
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.

Joined: Jan 2003
Posts: 8
S
Nutrimatic drinks dispenser
OP Offline
Nutrimatic drinks dispenser
S
Joined: Jan 2003
Posts: 8
Is it possible to make a timer in there?
Like only change the topic after 5 seconds after last topicchange?

Last edited by SirPeter; 16/07/03 05:13 PM.
Joined: Jun 2003
Posts: 68
D
Babel fish
Offline
Babel fish
D
Joined: Jun 2003
Posts: 68
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
}

Joined: Mar 2003
Posts: 1,271
L
Hoopy frood
Offline
Hoopy frood
L
Joined: Mar 2003
Posts: 1,271
on @*:JOIN:#channelname: {
if (!%topic) { /topic # NEW_TOPIC_HERE | set -u5 %topic yes }
}


DALnet #Helpdesk
I hear and I forget. I see and I remember. I do and I understand. -Confucius
Joined: Jan 2003
Posts: 8
S
Nutrimatic drinks dispenser
OP Offline
Nutrimatic drinks dispenser
S
Joined: Jan 2003
Posts: 8
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

Joined: Jun 2003
Posts: 68
D
Babel fish
Offline
Babel fish
D
Joined: Jun 2003
Posts: 68
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

Joined: Jan 2003
Posts: 8
S
Nutrimatic drinks dispenser
OP Offline
Nutrimatic drinks dispenser
S
Joined: Jan 2003
Posts: 8
Jep now it works

smile

Joined: Mar 2003
Posts: 1,271
L
Hoopy frood
Offline
Hoopy frood
L
Joined: Mar 2003
Posts: 1,271
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...


DALnet #Helpdesk
I hear and I forget. I see and I remember. I do and I understand. -Confucius
Joined: Jun 2003
Posts: 68
D
Babel fish
Offline
Babel fish
D
Joined: Jun 2003
Posts: 68
if (!%topic) doe mean?¿
if (%topic != $null) { ?????

Joined: Mar 2003
Posts: 437
M
Fjord artisan
Offline
Fjord artisan
M
Joined: Mar 2003
Posts: 437
more or less

if (!%topic)
means
if (%topic == $null)

Joined: Mar 2003
Posts: 1,271
L
Hoopy frood
Offline
Hoopy frood
L
Joined: Mar 2003
Posts: 1,271
Or , in english, if %topic has no value. Be careful tho, because the value 0 is considered to not be a value.


DALnet #Helpdesk
I hear and I forget. I see and I remember. I do and I understand. -Confucius
Joined: Dec 2002
Posts: 2,809
C
Hoopy frood
Offline
Hoopy frood
C
Joined: Dec 2002
Posts: 2,809
$false is also treated that way as well.


Link Copied to Clipboard