mIRC Homepage

Help With scid Multi Network ..

Posted By: WarlockW

Help With scid Multi Network .. - 04/11/05 05:05 PM

Anyway .. to make this work from any network ?
works fine if i run it from the channel i am in smirk

thanks !

testvoice {
var %room = $1
var %mmalltarg = %room | var %i = $nick(%room,0) | var %mmint = 0 | var %mblock = ON
:next
inc %mmint %mmsec
if ($nick(%room,%i) isvoice %room) { var %zzz = $nick(%room,%i) | echo $me %zzz | unset %zzz }
dec %i | if (%i > 0) { goto next } | var %totmmall = %mmint / %mmsec
set %mblock OFF | unset %i %totmmall %mmalltarg %mmint %mmsg %zzz | halt
}
Posted By: RusselB

Re: Help With scid Multi Network .. - 05/11/05 01:03 AM

A few corrections and modifications to your code. Also, next time, please use the Code Tags, they make reading code a lot easier. Please note the remarked statement. (the one that starts with a ; )
Usage: /testvoice (should run the code that you originally started with, but in all rooms that you are in and over all connected servers.
/testvoice <room> (should run the code that you originally started with, over all servers, but just for the named room)

I'm currently unable to test this, so I hope it works.

Code:
alias testvoice {
  var %connection = $scon(0)
  while %connection {
    .scon -at1 testvoice2 $1
    dec %connection
  }
}
alias testvoice2 {
  var %room = $iif($1,$1,$comchan($me,0))
  var %mmalltarg = %room, %i = $nick(%room,0), %mmint, %mblock = ON
  while %i {
    ;where is the variable %mmsec being set?
    inc %mmint %mmsec
    if ($nick(%room,%i) isvoice %room) {
      echo $me $nick(%room,%i)
    }
    dec %i
  }
  var %totmmall = %mmint / %mmsec
}
 
Posted By: WarlockW

Re: Help With scid Multi Network .. - 05/11/05 01:45 AM



Thanks For The Help ..

Your code seems to loop 5 times .. and stop ..

I did figure it out .. with the old code .. finally with your help.
however it seems kinda weird .. that
$nick(%room,%i) isvoice %room

only works if mirc has "seen" the person voiced ..
if i disconnect .. and connect to a channel and run the script it doesnt show all the people voiced ..

anyway .. i will work on your ver .. some and see ..
Posted By: Om3n

Re: Help With scid Multi Network .. - 05/11/05 03:07 PM

When joining a room mirc reads the names raw that it recieves from the server, this comes in the format of Xnick where X is the highest operator symbol that the user has, so if a user is both voiced and opped, the names raw will only inform mirc that the user is opped. Therefor that users voice status will not trigger your script since mirc is unaware of the fact.

As for the script, just curious, is the while loop in the first alias even needed?

I have never done anything using the -a switch, however the mirc help files explains that it performs the command across all connection id's...
Posted By: RusselB

Re: Help With scid Multi Network .. - 05/11/05 04:23 PM

Nice catch Om3n. That while loop in the first alias should not be there. Not sure what I was thinking when I put that in. The scon command that is currently in the loop does need to remain, but the rest of that loop can (and should) be removed
© 2022 mIRC Discussion Forums