mIRC Home    About    Download    Register    News    Help

Print Thread
#260534 07/05/17 12:32 PM
Joined: Nov 2014
Posts: 32
P
Panda Offline OP
Ameglian cow
OP Offline
Ameglian cow
P
Joined: Nov 2014
Posts: 32
Hi guys,

I was wondering if anyone would be able to help me with a script that would cycle through a current list of users in a room, and then /sapart them all.

I used to know how to do something like this but its been so long that I've forgotten, so if you could also explain how the storing of the nicklist into a variable works and how to loop through them all, that would be brilliant.

Thanks in advance!

Panda

Joined: Jul 2006
Posts: 4,145
W
Hoopy frood
Offline
Hoopy frood
W
Joined: Jul 2006
Posts: 4,145
Code:
var %a 1
while ($nick(#channel,%a)) {
echo -ag $v1
inc %a
}


#mircscripting @ irc.swiftirc.net == the best mIRC help channel
Joined: Nov 2014
Posts: 32
P
Panda Offline OP
Ameglian cow
OP Offline
Ameglian cow
P
Joined: Nov 2014
Posts: 32
Thanks Wims,

Unfortunately its a little out of context for me to understand to implement this in my own code.

I'd like to be able to right click in the nicklist, go into a menu called "Quick Tools" and then select "Part All Users"

Code:
menu nicklist {
  Quick Tools
  .Part All Users:{
    var %a 1
    while ($nick(#channel,%a)) {
      echo -ag $v1
      inc %a
    }
  }
}

It looked as though your example was meant to echo every nick in the current channel on a separate line, but it didn't do that. So either it didn't work or, more likely, I have completely misunderstood your intent lol.

Would it be possible to for you to dumb this down for me please?

Thank you

Panda

Joined: Jul 2006
Posts: 4,145
W
Hoopy frood
Offline
Hoopy frood
W
Joined: Jul 2006
Posts: 4,145
You need to replace #channel with $chan (and eventually use sapart instead of echo -ag) in this case smile


#mircscripting @ irc.swiftirc.net == the best mIRC help channel
Joined: Nov 2014
Posts: 32
P
Panda Offline OP
Ameglian cow
OP Offline
Ameglian cow
P
Joined: Nov 2014
Posts: 32
Ahh, got it smile Thanks so much, Wims laugh


Link Copied to Clipboard