| 
 | 
 
| 
 
nataliad
 
 | 
 
| 
 nataliad 
 | 
hello I have this script, which is supposed not to msn the people that match the protect list, but it does any idea? thanks  alias mm {
  var %a = $nvnick($chan,0)
  while (%a) {
    if (($fulladdress !isignore) && ($fulladdress !isprotect)) {
      .timer 1 $calc(%a * 9) .msg $nvnick($chan,%a) $1-
    }
    dec %a
  }
} 
 
 |  
 
 | 
 
 
 |  
 
| 
 | 
 
Joined:  Aug 2004 
Posts: 7,168  
Hoopy frood 
 | 
 
 
Hoopy frood 
Joined:  Aug 2004 
Posts: 7,168  | 
1) Please ensure that you do have the addresses in the protect list set to match the same format as $fulladdress (ie:nick!user@host)
  Aside from that, I see nothing wrong with your code.
  
 
 |  
 
 | 
 
 
 |  
 
| 
 | 
 
Joined:  Aug 2005 
Posts: 1,052  
Hoopy frood 
 | 
 
 
Hoopy frood 
Joined:  Aug 2005 
Posts: 1,052  | 
RusselB Have you considered maybe the custom Identifier nvnick Could be an issue?
  It is after all called upon in a while loop through a variable change. 
 
 |  
 
 | 
 
 
 |  
 
| 
 | 
 
Joined:  Aug 2004 
Posts: 7,168  
Hoopy frood 
 | 
 
 
Hoopy frood 
Joined:  Aug 2004 
Posts: 7,168  | 
I did consider that, but the identifier seemed familiar to me, and while I couldn't find it in the current help file, testing the code did not generate an error for that identifier, and I don't have any aliases called nvnick, so I'm suspecting that it's either an old identifier, or an undocumented one.
  
 
 |  
 
 | 
 
 
 |  
 
| 
 | 
 
Joined:  Aug 2005 
Posts: 1,052  
Hoopy frood 
 | 
 
 
Hoopy frood 
Joined:  Aug 2005 
Posts: 1,052  | 
Ya your right seems like it used to be an old identifier because I did google it and it came up many times, however in my current mirc its not included. 
 
 |  
 
 | 
 
 
 |  
 
| 
 | 
 
| 
 
nataliad
 
 | 
 
| 
 nataliad 
 | 
1) Please ensure that you do have the addresses in the protect list set to match the same format as $fulladdress (ie:nick!user@host)
  Aside from that, I see nothing wrong with your code.   can you tell me please how to check this? the addresses in my protect list are like: some*!*@*  
 
 |  
 
 | 
 
 
 |  
 
| 
 | 
 
Joined:  Aug 2003 
Posts: 143  
Vogon poet 
 | 
 
 
Vogon poet 
Joined:  Aug 2003 
Posts: 143  | 
make for example  //echo -a $protect(1) and //echo -s $ignore(1)
  check if the result is nick!user@host...
  if the result is nick!*@* it´s wrong because $fulladress will return nick!nick@12.455.34.23.com.
  Hope this help good luck
  
 
 |  
 
 | 
 
 
 |  
 
| 
 | 
 
| 
 
nataliad
 
 | 
 
| 
 nataliad 
 | 
thanks  it does reply the correct answer 
 
 |  
 
 | 
 
 
 |  
 
| 
 | 
 
| 
 
nataliad
 
 | 
 
| 
 nataliad 
 | 
can anyone help me with this please ? any solution ?
  thanks  
 
 |  
 
 | 
 
 
 |  
 
| 
 | 
 
Joined:  Jul 2006 
Posts: 4,033  
Hoopy frood 
 | 
 
 
Hoopy frood 
Joined:  Jul 2006 
Posts: 4,033  | 
Are you using mirc 6.33 to test this ? Because there is a known bug with condition like your...
 
  Edit : $nvnick, $nhnick and $nopnick can be used to return non-voice/halfop/op users 
Last edited by Wims; 07/08/08 05:59 PM.
 
 
  
#mircscripting @ irc.swiftirc.net == the best mIRC help channel
 |  
 
 | 
 
 
 |  
 
| 
 | 
 
| 
 
nataliad
 
 | 
 
| 
 nataliad 
 | 
nope I use 6.21
  is there anything I can do? 
Last edited by nataliad; 10/08/08 11:51 PM.
 
 
 |  
 
 | 
 
 
 |  
 
| 
 | 
 
Joined:  Jul 2006 
Posts: 4,033  
Hoopy frood 
 | 
 
 
Hoopy frood 
Joined:  Jul 2006 
Posts: 4,033  | 
In fact the code is wrong, $fulladdress is only avalaible inside an event, logically, $fulladdress is $null here, you need to check the address of $nvnick($chan,%a) with $address($nvnick,$chan,%a),5) to respect the format : alias mm {
  var %a = $nvnick($chan,0)
  while (%a) {
  var %addr $address($nvnick($chan,%a),5)
  if (%addr !isignore) && (%addr !isprotect) .timer 1 $calc(%a * 9) .msg $!nvnick($chan,%a) $1-
    dec %a
  }
}This should work, but the $address value could be $null too  
 
  
#mircscripting @ irc.swiftirc.net == the best mIRC help channel
 |  
 
 | 
 
 
 |  
 
| 
 | 
 
| 
 
nataliad
 
 | 
 
| 
 nataliad 
 | 
it doesn;t work:
  * Invalid format: $address (line 585, script.ini) 
 
 |  
 
 | 
 
 
 |  
 
| 
 | 
 
Joined:  Aug 2004 
Posts: 7,168  
Hoopy frood 
 | 
 
 
Hoopy frood 
Joined:  Aug 2004 
Posts: 7,168  | 
flukey thing with $address (and a few other identifiers that use commas) Try using this re-write alias mm {
  var %a = $nvnick($chan,0)
  while (%a) {
  var %addr = $nvnick($chan,%a)
  %addr = $address(%addr,5)
  if (%addr !isignore) && (%addr !isprotect) .timer 1 $calc(%a * 9) .msg $!nvnick($chan,%a) $1-
    dec %a
  }
}I'm going to presume that this alias is called from within a channel, otherwise $chan will return $null  
 
 |  
 
 | 
 
 
 |  
 
| 
 | 
 
| 
 
nataliad
 
 | 
 
| 
 nataliad 
 | 
this is wrong too
  I get 
  welcome No such nick/channel 
 
 |  
 
 | 
 
 
 |  
 
| 
 | 
 
Joined:  Aug 2004 
Posts: 7,168  
Hoopy frood 
 | 
 
 
Hoopy frood 
Joined:  Aug 2004 
Posts: 7,168  | 
alias mm {
  var %a = 1, %b = $nick($chan,0)
  while %a <= %b {
    var %addr = $nick($chan,%a)
    %addr = $address(%addr,5)
    if (%addr !isignore) && (%addr !isprotect) {
      .timer 1 %a msg $!nick($chan,%a) $1-
    }
    dec %a
  }
}Try this.. I have removed the usage of $nvnick as it's no longer supported via the help file, also, due to the noted/corrected bug regarding the usage of parentheses with the if statement, you may wish to ensure that you are running the latest version of mIRC.  
 
 |  
 
 | 
 
 
 |  
 
| 
 | 
 
Joined:  Jul 2006 
Posts: 4,033  
Hoopy frood 
 | 
 
 
Hoopy frood 
Joined:  Jul 2006 
Posts: 4,033  | 
It is not something with $address, it is just a mistake I've made. Since mIRC 6.21, mirc does not care about the equal sign, and i'm used to not use it, a lot of people would said "a bad habit"...
  
 
  
#mircscripting @ irc.swiftirc.net == the best mIRC help channel
 |  
 
 | 
 
 
 |  
 
| 
 | 
 
| 
 
nataliad
 
 | 
 
| 
 nataliad 
 | 
alias mm {
  var %a = 1, %b = $nick($chan,0)
  while %a <= %b {
    var %addr = $nick($chan,%a)
    %addr = $address(%addr,5)
    if (%addr !isignore) && (%addr !isprotect) {
      .timer 1 %a msg $!nick($chan,%a) $1-
    }
    dec %a
  }
}Try this.. I have removed the usage of $nvnick as it's no longer supported via the help file, also, due to the noted/corrected bug regarding the usage of parentheses with the if statement, you may wish to ensure that you are running the latest version of mIRC.  this crashes my mirc, I cannot update to latest mirc, because I will lose data isn't there something for my version 6.21?  
Last edited by nataliad; 14/08/08 09:35 PM.
 
 
 |  
 
 | 
 
 
 |  
 
| 
 | 
 
Joined:  Feb 2007 
Posts: 228  
Fjord artisan 
 | 
 
 
Fjord artisan 
Joined:  Feb 2007 
Posts: 228  | 
What data do you think you will lose? I ask because the mIRC installer is supposed to save your entire current configuration. In fact you can make a backup copy of your mIRC directory if you want. 
Last edited by MTec007; 14/08/08 10:24 PM.
 
 
 |  
 
 | 
 
 
 |  
 
 
   |  
 
 |