mIRC Home    About    Download    Register    News    Help

Print Thread
Page 1 of 2 1 2
to msg all but protected people #201521 29/06/08 11:44 PM
Joined: Feb 2006
Posts: 307
N
nataliad Offline OP
Fjord artisan
OP Offline
Fjord artisan
N
Joined: Feb 2006
Posts: 307
hello

I have this script, which is supposed not to msn the people that match the protect list, but it does

any idea?

thanks

Code:
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
  }
}

Re: to msg all but protected people [Re: nataliad] #201527 30/06/08 02:40 AM
Joined: Aug 2004
Posts: 7,252
R
RusselB Offline
Hoopy frood
Offline
Hoopy frood
R
Joined: Aug 2004
Posts: 7,252
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.

Re: to msg all but protected people [Re: RusselB] #201531 30/06/08 07:30 AM
Joined: Aug 2005
Posts: 1,052
L
Lpfix5 Offline
Hoopy frood
Offline
Hoopy frood
L
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.


Code:
if $reality > $fiction { set %sanity Sane }
Else { echo -a *voices* }
Re: to msg all but protected people [Re: Lpfix5] #201535 30/06/08 08:08 AM
Joined: Aug 2004
Posts: 7,252
R
RusselB Offline
Hoopy frood
Offline
Hoopy frood
R
Joined: Aug 2004
Posts: 7,252
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.

Re: to msg all but protected people [Re: RusselB] #201546 30/06/08 03:30 PM
Joined: Aug 2005
Posts: 1,052
L
Lpfix5 Offline
Hoopy frood
Offline
Hoopy frood
L
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.


Code:
if $reality > $fiction { set %sanity Sane }
Else { echo -a *voices* }
Re: to msg all but protected people [Re: RusselB] #201607 01/07/08 06:09 AM
Joined: Feb 2006
Posts: 307
N
nataliad Offline OP
Fjord artisan
OP Offline
Fjord artisan
N
Joined: Feb 2006
Posts: 307
Originally Posted By: RusselB
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*!*@*

Re: to msg all but protected people [Re: nataliad] #201764 04/07/08 01:59 AM
Joined: Feb 2006
Posts: 307
N
nataliad Offline OP
Fjord artisan
OP Offline
Fjord artisan
N
Joined: Feb 2006
Posts: 307
anyone please ?

Re: to msg all but protected people [Re: nataliad] #201773 04/07/08 09:18 AM
Joined: Aug 2003
Posts: 144
M
Miguel_A Offline
Vogon poet
Offline
Vogon poet
M
Joined: Aug 2003
Posts: 144
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

Re: to msg all but protected people [Re: Miguel_A] #201849 07/07/08 10:05 AM
Joined: Feb 2006
Posts: 307
N
nataliad Offline OP
Fjord artisan
OP Offline
Fjord artisan
N
Joined: Feb 2006
Posts: 307
thanks
it does reply the correct answer

Re: to msg all but protected people [Re: nataliad] #203156 07/08/08 05:18 PM
Joined: Feb 2006
Posts: 307
N
nataliad Offline OP
Fjord artisan
OP Offline
Fjord artisan
N
Joined: Feb 2006
Posts: 307
can anyone help me with this please ? any solution ?

thanks

Re: to msg all but protected people [Re: nataliad] #203160 07/08/08 05:50 PM
Joined: Jul 2006
Posts: 3,568
W
Wims Offline
Hoopy frood
Offline
Hoopy frood
W
Joined: Jul 2006
Posts: 3,568
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.

Looking for a good help channel about mIRC? Check #mircscripting @ irc.swiftirc.net
Re: to msg all but protected people [Re: Wims] #203290 10/08/08 11:51 PM
Joined: Feb 2006
Posts: 307
N
nataliad Offline OP
Fjord artisan
OP Offline
Fjord artisan
N
Joined: Feb 2006
Posts: 307
nope I use 6.21

is there anything I can do?

Last edited by nataliad; 10/08/08 11:51 PM.
Re: to msg all but protected people [Re: nataliad] #203292 11/08/08 12:23 AM
Joined: Jul 2006
Posts: 3,568
W
Wims Offline
Hoopy frood
Offline
Hoopy frood
W
Joined: Jul 2006
Posts: 3,568
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 :

Code:
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


Looking for a good help channel about mIRC? Check #mircscripting @ irc.swiftirc.net
Re: to msg all but protected people [Re: Wims] #203366 13/08/08 12:42 AM
Joined: Feb 2006
Posts: 307
N
nataliad Offline OP
Fjord artisan
OP Offline
Fjord artisan
N
Joined: Feb 2006
Posts: 307
it doesn;t work:

* Invalid format: $address (line 585, script.ini)

Re: to msg all but protected people [Re: nataliad] #203367 13/08/08 01:15 AM
Joined: Aug 2004
Posts: 7,252
R
RusselB Offline
Hoopy frood
Offline
Hoopy frood
R
Joined: Aug 2004
Posts: 7,252
flukey thing with $address (and a few other identifiers that use commas)
Try using this re-write
Code:
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

Re: to msg all but protected people [Re: RusselB] #203392 13/08/08 11:53 PM
Joined: Feb 2006
Posts: 307
N
nataliad Offline OP
Fjord artisan
OP Offline
Fjord artisan
N
Joined: Feb 2006
Posts: 307
this is wrong too

I get

welcome No such nick/channel

Re: to msg all but protected people [Re: nataliad] #203410 14/08/08 09:48 AM
Joined: Aug 2004
Posts: 7,252
R
RusselB Offline
Hoopy frood
Offline
Hoopy frood
R
Joined: Aug 2004
Posts: 7,252
Code:
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.

Re: to msg all but protected people [Re: RusselB] #203419 14/08/08 07:25 PM
Joined: Jul 2006
Posts: 3,568
W
Wims Offline
Hoopy frood
Offline
Hoopy frood
W
Joined: Jul 2006
Posts: 3,568
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"...


Looking for a good help channel about mIRC? Check #mircscripting @ irc.swiftirc.net
Re: to msg all but protected people [Re: RusselB] #203420 14/08/08 09:34 PM
Joined: Feb 2006
Posts: 307
N
nataliad Offline OP
Fjord artisan
OP Offline
Fjord artisan
N
Joined: Feb 2006
Posts: 307
Originally Posted By: RusselB
Code:
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.
Re: to msg all but protected people [Re: nataliad] #203421 14/08/08 10:22 PM
Joined: Feb 2007
Posts: 234
M
MTec007 Offline
Fjord artisan
Offline
Fjord artisan
M
Joined: Feb 2007
Posts: 234
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.
Page 1 of 2 1 2