mIRC Home    About    Download    Register    News    Help

Print Thread
L
LooseFlapper
LooseFlapper
L
Hi!

I would like to create a script where I can give someone access level but only in a certain channel. So say I want to grant someone access level 2 but I only want him to have access level 2 in #apples. How would I go about doing this?
Just to explain what I mean, here's an example of what it COULD be. :P
Quote:
on *:TEXT:*!grant 2*:#: {
if ($nick isop #) {
auser 2 $3 $chan
msg # $3 has been granted access level 2 in $chan.
}
}


Hopefully this will kinda help you understand what I want. smile


/Loose

Last edited by LooseFlapper; 23/02/14 10:40 PM.
Joined: Feb 2006
Posts: 180
C
Vogon poet
Offline
Vogon poet
C
Joined: Feb 2006
Posts: 180
Code:
/auser [-a] <levels> <nick|address> [info]

The info parameter allows you to append text to the entry that is added to the users list, you can reference this later with the $ulist() identifier.

Originally Posted By: Help File
$ulist(nick!userid@address,L,N)
Properties: info

You'll need to check if ($ulist(nick!userid@address,L,N).info == $chan) in the access code.

/help $ulist

L
LooseFlapper
LooseFlapper
L
Could you try and explain that again? smile I didn't quite follow.

I read the /help $ulist stuff but still not sure how to go about doing this. :P

Joined: Feb 2006
Posts: 180
C
Vogon poet
Offline
Vogon poet
C
Joined: Feb 2006
Posts: 180
Quote:
auser <levels> <nick|address> [info]
auser 2 $3 $chan

<levels> = 2
<nick|address> = $3
[info] = $chan

The [info] parameter allows you to append text to the entry that is added to the users list, you can reference this with the $ulist(<nick|address>).info or $ulist($3).info

auser 2 Crinul #apples
$ulist(Crinul).info == #apples

L
LooseFlapper
LooseFlapper
L
I see now! smile Thank you very much!

L
LooseFlapper
LooseFlapper
L
I attempted to make this as a test but it didn't work.

Code:
on *:text:*test*:#: {
  if ($ulist($nick).info == $chan) {
    msg $chan Test complete...
  }
}


Any suggestions what I might've done wrong?


EDIT: This is what it looks like in the Users TAB.

Code:
2:testuser #looseflapper

Last edited by LooseFlapper; 25/02/14 08:20 PM.
Joined: Feb 2006
Posts: 180
C
Vogon poet
Offline
Vogon poet
C
Joined: Feb 2006
Posts: 180
Works fine on my end.

testuser (not you) has to type test. If the channel matches you see the message.
The on TEXT event triggers when you receive messages, not when you send them.

L
LooseFlapper
LooseFlapper
L
Strange, it's what I did. I will try and move the script up a bit and see if that helps.

EDIT: Yepp, that fixed it. Haha. Thank you very much.

Last edited by LooseFlapper; 26/02/14 03:26 PM.

Link Copied to Clipboard