mIRC Home    About    Download    Register    News    Help

Print Thread
Joined: Apr 2003
Posts: 426
N
Fjord artisan
OP Offline
Fjord artisan
N
Joined: Apr 2003
Posts: 426
This has been pissing me off for yonks.

How the hell do I get $chan to work within an $hget in a popup?

This is what I currently have:
Code:
  ..Text Protection
  ...$iif($eval($hget(protect,$chan)) == on,$style(3)) On:protchanon
  ...$iif($eval($hget(protect,$chan)) == off,$style(3)) Off:protchanoff


Now, the item is ticked and greyed out after I click on one of the menu entries, but it never gets ticked and greyed out when I simply extend that part of the menu.

This is very annoying, and quite frankly is pissing me off.

If anyone can explain why it seems to be impossible to use $hget(blah,$chan) within a popup, I'd be very happy.


Oh, yes, the hash table does exist, and I've tried almost anything to get that popup entry to work.

Joined: Nov 2003
Posts: 203
H
Fjord artisan
Offline
Fjord artisan
H
Joined: Nov 2003
Posts: 203
Does it work like you want if you do this?

Code:
 
 ..Text Protection
 ...$iif($hget(protect,$chan) == on,,$style(3)) On:protchanon 
 ...$iif($hget(protect,$chan) == off,,$style(3)) Off:protchanoff
 


Note the extra comma.

Joined: Apr 2003
Posts: 426
N
Fjord artisan
OP Offline
Fjord artisan
N
Joined: Apr 2003
Posts: 426
Nope. Nothing so far seems to be working.

Joined: Apr 2003
Posts: 426
N
Fjord artisan
OP Offline
Fjord artisan
N
Joined: Apr 2003
Posts: 426
I finally got it working. It seems $hget has issues in trying to evaluate an item in a hash table if it has the # character in front of it, especially within a popup menu.

The only way I could get around it was to strip the # when I added the item to the hash table, and then appended the network to the end of it.

A damn nasty hack.


Link Copied to Clipboard