mIRC Home    About    Download    Register    News    Help

Print Thread
Joined: Apr 2004
Posts: 19
L
Pikka bird
OP Offline
Pikka bird
L
Joined: Apr 2004
Posts: 19
I have a pretty simple question I imagine
I have a code now for adding and removing people to/from an auto-voice list:
Code:
 
Menu nicklist { 
  Control
  .avoice:/avoice $$1 #
  .avoice del:/avoice -w $$1 #
}
 

It works pretty well, but there is a problem of adding multiple users at once. How do I handle that?

Joined: Feb 2004
Posts: 714
Z
Hoopy frood
Offline
Hoopy frood
Z
Joined: Feb 2004
Posts: 714
Code:
Menu nicklist { 
  Control
  .avoice: {
    var %i = $numtok($snicks,44)
    while (%i) { avoice $gettok($snicks,%i,44) # | dec %i }
  }
  .avoice del: {
    var %i = $numtok($snicks,44)
    while (%i) { avoice [color:red]-r[/color] $gettok($snicks,%i,44) # | dec %i }
 }
}
This *should* work. BTW, the -r switch is the one that removes the entries. The -w indicates that the action apply to all networks and it, if you're goping to use it, you should use it in noth commands.

Hope this helps smile
Zyzzyx.


"All we are saying is give peace a chance" -- John Lennon
Joined: Apr 2004
Posts: 19
L
Pikka bird
OP Offline
Pikka bird
L
Joined: Apr 2004
Posts: 19
Works like a charm wink
and a stupid mistake, switching the -w and -r blush
thanx man

Joined: Feb 2004
Posts: 714
Z
Hoopy frood
Offline
Hoopy frood
Z
Joined: Feb 2004
Posts: 714
Cool, glad I could help smile


"All we are saying is give peace a chance" -- John Lennon

Link Copied to Clipboard