SuperAdmin dialog & Controls

By Gemster on Mar 01, 2010

a simple little Super Admin dialog that lets you set SuperAdmin on or off. it will also tell you if you have super admin turned on or off after you have used it once.

Also there is a button that will open another dialog that has the Super Admin controls like sajoin, sapart, svsnick and samodes.

To add, copy and paste to remotes (alt+r).
To use simple right click in a channel, nicklist, query or status and you will see the new mwnu item called Super Admin.

You also need to be an ircop with super admin privs.

Enjoy
Gemster

alias sa { dialog -m SAdialog SAdialog }

on *:DIALOG:SAdialog:init:0: {
  if (%sa == on) { did -v SAdialog 4,5 }
  elseif (%sa == off) { did -v SAdialog 6 }
  if (%sa == on) { did -c SAdialog 2 }
  elseif (%sa == off)  { did -c SAdialog 3 }
}

dialog SAdialog {
  title "[ Super Admin ]"
  size -1 -1 104 72
  option dbu
  text "Click on a radio button below to set super admins either ON or OFF", 1, 8 8 87 17, center
  radio "ON", 2, 31 32 18 10, left
  radio "OFF", 3, 55 32 18 10, left
  button "SA Menu", 4, 37 57 32 10
  text "Super Admin is ON", 5, 8 47 89 8, hide center
  text "Super Admin is OFF", 6, 8 47 89 8, hide center
}
on *:dialog:SAdialog:sclick:2:{ msg operserv set superadmin on | set %sa on }
on *:dialog:SAdialog:sclick:3:{ msg operserv set superadmin off | set %sa off }
on *:dialog:SAdialog:sclick:4:{ sac }

Alias sac { Dialog -m SACdialog SACdialog }
dialog SACdialog {
  title "[ Super Admin Control ]"
  size -1 -1 129 264
  option dbu
  edit "<nickname here>", 1, 8 8 57 10, autohs
  edit "<#channel here>", 2, 67 8 57 10, autohs
  button "Join", 3, 35 20 30 10
  button "Part", 4, 67 20 30 10
  edit "<nickname here>", 5, 8 40 57 10, autohs
  edit "<new nick here>", 6, 67 40 57 10, autohs
  button "Change Nick", 7, 47 52 37 10
  radio "+", 11, 44 103 17 10
  radio "-", 12, 68 103 17 10
  button "Set", 13, 45 199 37 10
  check "c", 14, 20 119 16 10
  check "i", 15, 20 135 16 10
  check "m", 16, 20 151 16 10
  check "n", 17, 20 167 16 10
  check "p", 18, 20 183 16 10
  check "r", 19, 44 119 16 10
  check "s", 20, 44 135 16 10
  check "t", 21, 44 151 16 10
  check "z", 22, 44 167 16 10
  check "A", 23, 44 183 16 10
  check "C", 24, 68 119 16 10
  check "G", 25, 68 135 16 10
  check "M", 26, 68 151 16 10
  check "K", 27, 68 167 16 10
  check "N", 28, 68 183 16 10
  check "O", 29, 92 119 16 10
  check "Q", 30, 92 135 16 10
  check "R", 31, 92 151 16 10
  check "T", 32, 92 167 16 10
  check "V", 33, 92 183 16 10
  box "Change Channel Mode", 8, 8 69 113 188
  edit "<#channel here>", 9, 36 80 57 10, autohs
  box "Select + or -", 10, 36 93 57 25
  box "Other Modes", 34, 16 213 97 36
  edit "<modes here>", 35, 36 221 57 10, autohs
  button "Set", 36, 45 232 37 10
}
on *:dialog:SACdialog:close:*:{ 
  unset %samode %samode1
} 
on *:dialog:SACdialog:sclick:14-33:{ 
  $iif($did($did).state,set %samode $addtokcs(%samode,$did($did),32),set %samode $remtokcs(%samode,$did($did),1,32)) 
} 
on *:dialog:SACdialog:sclick:11,12:{ 
  $iif($did($did).state,set %samode1 $did($did)) 
} 
on *:dialog:SACdialog:sclick:13:{ if (%samode1 == $null) { noop $input(Please select + or - radio button.,uhdo,Something Missing) }
  else { samode $did(9) %samode1 $+ $remove(%samode,$chr(32)) }
}
on *:dialog:SACdialog:sclick:36:{ samode $did(9) $did(35) }
on *:dialog:SACdialog:sclick:3:{ sajoin $did(1) $did(2) }
on *:dialog:SACdialog:sclick:4:{ sapart $did(1) $did(2) }
on *:dialog:SACdialog:sclick:7:{ operserv svsnick $did(5) $did(6) }

menu channel,menubar,query,status,nicklist {
  $iif(o isin $usermode,Super Admin):/sa 
}

Comments

Sign in to comment.
Are you sure you want to unfollow this person?
Are you sure you want to delete this?
Click "Unsubscribe" to stop receiving notices pertaining to this post.
Click "Subscribe" to resume notices pertaining to this post.