mIRC Home    About    Download    Register    News    Help

Print Thread
#129370 05/09/05 04:36 PM
Joined: Aug 2004
Posts: 7,252
R
RusselB Offline OP
Hoopy frood
OP Offline
Hoopy frood
R
Joined: Aug 2004
Posts: 7,252
Details as to what it appears to be doing are commented in the code
Code:
 on @*:text:!autoplay:#:{
  ;this command never removes the address
  .avoice $iif($avoice($address),-r) $address $chan $network
  ;this line always shows the second option
  describe # $iif($avoice($address),smiles as $nick decides to be,sighs as $nick decides to stop being) a permanent player
}
 

#129371 05/09/05 05:16 PM
Joined: Dec 2002
Posts: 1,245
M
Hoopy frood
Offline
Hoopy frood
M
Joined: Dec 2002
Posts: 1,245
I tried this:
Code:
on @*:text:!autoplay:#:{
  avoice $iif($avoice($address($nick,3)), -r $address($nick,3) $chan $network  , $address($nick,3) $chan $network)
  describe # $iif($avoice($address($nick,3)),smiles as $nick decides to be,sighs as $nick decides to stop being) a permanent player
}

worked well, I think you need to have both options for the $iif to work
the avoice add and remove have to match in all parameters to work right it seems

#129372 05/09/05 05:19 PM
Joined: Aug 2005
Posts: 39
B
Ameglian cow
Offline
Ameglian cow
B
Joined: Aug 2005
Posts: 39
a entry in the auto-voice list looks like nick!id@address

$address returns only [email]id@address[/email]

that's the problem

#129373 05/09/05 05:22 PM
Joined: Aug 2004
Posts: 7,252
R
RusselB Offline OP
Hoopy frood
OP Offline
Hoopy frood
R
Joined: Aug 2004
Posts: 7,252
I don't know why I would have to have both, when I've used just one before, and from the help file
Quote:
$iif(1 == 2, yes) returns nothing


But, I'm not too proud to have some extra code if it makes it work. I'll give your suggestion a try and see what I get...Note I'm just using $address rather than $address($nick,3)

#129374 05/09/05 05:26 PM
Joined: Aug 2004
Posts: 7,252
R
RusselB Offline OP
Hoopy frood
OP Offline
Hoopy frood
R
Joined: Aug 2004
Posts: 7,252
Thanks for the information

#129375 05/09/05 05:26 PM
Joined: Dec 2002
Posts: 1,245
M
Hoopy frood
Offline
Hoopy frood
M
Joined: Dec 2002
Posts: 1,245
might not be the $iif, but the avoice that was causing it to not remove the address, as I said it seemed to need the address, channel, network in the remove to match the address that was in the avoice or it would "update" the address' parameters for channel and network rather than removing it.

#129376 05/09/05 05:37 PM
Joined: Dec 2002
Posts: 1,245
M
Hoopy frood
Offline
Hoopy frood
M
Joined: Dec 2002
Posts: 1,245
this also worked
Code:
on @*:text:!autoplay:#:{
  avoice $iif($avoice($wildsite), -r ) $wildsite $chan $network)
  describe # $iif($avoice($wildsite),smiles as $nick decides to be,sighs as $nick decides to stop being) a permanent player
}

changed back to just $address and it doesn't work (even though $address returns a value if you echo it in the script)
$address($nick,N) or $wildsite but not $address, anyone know why?

#129377 06/09/05 10:31 PM
Joined: Aug 2004
Posts: 7,252
R
RusselB Offline OP
Hoopy frood
OP Offline
Hoopy frood
R
Joined: Aug 2004
Posts: 7,252
Per Buster2007's response, the format returned by $address is incorrect for avoice (and I would therefore also imagine aop)

By making some slight modifications, the following code works
Code:
 on @*:text:!autoplay:#:{
  .avoice $iif($avoice($address($nick,3)),-r ) $nick $chan 3 $network
  describe # $iif($avoice($address($nick,3)),smiles as $nick decides to be,sighs as $nick decides to stop being) a permanent player
  if ($nick !isvoice $chan) && $avoice($address($nick,3)) {    .mode $chan +v $nick  }
  elseif ($nick isvoice $chan) && !$avoice($address($nick,3)) {    .mode $chan -v $nick  }
}
 


Link Copied to Clipboard