mIRC Home    About    Download    Register    News    Help

Print Thread
#96564 02/09/04 10:08 PM
Joined: Aug 2004
Posts: 10
B
BigP Offline OP
Pikka bird
OP Offline
Pikka bird
B
Joined: Aug 2004
Posts: 10
if ((%clnick !isop %c) && (%clnick !ishop %c) && (%clnick !isvoice %c)) { aline @kbans banning %clnick }

%clnick contains the nick. %c contains the channel.

Basically I just looking to check that a user is not an op, hop, or voice before I perform an action.

Why doesnt the above work ?

Cheers

P

#96565 02/09/04 10:15 PM
Joined: Dec 2002
Posts: 788
C
Hoopy frood
Offline
Hoopy frood
C
Joined: Dec 2002
Posts: 788
You should make life easier for yourself and lookup 'isreg'.

if (%clnick isreg %c) { }

Covers all of your above code, If that doesnt work, check that both %clnick and %c exist and are populated, simply by adding an /echo before the if-statement.

However, your above could SHOULD work, if its not working then your variables as explained above arent correct.

Eamonn.

#96566 02/09/04 10:18 PM
Joined: Aug 2004
Posts: 10
B
BigP Offline OP
Pikka bird
OP Offline
Pikka bird
B
Joined: Aug 2004
Posts: 10
they are both populated. I checked using....

if ((%clnick !isop %c) && (%clnick !ishop %c) && (%clnick !isvoice %c)) { aline @kbans banning %clnick from %c }

..and the nick and channel were echo'd to my window @kbans

isreg is no good for me in this instance as not all my voiced people are reg'd frown


#96567 02/09/04 10:20 PM
Joined: Aug 2004
Posts: 10
B
BigP Offline OP
Pikka bird
OP Offline
Pikka bird
B
Joined: Aug 2004
Posts: 10
ahh right.... isreg has nothing to do with channel services!

Thanks I will give it a go.

#96568 02/09/04 10:20 PM
Joined: Dec 2002
Posts: 788
C
Hoopy frood
Offline
Hoopy frood
C
Joined: Dec 2002
Posts: 788
isreg stands for isregular, i.e. not an OP, VOICE, HOP, or any other "rank", but just a normal user.

Eamonn.

#96569 02/09/04 10:20 PM
Joined: Dec 2003
Posts: 261
M
Fjord artisan
Offline
Fjord artisan
M
Joined: Dec 2003
Posts: 261
If they were echo'd what's the problem then?


velicha dusha moja Gospoda
#96570 02/09/04 10:54 PM
Joined: Aug 2004
Posts: 10
B
BigP Offline OP
Pikka bird
OP Offline
Pikka bird
B
Joined: Aug 2004
Posts: 10
isreg seems to protect the non voice / hop / ops.

!isreg works a treat though.

Thanks Eamonn


Link Copied to Clipboard