mIRC Home    About    Download    Register    News    Help

Print Thread
#193407 19/01/08 03:58 PM
Joined: Mar 2007
Posts: 218
V
vexed2 Offline OP
Fjord artisan
OP Offline
Fjord artisan
V
Joined: Mar 2007
Posts: 218
Ok, i thought i'd try to write a little script to list users with modes or no modes, but using the .pnick to get any possible modes if the server supports them
ie;

//listusers # q or ~ (for owners)
[~nick] [ident@address]

//listusers # & (for protected user)
[&nick] [ident@address]

//listusers # o or @ (for opped users)
[@nick] [ident@address]

//listusers # v or + (for voiced users)
[@nick] [ident@address]

etc etc, I tried this and i couldn't get anywhere
if anyone could help, it'd be much appreciated.

vexed2 #193412 19/01/08 05:00 PM
Joined: Jan 2004
Posts: 509
L
Fjord artisan
Offline
Fjord artisan
L
Joined: Jan 2004
Posts: 509
You mean stuff like:

Code:
/opnick { 
  var %n = 1, %o 
  while (%n <= $nick(#,0,o)) { 
    %o = %o $nick(#,%n,o) 
    inc %n 
  } 
  /say %o 
}

LostShadow #193413 19/01/08 05:02 PM
Joined: Jan 2004
Posts: 509
L
Fjord artisan
Offline
Fjord artisan
L
Joined: Jan 2004
Posts: 509
So here's the version where you /listusers #Channel o/@

Code:
/listusers {
  if ($2 == o) || ($2 == @) {
    var %n = 1, %o 
    while (%n <= $nick($1,0,o)) { 
      %o = %o $nick($1,%n,o) 
      inc %n 
    } 
    /say %o 
  }
}


Etc.

LostShadow #193416 19/01/08 05:14 PM
Joined: Jul 2006
Posts: 4,150
W
Hoopy frood
Offline
Hoopy frood
W
Joined: Jul 2006
Posts: 4,150
Code:
alias listusers var %n $nick($1,0,$2) | while (%n) var %o %o $nick($1,%n,$2) ,%n %n - 1 | return %o


$listusers(#channel,[o|@,h|%,v|+])


#mircscripting @ irc.swiftirc.net == the best mIRC help channel
Wims #193421 19/01/08 05:44 PM
Joined: Mar 2007
Posts: 218
V
vexed2 Offline OP
Fjord artisan
OP Offline
Fjord artisan
V
Joined: Mar 2007
Posts: 218
Both good, but i was looking to list them below each other with an address an dmode next to them ie;
//listusers # @
[@nick ident@address]
[@nick1 ident1@address1]
[@nick2 ident2@address2]

vexed2 #193424 19/01/08 05:59 PM
Joined: Jan 2004
Posts: 509
L
Fjord artisan
Offline
Fjord artisan
L
Joined: Jan 2004
Posts: 509
Then add an $address($nick,1) or whatever mask you want.

LostShadow #193425 19/01/08 06:03 PM
Joined: Mar 2007
Posts: 218
V
vexed2 Offline OP
Fjord artisan
OP Offline
Fjord artisan
V
Joined: Mar 2007
Posts: 218
I did that, that's why i asked here crazy


Link Copied to Clipboard