The boolean true/false values in mIRC are represented by [color:green]$true[/color] and [color:green]$false[/color] - so your code should read "if ($aop == $true)" to check if the Auto-op setting is switched on.