|
Joined: Aug 2004
Posts: 7,252
Hoopy frood
|
OP
Hoopy frood
Joined: Aug 2004
Posts: 7,252 |
Details as to what it appears to be doing are commented in the 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
}
|
|
|
|
Joined: Dec 2002
Posts: 1,245
Hoopy frood
|
Hoopy frood
Joined: Dec 2002
Posts: 1,245 |
I tried this:
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
|
|
|
|
Joined: Aug 2005
Posts: 39
Ameglian cow
|
Ameglian cow
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
|
|
|
|
Joined: Aug 2004
Posts: 7,252
Hoopy frood
|
OP
Hoopy frood
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 $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)
|
|
|
|
Joined: Aug 2004
Posts: 7,252
Hoopy frood
|
OP
Hoopy frood
Joined: Aug 2004
Posts: 7,252 |
Thanks for the information
|
|
|
|
Joined: Dec 2002
Posts: 1,245
Hoopy frood
|
Hoopy frood
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.
|
|
|
|
Joined: Dec 2002
Posts: 1,245
Hoopy frood
|
Hoopy frood
Joined: Dec 2002
Posts: 1,245 |
this also worked
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?
|
|
|
|
Joined: Aug 2004
Posts: 7,252
Hoopy frood
|
OP
Hoopy frood
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 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 }
}
|
|
|
|
|