mIRC Home    About    Download    Register    News    Help

Print Thread
#187828 13/10/07 07:00 PM
A
asmodeo
asmodeo
A
Hi for all

CODE:
on 1!@:JOIN:#: {
if (($chan isin %myrooms) && ( problem code frown )) { .mode $chan +v $nick }
}

I would like to exclued users with this mask: *!1034*@*
The code task will be: if one user has join on one of my rooms, and this user has not mask *!1034*@*, else I will give him voice.
It is easy, but i don´t know do it cry

Thanks for all! This code is very important for me.
Nice time! smile
Note: I am spanish, and my english not very good, i hope that you understand post.

#187829 13/10/07 07:13 PM
Joined: Aug 2004
Posts: 7,168
R
Hoopy frood
Offline
Hoopy frood
R
Joined: Aug 2004
Posts: 7,168
Code:
on @*:join:%myrooms:{
  if *!1034*@* !iswm $address($nick,5) {
    .mode # +v $nick
  }
}


Since the @ in the ON JOIN event requires you to be opped in the channel, the usage of ! in that same event is redundant.

If you have your room list, as stored in %myrooms, comma separated, then you can use the variable in place of the channel name in the ON JOIN event.

These are the most common questions regarding the changes I made, but if you have other questions, ask and I'll try to explain.

A
asmodeo
asmodeo
A
Hi RusselB, and thx very much, really! smile
I was tried other code: ($address($nick,5) !isin *!1034*@*) mixed

But I don´t undertand you when you tell me "comma separated"
I have my room list in one variable like this:
%myrooms #channel1 #channel2 #channel3 it is ok?
or it must be: %myrooms #channel1,#channel2,#channel3

Thanks again RusselB



#187835 13/10/07 09:15 PM
S
Sh4d0w191
Sh4d0w191
S
No i think its meant to be.

Code:
 %myrooms #channel1, #channel2, #channel3 



#187844 13/10/07 10:36 PM
Joined: Oct 2004
Posts: 8,061
R
Hoopy frood
Offline
Hoopy frood
R
Joined: Oct 2004
Posts: 8,061
Yes, it needs commas.

Joined: Dec 2002
Posts: 503
B
Fjord artisan
Offline
Fjord artisan
B
Joined: Dec 2002
Posts: 503
It's an event. Use $fulladdress instead of $address($nick,5).

Joined: Aug 2004
Posts: 7,168
R
Hoopy frood
Offline
Hoopy frood
R
Joined: Aug 2004
Posts: 7,168
OK.. I had no problems testing it using $address($nick,5), but by no means am I going to say that $fulladdress might not be as good or possibly better.

Joined: Dec 2002
Posts: 503
B
Fjord artisan
Offline
Fjord artisan
B
Joined: Dec 2002
Posts: 503
*nod*, yeah, it'll work using it. I just say it as an efficiency thing for new users.

When using a remote-user triggered event (TEXT, NOTICE, JOIN, etc. etc.), the full user mask (the equivalent of $address($nick,5)) is put into $fulladdress. It just means less client-side operations (evaluation of $nick, followed by an IAL lookup for $address()).

S
Sh4d0w191
Sh4d0w191
S
Yea, that wat is better hope your problem is fixed laugh


Link Copied to Clipboard