mIRC Home    About    Download    Register    News    Help

Print Thread
Lower Level Access #268707 14/04/21 11:21 AM
Joined: Nov 2003
Posts: 98
C
colt45 Offline OP
Babel fish
OP Offline
Babel fish
C
Joined: Nov 2003
Posts: 98
Trying to understand a bit and my English isn't my first language.

I'm trying to find how to send a message into the channel when a user join channel that isn't level 5 or higher.

i.e.

on *:JOIN: {
.msg $chan Welcome $nick to this channel.
}

I have this ^10 working for staff but I have a helper too which is set to 5, but want anything 4 or below to see that message when they join the channel.

Re: Lower Level Access [Re: colt45] #268708 14/04/21 11:52 AM
Joined: Jan 2012
Posts: 122
Epic Online
Vogon poet
Online
Vogon poet
Joined: Jan 2012
Posts: 122

There is an error in your example script, the correct syntax for this event handler is will be like this: on <level>:JOIN:<#[,#]>:{commands}

If you want this message to be visible to all users join the channel, to then the code might look like this:
Code
on *:JOIN:#:{
  .msg $chan Welcome $nick to this channel.
}

If you need a restriction only for members with access level 4 and higher, then like this:
Code
on +4:JOIN:#channel:{
  .msg $chan Welcome $nick to this channel.
}


You can find a more detailed description here -> https://en.wikichip.org/wiki/mirc/access_levels



πŸ…ΈπŸ†πŸ…² - 𝔦'𝔱𝔰 𝔸 π•‚π–ŽΙ΄π™™ ᴏ𝙛 π•„π™–π–Œπ™žπ™˜
Re: Lower Level Access [Re: Epic] #268709 14/04/21 11:53 AM
Joined: Nov 2003
Posts: 98
C
colt45 Offline OP
Babel fish
OP Offline
Babel fish
C
Joined: Nov 2003
Posts: 98
No, what I want is "lower" than level 4 not higher than 4.
I've tried wink

Re: Lower Level Access [Re: colt45] #268710 14/04/21 12:19 PM
Joined: Jan 2012
Posts: 122
Epic Online
Vogon poet
Online
Vogon poet
Joined: Jan 2012
Posts: 122

I experimented with this and found such this solution. Perhaps this method will work for you:
Code
on *:JOIN:#:{
  if ($level($nick) isnum 2-4) {
    .msg $chan Welcome $nick to this channel.
  }
}

Should work only with nicknames that have an access level of 2-4.

You can also do this with addresses. More details here -> https://en.wikichip.org/wiki/mirc/identifiers/$level



πŸ…ΈπŸ†πŸ…² - 𝔦'𝔱𝔰 𝔸 π•‚π–ŽΙ΄π™™ ᴏ𝙛 π•„π™–π–Œπ™žπ™˜
Re: Lower Level Access [Re: Epic] #268711 14/04/21 12:26 PM
Joined: Nov 2003
Posts: 98
C
colt45 Offline OP
Babel fish
OP Offline
Babel fish
C
Joined: Nov 2003
Posts: 98
Hmm, I've tried this script and it seems that everyone including myself is showing up at level 1.

I've set myself at 10 but showing 1 frown (I did via 2nd mirc script to test)

Re: Lower Level Access [Re: colt45] #268712 14/04/21 12:35 PM
Joined: Jan 2012
Posts: 122
Epic Online
Vogon poet
Online
Vogon poet
Joined: Jan 2012
Posts: 122
Try replacing 1-4 with 2-4, this is it works for me. This should only work for those who has access level from 2 to 4, but not higher and not lower.
Moreover the message NOT be must shown to all those who join the channel, without any established access level.


πŸ…ΈπŸ†πŸ…² - 𝔦'𝔱𝔰 𝔸 π•‚π–ŽΙ΄π™™ ᴏ𝙛 π•„π™–π–Œπ™žπ™˜
Re: Lower Level Access [Re: Epic] #268713 14/04/21 12:54 PM
Joined: Nov 2003
Posts: 98
C
colt45 Offline OP
Babel fish
OP Offline
Babel fish
C
Joined: Nov 2003
Posts: 98
Ok,here what I have in "Users" list.

10:colt!*@h.i.d.d.e.n
2:Gurth!*@h.i.d.d.e.n
2:Peru1987!*@h.i.d.d.e.n

When I test myself
I get no result.
Now, when I changed from
2:Peru1987!*@h.i.d.d.e.n
to
1:Peru1987!*@h.i.d.d.e.n
That works, however...
2-5 didn't show up result, so I went back to 1-5 and it's showing up only level 1, not level 2 or even level 10!

I find this very confusing, it's why I had to ask for help to fix this - it's probably a bug or something, I honestly not sure frown

Re: Lower Level Access [Re: colt45] #268714 14/04/21 01:02 PM
Joined: Nov 2003
Posts: 98
C
colt45 Offline OP
Babel fish
OP Offline
Babel fish
C
Joined: Nov 2003
Posts: 98
Works if I use address instead of $nick
Now I have to figure this out by checking based on address smile

Re: Lower Level Access [Re: colt45] #268715 14/04/21 01:31 PM
Joined: Jan 2012
Posts: 122
Epic Online
Vogon poet
Online
Vogon poet
Joined: Jan 2012
Posts: 122

That it worked correctly with the id $nick, the entry in the tab "Users" with access levels should look like this:
Code
10:colt
2:Gurth
2:Peru1987

In your case, it is correct to use the identifier $address with records in the form of addresses.

Here's of how I did it using the example of a user with the nickname "user":
Code
2:user!*@*

Script code:
Code
on *:JOIN:#:{
  if ($level($address($nick,5)) isnum 2-4) {
    .msg $chan $+([,$nick = $level($address($nick,5)),]) - Welcome $nick to this channel.
  }
}




πŸ…ΈπŸ†πŸ…² - 𝔦'𝔱𝔰 𝔸 π•‚π–ŽΙ΄π™™ ᴏ𝙛 π•„π™–π–Œπ™žπ™˜
Re: Lower Level Access [Re: Epic] #268716 14/04/21 01:49 PM
Joined: Nov 2003
Posts: 98
C
colt45 Offline OP
Babel fish
OP Offline
Babel fish
C
Joined: Nov 2003
Posts: 98
Perfect - but with a little tweak.

Using !isnum 2-10 - So that only new user will see the message and not level 2 or above smile

Works for me now,
Thanks

Re: Lower Level Access [Re: colt45] #268717 14/04/21 01:58 PM
Joined: Jan 2012
Posts: 122
Epic Online
Vogon poet
Online
Vogon poet
Joined: Jan 2012
Posts: 122
I'm glad you it finally managed to do. Always please and welcome! Do not forget to put πŸ‘ likes πŸ‘ for monetize my account grin smirk cool


πŸ…ΈπŸ†πŸ…² - 𝔦'𝔱𝔰 𝔸 π•‚π–ŽΙ΄π™™ ᴏ𝙛 π•„π™–π–Œπ™žπ™˜
Re: Lower Level Access [Re: colt45] #268726 15/04/21 07:30 AM
Joined: Jan 2012
Posts: 122
Epic Online
Vogon poet
Online
Vogon poet
Joined: Jan 2012
Posts: 122
Of course, it would be much more convenient if several new values using the dash β€œ-” were added to the syntax of event handlers that deal with access levels for simplify and prevent clutter when creating a script.

For to assign access level equal to the specified numeral and below, example (-4):
Code
on -4:JOIN:#:

For to assign enumeration of access levels through a dash from and to, example (2-4):
Code
on 2-4:JOIN:#:

And for all except the listed access levels, example (!2-4):
Code
on !2-4:JOIN:#:


I hopefully what this is possible and will be implemented in future versions of the client someday.



πŸ…ΈπŸ†πŸ…² - 𝔦'𝔱𝔰 𝔸 π•‚π–ŽΙ΄π™™ ᴏ𝙛 π•„π™–π–Œπ™žπ™˜
Re: Lower Level Access [Re: Epic] #268727 15/04/21 07:44 AM
Joined: Nov 2003
Posts: 98
C
colt45 Offline OP
Babel fish
OP Offline
Babel fish
C
Joined: Nov 2003
Posts: 98
Yup, I did try that but didn't work but it's all good now, hope for an update in the next version? :P