Easy way too add mods (ChanServ)

By FRISH on Aug 24, 2007

Hi this is a dialog that helps you add mods too your channel, helps to people that cant remember the codes or if ya lazy :P. Supports xop and access levels.

Just put this into your remotes section (Alt+R)

Then right click on the screen and click "Add/del mods"

To add/remove a mod you just need to include:
The name of the person you want (it'll list in a combobox all of the nicks in your active channel if you want any of those)
The level from a drop down to temporary or permantly add the name (if access level you need to type the number)
And the channel to add them as mod (can choose from a drop-down list of all channels you're on or enter it manually)

There is also a register and identify tab to register or identify yourself and/or channels.

Screenshot:
Image

;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;
;;  Easy way to add mods especially when ya cant  ;;
;;    remember the commands (made by FRISH)       ;;
;;      Ya rip this ya die :P... no really        ;;
;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;
menu channel {
  -
  Add/del mods:{
    dialog -am csmod csmod
  }
  -
}

dialog csmod {
  ;, $did, xlocation ylocation length height
  Title "Adding/removing mods (CS)"
  Size -1 -1 400 400
  Tab "XOP (default mod mode)", 1, 0 0 399 399
  Tab "Access", 2, 0 0 399 399
  Tab "Registering", 3, 0 0 399 399

  text "This is the default mod system on chanserv", 4, 87 30 200 15, tab1 
  box "", 5, 4 50 387 35, tab1
  text "Name of mod you want to add/del:", 6, 10 60 190 15, tab1 
  combo 7, 180 60 205 18, sort edit drop vsbar tab1 
  box "", 8, 4 110 387 85, tab1
  text "Level you want to PERMANENTLY add/del them:", 9, 10 120 380 15, tab1 
  combo 10, 350 120 35 18, drop tab1 
  text "OR", 11, 185 144 15 15, tab1 
  text "Level you want to TEMPORARY add/del them:", 12, 10 170 380 15, tab1 
  combo 13, 350 170 35 18, drop tab1
  box "", 14, 4 215 387 35, tab1
  text "Channel to add/del mod:", 15, 10 225 120 15, tab1 
  combo 16, 130 225 200 18, sort edit drop vsbar tab1
  button "Add mod", 17, 30 255 100 25, tab1
  button "Remove mod", 18, 250 255 100 25, tab1
  button "Turn XOP On", 19, 165 320 75 20, tab1
  button "List all mods in status window", 20, 100 350 200 20, tab1

  text "This is the alternate mod system on chanserv, you can set multiple owners on", 30, 10 25 380 15, tab2 
  text "this system", 31, 10 41 250 15, tab2 
  box "", 32, 4 55 387 35, tab2
  text "Name of mod you want to add/del:", 33, 10 65 190 15, tab2
  combo 34, 180 65 205 18, sort edit drop vsbar tab2
  box "", 355, 4 110 387 90, tab2
  text "Access level you want to permanently add/del them (number 1-10+):", 35, 10 120 380 15, tab2 
  text "Access level 9999= owner, <-1= auto kicked from channel", 36, 10 136 380 15, tab2 
  edit "", 37, 345 120 40 18, tab2 
  text "OR", 38, 185 155 15 15, tab2 
  text "Level you want to TEMPORARY add/del them:", 39, 10 175 380 15, tab2 
  combo 40, 350 175 35 18, drop tab2
  box "", 41, 4 215 387 35, tab2
  text "Channel to add/del mod:", 42, 10 225 120 15, tab2 
  combo 43, 130 225 200 18, sort edit drop vsbar tab2
  button "Add mod", 44, 30 255 100 25, tab2
  button "Remove mod", 45, 250 255 100 25, tab2
  button "Turn XOP Off", 46, 165 310 75 20, tab2
  text "This will let you be able to use access levels", 47, 97 330 220 15, tab2
  button "List all mods in status window", 48, 100 360 200 20, tab2

  text "This helps register nicks and channels", 60, 110 27 250 15, tab3 
  box "Register nick", 61, 4 50 389 63, tab3
  text "Password:", 62, 10 70 70 15, tab3
  edit "", 63, 65 70 160 18, tab3
  text "Email:", 64, 10 90 70 15, tab3
  edit "", 65, 65 90 225 18, tab3
  button "Register", 66, 295 70 90 30, tab3
  box "Register Channel", 67, 4 120 389 87, tab3
  text "Channel:", 68, 10 140 70 15, tab3
  combo 69, 70 140 160 18, sort edit drop vsbar tab3
  text "Password:", 70, 10 163 70 15, tab3
  edit "", 71, 70 163 160 18, tab3
  text "Description:", 72, 10 183 80 15, tab3
  edit "", 73, 70 183 300 18, tab3
  button "Register", 74, 270 140 90 30, tab3
  box "Identify nick (nickserv)", 75, 4 215 389 45, tab3
  text "Password:", 76, 10 235 70 15, tab3
  edit "", 77, 70 235 160 18, tab3
  button "Identify", 78, 270 230 90 25, tab3
  box "Identify nick as owner of channel (chanserv)", 79, 4 270 387 60, tab3
  text "Channel:", 80, 10 285 70 15, tab3
  combo 81, 70 285 160 18, sort edit drop vsbar tab3
  text "Password:", 82, 10 308 70 15, tab3
  edit "", 83, 70 308 160 18, tab3
  button "Identify", 84, 270 285 90 30, tab3
}

on *:dialog:csmod:init:*: {
  did -a $dname 10,13,40,16,43,69,81,7,34
  did -a $dname 13 ~
  did -a $dname 10,13,40 &
  did -a $dname 10,13,40 @
  did -a $dname 10,13,40 %
  did -a $dname 10,13,40 +

  var %Allnicks $nick($active,0)
  while (%Allnicks > 0) {
    did -a $dname 7,34 $nick($active,%Allnicks)
    dec %Allnicks
  }
  var %Allchans $chan(0)
  while (%Allchans > 0) {
    did -a $dname 16,43,69,81 $chan(%Allchans)
    dec %Allchans
  }
}

on *:dialog:csmod:*:*: {
  if ($devent == sclick) {

    ;;;;XOP mod system;;;;

    if ($did == 17) {
      if (!$did(7)) { echo 4 -a Add the name of the mod you want to add }
      elseif (!$did(10) && !$did(13)) { echo 4 -a Add the level of the mod you want to add }
      elseif (!$did(16)) { echo 4 -a Please fill in a channel to add the mod" }
      else {
        if ($did(10)) {
          if ($did(10) == &) { 
            cs sop $did(16) add $did(7)
            mode $did(16) +a $did(7)
            echo 9 -a Check status window to see if $did(7) was added to sop list (&) on $did(16)
          }
          elseif ($did(10) == @) { 
            cs aop $did(16) add $did(7)
            mode $did(16) +o $did(7)
            echo 9 -a Check status window to see if $did(7) was added to aop list (@) on $did(16)
          }
          elseif ($did(10) == %) { 
            cs hop $did(16) add $did(7)
            mode $did(16) +h $did(7)
            echo 9 -a Check status window to see if $did(7) was added to hop list (%) on $did(16)
          }
          elseif ($did(10) == +) { 
            cs vop $did(16) add $did(7)
            mode $did(16) +v $did(7)
            echo 9 -a Check status window to see if $did(7) was added to vop list (+) on $did(16)
          }
        }

        elseif ($did(13)) {
          if ($did(13) == ~) { 
            mode $did(16) +q $did(7)
            echo 9 -a Check $did(16) to see if $did(7) is ~, If not check status window
          }
          elseif ($did(13) == &) { 
            mode $did(16) +a $did(7)
            echo 9 -a Check $did(16) to see if $did(7) is &, If not check status window
          }
          elseif ($did(13) == @) { 
            mode $did(16) +o $did(7)
            echo 9 -a Check $did(16) to see if $did(7) is @, If not check status window
          }
          elseif ($did(13) == %) { 
            mode $did(16) +h $did(7)
            echo 9 -a Check $did(16) to see if $did(7) is %, If not check status window
          }
          elseif ($did(13) == +) { 
            mode $did(16) +v $did(7)
            echo 9 -a Check $did(16) to see if $did(7) is +, If not check status window
          }
        }

      }
    }
    if ($did == 18) {
      if (!$did(7)) { echo 4 -a Add the name of the mod you want to remove }
      elseif (!$did(10) && !$did(13)) { echo 4 -a Add the level of the mod you want to remove }
      elseif (!$did(16)) { echo 4 -a Please fill in a channel to remove the mod" }
      else {
        if ($did(10)) {
          if ($did(10) == &) { 
            cs sop $did(16) del $did(7)
            mode $did(16) -a $did(7)
            echo 9 -a Check status window to see if $did(7) was removed from the sop list (&) on $did(16)
          }
          elseif ($did(10) == @) { 
            cs aop $did(16) del $did(7)
            mode $did(16) -o $did(7)
            echo 9 -a Check status window to see if $did(7) was removed from the aop list (@) on $did(16)
          }
          elseif ($did(10) == %) { 
            cs hop $did(16) del $did(7)
            mode $did(16) -h $did(7)
            echo 9 -a Check status window to see if $did(7) was removed to hop list (%) on $did(16)
          }
          elseif ($did(10) == +) { 
            cs vop $did(16) del $did(7)
            mode $did(16) -v $did(7)
            echo 9 -a Check status window to see if $did(7) was removed from the vop list (+) on $did(16)
          }
        }

        elseif ($did(13)) {
          if ($did(13) == ~) { 
            mode $did(16) -q $did(7)
            echo 9 -a Check $did(16) to see if $did(7) isn't ~ anymore, If not check status window
          }
          elseif ($did(13) == &) { 
            mode $did(16) -a $did(7)
            echo 9 -a Check $did(16) to see if $did(7) isn't & anymore, If not check status window
          }
          elseif ($did(13) == @) { 
            mode $did(16) -o $did(7)
            echo 9 -a Check $did(16) to see if $did(7) isn't @ anymore, If not check status window
          }
          elseif ($did(13) == %) { 
            mode $did(16) -h $did(7)
            echo 9 -a Check $did(16) to see if $did(7) isn't % anymore, If not check status window
          }
          elseif ($did(13) == +) { 
            mode $did(16) -v $did(7)
            echo 9 -a Check $did(16) to see if $did(7) isn't + anymore, If not check status window
          }
        }

      }
    }

    if ($did == 19) {
      if (!$did(16)) { echo 4 -a Please fill in a channel to set xop on next to "Channel to add/del mod:" }
      else {
        cs set $did(16) xop on
        echo 9 -a Check status window to see if XOP is turned on for $did(16)
      }
    }
    if ($did == 20) {
      if (!$did(16)) { echo 4 -a Please fill in a channel to list all mods next to "Channel to add/del mod:" }
      else {
        cs sop $did(16) list
        cs aop $did(16) list
        cs hop $did(16) list
        cs vop $did(16) list
        echo 9 -a Check status window to see all mods for $did(43)
      }
    }

    ;;;;ACCESS mod system;;;;

    if ($did == 44) {
      if (!$did(34)) { echo 4 -a Add the name of the mod you want to add }
      elseif (!$did(37) && !$did(40)) { echo 4 -a Add the level of the mod you want to add }
      elseif (!$did(43)) { echo 4 -a Please fill in a channel to add the mod" }

      else {
        if ($did(37)) && ($did(37) isnum -9999-9999) {
          cs access $did(43) add $did(34) $did(37)
        }
        if ($did(37) !isnum -9999-9999) && (!$did(40)) { echo 4 -a Make the access level for the mod you want to add a number between -9999 and 9999, (1-10 being normal mod levels) }
        if ($did(37) == 3) { mode $did(43) +v $did(34) }
        if ($did(37) == 4) { mode $did(43) +h $did(34) }
        if ($did(37) isnum 5-9) { mode $did(43) +o $did(34) }
        if ($did(37) isnum 10-9998) { mode $did(43) +a $did(34) }
        if ($did(37) == 9999) { mode $did(43) +q $did(34) }

        elseif ($did(40)) {
          if ($did(40) == ~) { 
            mode $did(43) +q $did(34)
            echo 9 -a Check $did(43) to see if $did(34) is ~, If not check status window
          }
          elseif ($did(40) == &) { 
            mode $did(43) +a $did(34)
            echo 9 -a Check $did(43) to see if $did(34) is &, If not check status window
          }
          elseif ($did(40) == @) { 
            mode $did(43) +o $did(34)
            echo 9 -a Check $did(43) to see if $did(34) is @, If not check status window
          }
          elseif ($did(40) == %) { 
            mode $did(43) +h $did(34)
            echo 9 -a Check $did(43) to see if $did(34) is %, If not check status window
          }
          elseif ($did(40) == +) { 
            mode $did(43) +v $did(34)
            echo 9 -a Check $did(43) to see if $did(34) is +, If not check status window
          }

        }
      }
    }

    if ($did == 45) {
      if (!$did(34)) { echo 4 -a Add the name of the mod you want to remove }
      elseif (!$did(43)) { echo 4 -a Please fill in a channel to remove the mod" }

      else {
        if ($did(37)) && ($did(37) isnum -9999-9999) {
          cs access $did(43) del $did(34)
        }
        if ($did(37) !isnum -9999-9999) && (!$did(40)) { echo 4 -a Make the access level for the mod you want to add a number between -9999 and 9999, (1-10 being normal mod levels) }
        if ($did(37) == 3) { mode $did(43) -v $did(34) }
        if ($did(37) == 4) { mode $did(43) -h $did(34) }
        if ($did(37) isnum 5-9) { mode $did(43) -o $did(34) }
        if ($did(37) isnum 10-9998) { mode $did(43) -a $did(34) }
        if ($did(37) == 9999) { mode $did(43) -q $did(34) }

        elseif ($did(40)) {
          if ($did(40) == ~) { 
            mode $did(43) -q $did(34)
            echo 9 -a Check $did(43) to see if $did(34) isn't ~ anymore, If not check status window
          }
          elseif ($did(40) == &) { 
            mode $did(43) -a $did(34)
            echo 9 -a Check $did(43) to see if $did(34) isn't & anymore, If not check status window
          }
          elseif ($did(40) == @) { 
            mode $did(43) -o $did(34)
            echo 9 -a Check $did(43) to see if $did(34) isn't @ anymore, If not check status window
          }
          elseif ($did(40) == %) { 
            mode $did(43) -h $did(34)
            echo 9 -a Check $did(43) to see if $did(34) isn't % anymore, If not check status window
          }
          elseif ($did(40) == +) { 
            mode $did(43) -v $did(34)
            echo 9 -a Check $did(43) to see if $did(34) isn't + anymore, If not check status window
          }
          else { echo 4 -a Unknown mod level, use (~,&,@,%,+) }
        }
      }
    }

    if ($did == 46) {
      if (!$did(43)) { echo 4 -a Please fill in a channel to set xop off next to "Channel to add/del mod:" }
      else {
        cs set $did(43) xop off
        echo 9 -a Check status window to see if XOP is turned off for $did(43)
      }
    }
    if ($did == 48) {
      if (!$did(43)) { echo 4 -a Please fill in a channel to list all mods next to "Channel to add/del mod:" }
      else {
        cs access $did(43) list
        echo 9 -a Check status window to see all mods for $did(43)
      }
    }

    ;;;;REGISTER;;;;

    if ($did == 66) {
      if (!$did(63)) { echo 4 -a Enter in a password }
      elseif (!$did(65)) { echo 4 -a Enter in an email address }
      else {
        ns register $did(63) $did(65)
        echo 9 -a Check status window to see if your nick registered correctly
      }
    }
    if ($did == 74) {
      if (!$did(69)) { echo 4 -a Enter in the channel you want to register }
      elseif (!$did(71)) { echo 4 -a Enter in a password for the channel }
      elseif (!$did(73)) { echo 4 -a Enter in a channel description }
      else {
        cs register  $did(69) $did(71) $did(73)
        echo 9 -a Check status window to see if your channel registered correctly
      }
    }
    if ($did == 78) {
      if (!$did(77)) { echo 4 -a Enter in your password }
      else {
        ns id $did(77)
        echo 9 -a Check status window to see if you're identified
      }
    }
    if ($did == 84) {
      if (!$did(81)) { echo 4 -a Enter in the channel you want to identify yourself as owner }
      elseif (!$did(83)) { echo 4 -a Enter in the channel password }
      else {
        cs id $did(81) $did(83)
        echo 9 -a Check status window to see if you're identified as owner
      }
    }

  }
}

Comments

Sign in to comment.
WillK1llin   -  Apr 14, 2009

beast

 Respond  
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.