mIRC Home    About    Download    Register    News    Help

Print Thread
Welcome Message #141281 08/02/06 02:28 AM
Joined: Feb 2006
Posts: 95
B
blk Offline OP
Babel fish
OP Offline
Babel fish
B
Joined: Feb 2006
Posts: 95
I was trying to make a welcome message script
and...
It didn't work..

Could anybody tell me what is wrong with this -

on *:JOIN:#:{ /msg $chan Welcome! - $nick - }


-blk-
Re: Welcome Message #141282 08/02/06 02:43 AM
Joined: Aug 2005
Posts: 525
S
schaefer31 Offline
Fjord artisan
Offline
Fjord artisan
S
Joined: Aug 2005
Posts: 525
The code looks fine. My guess is that you have another on join event somewhere in the same file that is causing this one to not work. Try moving it to a separate file by clicking File -> New, then paste it there and try again.

For future reference, you can only have one (of the same kind) of even per channel per file. Here's an example:

on *:TEXT:!hi:#MyChannel:{ msg $chan Hi $nick }

on *:TEXT:!hi:#MyChannel:{ msg $chan Hello there $nick }

Since both events are the same (text trigger '!hi' for #MyChannel), the second one is never going to work, unless you place it in a separate file. It hits the first one and stops.


Here's another example:

on *:TEXT:*:#MyChannel:{ msg $chan some text }

on *:TEXT:!hi:#MyChannel:{ msg $chan Hello there $nick }

This time, the events are a bit different but still the same channel and the first is a 'broader' event in that it triggers on any message. However the same thing will happen here. The first event will trigger, and the second one will not.

Re: Welcome Message #141283 08/02/06 02:46 AM
Joined: Feb 2006
Posts: 95
B
blk Offline OP
Babel fish
OP Offline
Babel fish
B
Joined: Feb 2006
Posts: 95
Oh, yes, thank you..
I have another on join query...


-blk-
Re: Welcome Message #141284 08/02/06 02:46 AM
Joined: Dec 2002
Posts: 1,245
M
MikeChat Offline
Hoopy frood
Offline
Hoopy frood
M
Joined: Dec 2002
Posts: 1,245
if it is written exactly as you show it here

on *:JOIN:#:{ /msg $chan Welcome! - $nick - }

look above it in that script, is there another "on join" script?
mIRC only looks til it sees a match

on *:JOIN:#channel1:{ }
is diferent than
on *:join:#mirc:{}

so you could have
on *:JOIN:#channel1:{ }
on *:join:#mirc:{}
on *:join:#:{}

BUT
on *:join:#:{}
on *:JOIN:#channel1:{ }
on *:join:#mirc:{}
then only the on *:join:#:{} would work, because it is non specific, mIRC sees the first matching parameter and stops looking.

Re: Welcome Message #141285 08/02/06 02:48 AM
Joined: Feb 2006
Posts: 95
B
blk Offline OP
Babel fish
OP Offline
Babel fish
B
Joined: Feb 2006
Posts: 95
I just didn't want to specify the chan

Last edited by blk; 08/02/06 02:48 AM.

-blk-
Re: Welcome Message #141286 08/02/06 02:54 AM
Joined: Feb 2006
Posts: 95
B
blk Offline OP
Babel fish
OP Offline
Babel fish
B
Joined: Feb 2006
Posts: 95
on *:JOIN:#<chan>:{ /msg $chan Welcome! - $nick - }

works perfectly, just needed to make new file..

-THANKS-

Last edited by blk; 08/02/06 02:54 AM.

-blk-