alias modes {
[color:#840017]
; Get the modes themselves rather than a key or limit.
;[/color]
var %mode = $gettok($chan($chan).mode, 1, 32)
[color:#840017]
; Check once to make sure cpanel is open, and open it if it's not.
;[/color]
if (!$dialog(cpanel)) dialog -m cpanel cpanel
[color:#840017]
; Now use isinCS (case sensitive) instead of isin to check for
; actual mode letters. Also, each of these modes may be set
; at the same time; therefore, use separate if's for each one.
;[/color]
if (t isincs %mode) did -c cpanel 35
if (n isincs %mode) did -c cpanel 36
if (i isincs %mode) did -c cpanel 37
if (m isincs %mode) did -c cpanel 38
if (p isincs %mode) did -c cpanel 39
if (s isincs %mode) did -c cpanel 40
}