All pastes #626718 Raw Edit

Open it !

public text v1 · immutable
·published 2007-07-19 20:58 UTC
rendered paste body
alias stats { 
  var %x $chan(0),%o 0,%h 0,%v 0,%p 0,%t 0 
  while (%x) { 
    if (($me isop $chan(%x)) || ($me ishop $chan(%x))) { 
      inc $+(%,$iif($me isop $chan(%x),o,h)) 1 
      inc %p $nick($chan(%x),0) 
    } 
    elseif ($me isvoice $chan(%x)) { inc %v 1 } 
    inc %t $nick($chan(%x),0) 
    dec %x 1 
  } 
  msg $active 14I am currently on  $chan(0) channels. Of those, I am 7opped 14on  $+(%o,$chr(44)) $+  7halfopped 14on  $+(%h,$chr(44)) $+  and 7voiced 14 on  $+ $+(%v,.) $+ 7I have power over  $+(%p,/,%t) Nubs ^^.
}

menu * { 
  Globan ban:/dialog -m ban ban 
} 
dialog ban { 
  title "Global ban door Arri" 
  size -1 -1 370 200 
  text "Global nick un/ban:", 2, 10 5 250 150 
  edit "", 3, 10 20 250 25 
  text "Reason:", 4, 10 50 250 150 
  edit "", 5, 10 65 250 25 
  button "ban", 6, 270 20 40 25 
  button "ban", 7, 270 115 40 25 
  button "unban", 8, 320 20 40 25 
  button "unban", 9, 320 115 40 25 
  text "Global channel un/ban:", 10, 10 100 250 150 
  edit "#", 11, 10 115 250 25 
  text "Reason:", 12, 10 150 250 150 
  edit "", 13, 10 165 250 25 
} 
on *:dialog:ban:sclick:6: { 
  set %ban.name $did($dname,3) 
  set %ban.reason $did($dname,5) 
  scon -a /gban $did($dname,3) 
  scon -a /amsg 4::: G14lobal banning 4:::14 %ban.name 4::: R14eason 4:::14 %ban.reason 4::: 
  unset %ban.* 
} 
on *:dialog:ban:sclick:8: { 
  set %unban.name $did($dname,3) 
  set %unban.reason $did($dname,5) 
  scon -a /ungban $did($dname,3) 
  scon -a /amsg 4::: G14lobal unbanning 4:::14 %unban.name 4::: R14eason 4:::14 %unban.reason 4::: 
  unset %unban.* 
} 
on *:dialog:ban:sclick:7: { 
  set %chanban.name $did($dname,11) 
  set %chanban.reason $did($dname,13) 
  scon -a /chanban $did($dname,11) 
  scon -a /amsg Global banning • %chanban.name • reason • %chanban.reason 
  unset %chanban.* 
} 
on *:dialog:ban:sclick:9: { 
  set %chanunban.name $did($dname,11) 
  set %chanunban.reason $did($dname,13) 
  scon -a /chanunban $did($dname,11) 
  scon -a /amsg Global unbanning • %chanunban.name • reason • %chanunban.reason 
  unset %chanunban.* 
} 
alias gban { 
  var %c = $chan(0) 
  while (%c >= 1) { 
    mode $chan(%c) +b $address($1,2) 
    dec %c 
  } 
} 
alias ungban { 
  var %c = $chan(0) 
  while (%c >= 1) { 
    mode $chan(%c) -b $address($1,2) 
    dec %c 
  } 
} 
alias chanban { 
  var %c = $chan(0) 
  while (%c >= 1) { 
    mode $chan(%c) +b ~c: $+ $1- 
    dec %c 
  } 
} 
alias chanunban { 
  var %c = $chan(0) 
  while (%c >= 1) { 
    mode $chan(%c) -b ~c: $+ $1- 
    dec %c 
  } 
}



on *:INPUT:#: {
  if ($1 == .eI) && (!$2) {
    mode $chan +eeeIII $address($me,9) $me $address($me,2) $address($me,9) $me $address($me,2)
  } 
  if ($2) && ($1 == .eI) {
    mode $chan +eeeIII $address($2,9) $2 $address($2,2) $address($2,9) $2 $address($2,2)
  }
  if ($1 == .add) || ($1 == .del) || ($1 == .list) {
    cs access $chan $remove($1,.) $2-
  }
  if ($1 == .add) && ($3 isnum) {
    mode $chan $iif($3 == 3,+v)  $iif($3 == 4,+h-v) $iif($3 isnum 5-9,+o-hv) $iif($3 > 9,+ao-hv) $str($2 $+ $chr(32),5)
  }
  if ($left($1,1) == +) || ($left($1,1) == -) {
    $iif($remove($1,-,+) isalpha,mode $chan $eval($1-,2))
  }
  if ($1 == .inv) {
    invite $2 $chan
  }
  if ($1 == .v) {
    mode $chan +v $2
  }
  if ($1 == .k) {
    kick $chan $2-
  }
  if ($1 == .op) {
    mode $chan +o $2
  }
  if ($1 == .kb) {
    mode $chan +b $address($2,2)
    kick $chan $2 $read(kick.txt)
  }
  if ($1 == .unban) {
    mode $chan -b $2
    mode $chan -b $address($2,2)
    /ban -r $chan $2
  }
  if ($1 == .ban) {
    mode $chan +b $address($2,2)
  }
  if ($1 == .deop) {
    mode $chan -o $2
  }
  if ($1 == .topic) {
    msg $chan The topic is: $chan($chan).topic
  }
  if ($1 == .highlight) {
    msg $chan $2 <-- Highlight
    msg $chan $2 <-- Highlight
    msg $chan $2 <-- Highlight
    msg $chan $2 <-- Highlight
    msg $chan $2 <-- Highlight
  }
  if (%rainbowtexton == 1) && ($left($1,1) != /) {
    unset %msgrbw
    var %r1 1
    set %nintext $len($1-) + 1
    while (%r1 < %nintext) {

      set %msgrbw %msgrbw $+  $+ 04 $+ $mid($1-,%r1,1)
      if ($mid($1-,%r1,1) == $chr(32)) { set %msgrbw %msgrbw $chr(32) }
      inc %r1

      set %msgrbw %msgrbw $+  $+ 07 $+ $mid($1-,%r1,1)
      if ($mid($1-,%r1,1) == $chr(32)) { set %msgrbw %msgrbw $chr(32) }
      inc %r1

      set %msgrbw %msgrbw $+  $+ 08 $+ $mid($1-,%r1,1)
      if ($mid($1-,%r1,1) == $chr(32)) { set %msgrbw %msgrbw $chr(32) }
      inc %r1

      set %msgrbw %msgrbw $+  $+ 09 $+ $mid($1-,%r1,1)
      if ($mid($1-,%r1,1) == $chr(32)) { set %msgrbw %msgrbw $chr(32) }
      inc %r1

      set %msgrbw %msgrbw $+  $+ 12 $+ $mid($1-,%r1,1)
      if ($mid($1-,%r1,1) == $chr(32)) { set %msgrbw %msgrbw $chr(32) }
      inc %r1

      set %msgrbw %msgrbw $+  $+ 06 $+ $mid($1-,%r1,1)
      if ($mid($1-,%r1,1) == $chr(32)) { set %msgrbw %msgrbw $chr(32) }
      inc %r1

      set %msgrbw %msgrbw $+  $+ 13 $+ $mid($1-,%r1,1)
      if ($mid($1-,%r1,1) == $chr(32)) { set %msgrbw %msgrbw $chr(32) }
      inc %r1

    }
    say %msgrbw
    unset %msgrbw
    unset %nintext
    halt
  }

  elseif (%rainbowtextandbackgroundon == 1)  && ($left($1,1) != /) {
    unset %msgrbw2
    var %r2 1
    set %nintext2 $len($1-) + 1
    while (%r2 < %nintext2) {

      set %msgrbw2 %msgrbw2 $+  $+ 06,04 $+ $mid($1-,%r2,1)
      if ($mid($1-,%r2,1) == $chr(32)) { set %msgrbw2 %msgrbw2 $chr(32) }
      inc %r2

      set %msgrbw2 %msgrbw2 $+  $+ 13,07 $+ $mid($1-,%r2,1)
      if ($mid($1-,%r2,1) == $chr(32)) { set %msgrbw2 %msgrbw2 $chr(32) }
      inc %r2

      set %msgrbw2 %msgrbw2 $+  $+ 12,08 $+ $mid($1-,%r2,1)
      if ($mid($1-,%r2,1) == $chr(32)) { set %msgrbw2 %msgrbw2 $chr(32) }
      inc %r2

      set %msgrbw2 %msgrbw2 $+  $+ 03,09 $+ $mid($1-,%r2,1)
      if ($mid($1-,%r2,1) == $chr(32)) { set %msgrbw2 %msgrbw2 $chr(32) }
      inc %r2

      set %msgrbw2 %msgrbw2 $+  $+ 08,12 $+ $mid($1-,%r2,1)
      if ($mid($1-,%r2,1) == $chr(32)) { set %msgrbw2 %msgrbw2 $chr(32) }
      inc %r2

      set %msgrbw2 %msgrbw2 $+  $+ 07,13 $+ $mid($1-,%r2,1)
      if ($mid($1-,%r2,1) == $chr(32)) { set %msgrbw2 %msgrbw2 $chr(32) }
      inc %r2

      set %msgrbw2 %msgrbw2 $+  $+ 04,06 $+ $mid($1-,%r2,1)
      if ($mid($1-,%r2,1) == $chr(32)) { set %msgrbw22 %msgrbw2 $chr(32) }
      inc %r2


    }
    say %msgrbw2
    unset %msgrbw2
    unset %nintext2
    haltdef
  }

}

menu channel {
  -
  Rainbow
  .text On:{
    unset %rainbowtextandbackgroundon
    set %rainbowtexton 1
    ;echo -a Rainbow text turned on
  }
  .text + background On:{
    unset %rainbowtexton
    set %rainbowtextandbackgroundon 1
    ;echo -a Rainbow text and background colour turned on
  }
  .Colour Off:{
    unset %rainbowtexton
    unset %rainbowtextandbackgroundon
    ;echo -a Rainbow text, and Rainbow text with background colour turned off
  }