|
Joined: Nov 2006
Posts: 143
Vogon poet
|
OP
Vogon poet
Joined: Nov 2006
Posts: 143 |
on 500:text:*:#:{
if ($1 == !ylist) {
var %i 1
while (%i <= $ulist(*,500,0) {
msg $chan %i
inc %i
}
}
} well how can i take all user list chan with a command ? i did try that didnt works
Last edited by xyzzy; 21/06/08 03:51 PM.
|
|
|
|
Joined: Jul 2007
Posts: 1,129
Hoopy frood
|
Hoopy frood
Joined: Jul 2007
Posts: 1,129 |
on 500:text:!ylist*:#: {
var %a = 1,%lev = $iif($1,$1,*)
if ($ulist(*,%lev,0) == 0) { msg $chan I have 0 result(s) in my user list. }
while $ulist(*,%lev,%a) { msg $chan %a $+ . $+ $+(5 $level($v1),:2,$chr(32),$v1)
inc %a
}
} I'm not sure what you want. Is this it?
Last edited by Tomao; 21/06/08 05:40 PM.
|
|
|
|
Joined: Nov 2006
Posts: 143
Vogon poet
|
OP
Vogon poet
Joined: Nov 2006
Posts: 143 |
i did add some users as 50:hey 100:whoami wants put them in the with the command i did try ur code always says same I have 0 result(s) in my user list. but there 3 users in the ulist
|
|
|
|
Joined: May 2008
Posts: 329
Fjord artisan
|
Fjord artisan
Joined: May 2008
Posts: 329 |
It's going to show all the users and their access number level, but only a user with access level 500 can do !ylist on the channel.
I registered; you should too.
|
|
|
|
Joined: Nov 2006
Posts: 143
Vogon poet
|
OP
Vogon poet
Joined: Nov 2006
Posts: 143 |
<xyzzy> !ylist <huh> I have 0 result(s) in my user list. 500:xyzzy 50:huh 100:mmhmm smthng wrong
|
|
|
|
Joined: May 2008
Posts: 329
Fjord artisan
|
Fjord artisan
Joined: May 2008
Posts: 329 |
Hum, there might be something wrong with the %lev variable. Set %lev to 500 and run it again. Make sure you have at least one user with level 500 access.
I registered; you should too.
|
|
|
|
Joined: Nov 2006
Posts: 143
Vogon poet
|
OP
Vogon poet
Joined: Nov 2006
Posts: 143 |
well its not working.. can someone fix it
|
|
|
|
Joined: Jul 2007
Posts: 1,129
Hoopy frood
|
Hoopy frood
Joined: Jul 2007
Posts: 1,129 |
Sorry about that... The code below should work now: on 500:TEXT:!ylist*:#: {
var %a = 1 | if ($ulist(*,0) == 0) { msg $chan I have 0 results in my user list. }
while $ulist(*,%a) { msg $chan I have $v1 in my user list. | inc %a }
}
Last edited by Tomao; 21/06/08 11:51 PM.
|
|
|
|
Joined: Nov 2006
Posts: 143
Vogon poet
|
OP
Vogon poet
Joined: Nov 2006
Posts: 143 |
its k. well yup now works thnx  btw its give answer new line can take all users in one line ? !ylist I have xyzzy in my user list. I have mmhmm in my user list. I have eh in my user list. -- like this I have xyzzy,mmhmm,eh in my user list. thnx again 
|
|
|
|
Joined: May 2008
Posts: 329
Fjord artisan
|
Fjord artisan
Joined: May 2008
Posts: 329 |
on 500:TEXT:!ylist*:#: {
var %a = 1
if ($ulist(*,0) == 0) { msg $chan I have 0 results in my user list. }
while $ulist(*,%a) {
var %namestotal = $addtok(%namestotal,$v1,32)
inc %a
}
msg $chan I have %namestotal in my user list.
} That should work. $addtok adds names to the %namestotal list and prevents duplicates. Optionalled, if you know you don't have duplicates, you can replace with: var %namestotal = %namestotal + $v1
I registered; you should too.
|
|
|
|
Joined: Nov 2006
Posts: 143
Vogon poet
|
OP
Vogon poet
Joined: Nov 2006
Posts: 143 |
yup works great thnx a lot  if i want it reply only 50 level users wat can i add to this code ?
|
|
|
|
Joined: Jul 2007
Posts: 1,129
Hoopy frood
|
Hoopy frood
Joined: Jul 2007
Posts: 1,129 |
on 500:TEXT:!ylist*:#: {
var %a = 1 | if ($ulist(*,0) == 0) { msg $chan I have 0 results in my user list. | halt }
while $ulist(*,%a) { var %namestotal = $addtok(%namestotal,$chr(32) $v1 $+ $chr(32),44) | inc %a }
if ($ulist(*,0) <= 50) { msg $chan I have %namestotal in my user list. }
else { msg $chan Sorry $nick $+ , I can only reply to 50 level users. }
} The code above will ONLY reply to 50 levels. Anything more than 50 will not get the result. I'm not quite sure what you mean by "if i want it reply only 50 level users."
|
|
|
|
Joined: Nov 2006
Posts: 143
Vogon poet
|
OP
Vogon poet
Joined: Nov 2006
Posts: 143 |
ah sorry for the bad english :S i was mean that if i have levels like this.. 500:night 1:Aher 500:xyzzy 5000:huh 10:mmhmm i want it say only 500 users in the channel night n xyzzy has 500 levels not say any other nicks
|
|
|
|
Joined: May 2008
Posts: 329
Fjord artisan
|
Fjord artisan
Joined: May 2008
Posts: 329 |
Try this: on 500:TEXT:!ylist*:#: {
var %a = 1
if ($ulist(*,0) == 0) { msg $chan I have 0 results in my user list. }
while $ulist(500,%a) {
var %namestotal = $addtok(%namestotal,$v1,32)
inc %a
}
msg $chan I have %namestotal in my user list.
} I changed the * to 500, so it should continue to add names to the %namestotal list while there are users with a 500 access level. (When it's a * it will add users of all access levels, thus adding all the uses to the %namestotal list.)
I registered; you should too.
|
|
|
|
Joined: Nov 2006
Posts: 143
Vogon poet
|
OP
Vogon poet
Joined: Nov 2006
Posts: 143 |
changed * to 500 not working after that i got this answer I have in my user list. i put * back n it give all users must be a way for take only the 500 level users
|
|
|
|
Joined: May 2008
Posts: 329
Fjord artisan
|
Fjord artisan
Joined: May 2008
Posts: 329 |
Ah, I got it, put:
*,500,%a
I registered; you should too.
|
|
|
|
Joined: Nov 2006
Posts: 143
Vogon poet
|
OP
Vogon poet
Joined: Nov 2006
Posts: 143 |
yeh all great thnx a lot 
|
|
|
|
Joined: Nov 2006
Posts: 143
Vogon poet
|
OP
Vogon poet
Joined: Nov 2006
Posts: 143 |
on 2:TEXT:!master100*:#: {
%ulevel = $level($address($nick,18))
if (%ulevel >= $getread(-s,remote,remote23) && $getread(-s,remote,remcmd23b) == on) { .guser 100 $2 18 | .Notice $nick u added 100 level
} this adding users as 500:nick!ident@ip how can i add only 500:nick ? also can i use the command as !master 100 nick instead of !master100 nick
Last edited by xyzzy; 26/06/08 08:55 PM.
|
|
|
|
Joined: Nov 2006
Posts: 143
Vogon poet
|
OP
Vogon poet
Joined: Nov 2006
Posts: 143 |
ummm 
|
|
|
|
|