mIRC Home    About    Download    Register    News    Help

Print Thread
#201164 21/06/08 03:49 PM
Joined: Nov 2006
Posts: 143
X
xyzzy Offline OP
Vogon poet
OP Offline
Vogon poet
X
Joined: Nov 2006
Posts: 143
Code:
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.
xyzzy #201167 21/06/08 05:36 PM
Joined: Jul 2007
Posts: 1,129
T
Hoopy frood
Offline
Hoopy frood
T
Joined: Jul 2007
Posts: 1,129
Code:
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.
Tomao #201168 21/06/08 06:07 PM
Joined: Nov 2006
Posts: 143
X
xyzzy Offline OP
Vogon poet
OP Offline
Vogon poet
X
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 confused

xyzzy #201170 21/06/08 07:15 PM
Joined: May 2008
Posts: 329
A
Fjord artisan
Offline
Fjord artisan
A
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.
AWEstun #201171 21/06/08 07:18 PM
Joined: Nov 2006
Posts: 143
X
xyzzy Offline OP
Vogon poet
OP Offline
Vogon poet
X
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 crazy

xyzzy #201173 21/06/08 08:33 PM
Joined: May 2008
Posts: 329
A
Fjord artisan
Offline
Fjord artisan
A
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.
AWEstun #201174 21/06/08 08:38 PM
Joined: Nov 2006
Posts: 143
X
xyzzy Offline OP
Vogon poet
OP Offline
Vogon poet
X
Joined: Nov 2006
Posts: 143
well its not working..
can someone fix it confused

xyzzy #201178 21/06/08 11:42 PM
Joined: Jul 2007
Posts: 1,129
T
Hoopy frood
Offline
Hoopy frood
T
Joined: Jul 2007
Posts: 1,129
Sorry about that...

The code below should work now:

Code:
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.
Tomao #201196 22/06/08 08:08 AM
Joined: Nov 2006
Posts: 143
X
xyzzy Offline OP
Vogon poet
OP Offline
Vogon poet
X
Joined: Nov 2006
Posts: 143
its k. well yup now works thnx smile
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 wink

xyzzy #201200 22/06/08 02:11 PM
Joined: May 2008
Posts: 329
A
Fjord artisan
Offline
Fjord artisan
A
Joined: May 2008
Posts: 329
Code:
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.
AWEstun #201201 22/06/08 02:21 PM
Joined: Nov 2006
Posts: 143
X
xyzzy Offline OP
Vogon poet
OP Offline
Vogon poet
X
Joined: Nov 2006
Posts: 143
yup works great thnx a lot smile
if i want it reply only 50 level users wat can i add to this code ?

xyzzy #201209 22/06/08 05:18 PM
Joined: Jul 2007
Posts: 1,129
T
Hoopy frood
Offline
Hoopy frood
T
Joined: Jul 2007
Posts: 1,129
Code:
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."

Tomao #201212 22/06/08 07:19 PM
Joined: Nov 2006
Posts: 143
X
xyzzy Offline OP
Vogon poet
OP Offline
Vogon poet
X
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




xyzzy #201215 22/06/08 07:36 PM
Joined: May 2008
Posts: 329
A
Fjord artisan
Offline
Fjord artisan
A
Joined: May 2008
Posts: 329
Try this:

Code:
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.
AWEstun #201216 22/06/08 07:43 PM
Joined: Nov 2006
Posts: 143
X
xyzzy Offline OP
Vogon poet
OP Offline
Vogon poet
X
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 confused

xyzzy #201217 22/06/08 08:11 PM
Joined: May 2008
Posts: 329
A
Fjord artisan
Offline
Fjord artisan
A
Joined: May 2008
Posts: 329
Ah, I got it, put:

*,500,%a


I registered; you should too.
AWEstun #201221 22/06/08 10:04 PM
Joined: Nov 2006
Posts: 143
X
xyzzy Offline OP
Vogon poet
OP Offline
Vogon poet
X
Joined: Nov 2006
Posts: 143
yeh all great thnx a lot smile

AWEstun #201365 26/06/08 07:58 PM
Joined: Nov 2006
Posts: 143
X
xyzzy Offline OP
Vogon poet
OP Offline
Vogon poet
X
Joined: Nov 2006
Posts: 143
Code:
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 confused

Last edited by xyzzy; 26/06/08 08:55 PM.
xyzzy #201382 27/06/08 01:59 AM
Joined: Nov 2006
Posts: 143
X
xyzzy Offline OP
Vogon poet
OP Offline
Vogon poet
X
Joined: Nov 2006
Posts: 143
ummmconfused


Link Copied to Clipboard