mIRC Home    About    Download    Register    News    Help

Print Thread
#94911 20/08/04 03:42 PM
Joined: Apr 2003
Posts: 61
G
gaui Offline OP
Babel fish
OP Offline
Babel fish
G
Joined: Apr 2003
Posts: 61
I've got this:
Code:
if (($aop($address(%nick,3))) && (# isin $aop($address(%nick,3)).type)) {


I'm checking whether the address is on auto-op and whether the channel is in the type.

What I want to add to this, is to check whether the channel is in the type, or it's empty.

Something like this...
Code:
if (($aop($address(%nick,3))) && ((# isin $aop($address(%nick,3)).type)) || $aop($address(%nick,3)).type == '') {


Does anybody know how to accomplish this?
Thanks in advance.


__________________________
Curiosity killed the cat.
#94912 20/08/04 04:04 PM
Joined: Feb 2004
Posts: 714
Z
Hoopy frood
Offline
Hoopy frood
Z
Joined: Feb 2004
Posts: 714
Code:
if (($aop($address(%nick,3))) && (# isin $aop($address(%nick,3)).type)) || (($aop($address(%nick,3))) && [color:blue](![/color]$aop($address(%nick,3)).type)) {
This should work smile

Zyzzyx.


"All we are saying is give peace a chance" -- John Lennon
#94913 20/08/04 04:43 PM
Joined: Apr 2003
Posts: 61
G
gaui Offline OP
Babel fish
OP Offline
Babel fish
G
Joined: Apr 2003
Posts: 61
Works like a charm, thanks a lot. smile


__________________________
Curiosity killed the cat.
#94914 21/08/04 02:47 AM
Joined: Dec 2002
Posts: 1,541
L
Hoopy frood
Offline
Hoopy frood
L
Joined: Dec 2002
Posts: 1,541
and to make it shorter:

Code:
if (($aop($address(%nick,3))) && (# isin $aop($address(%nick,3)).type)) || (!$aop($address(%nick,3)).type)) {


You shouldnt need to use (($aop($address(%nick,3))) && twice (unless Im misunderstanding)


Those who fail history are doomed to repeat it
#94915 21/08/04 03:41 PM
Joined: Feb 2004
Posts: 714
Z
Hoopy frood
Offline
Hoopy frood
Z
Joined: Feb 2004
Posts: 714
Cool, have fun wink

landonsandor: I wasn't sure on how to make it shorter, so I went for the longer version that I thought it would work smile


"All we are saying is give peace a chance" -- John Lennon
#94916 22/08/04 01:13 AM
Joined: Dec 2002
Posts: 1,541
L
Hoopy frood
Offline
Hoopy frood
L
Joined: Dec 2002
Posts: 1,541
no problem, just an fyi to the original poster (if this helps at all)... you can do the following:

if (#channelname isin $aop($address(%nick,3)).type) {

if the entry exists and the channel name is in the .type it'll return true. If the entry doesnt even exist it'll return false. Also, I THINK (havent tried it yet) you could also do this:

if ($aop($address(%nick,3)).type == $null) {

to see if there is no channels listed there. Just some more ideas for you smile


Those who fail history are doomed to repeat it

Link Copied to Clipboard