All pastes #591413 Raw Edit

Someone

public text v1 · immutable
#591413 ·published 2007-06-27 06:05 UTC
rendered paste body
;;;;;;;;;;;;;;;;;;;;;; YOUR COLOUR THEME CHANGE PLEASE

;query skin part 1
alias qs1 {
  return 07,15›
}
;query skin part 2
alias qs2 {
  return 08›
}
; main text colour
alias qt1 {
  return 07 $+ $1- $+ 
}
; information colour text
alias qt2 {
  return 01 $+ $1- $+ 
}


;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;
;; SurrealHostin Staff Script
;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;
alias -l forceremove {
  .mode #sSupport -v %help
  .ban -u3600 #sSupport %help 2
  .kick #sSupport %help (1Hour Ban) I have been forced to remove you from #sSupport.
  .unset %help
  .unset %help.pm.warn
}
menu channel {
  Fun Things
  .Channels I Am In:/chanimin
  .Power:/power
}
menu nicklist {
  $iif($chan == #sSupport,$chan)
  .Start Help:/say Welcome  $+ $snick(#) $+  to the SurrealHosting Support Channel, How may I help you (Do Not PM me as I will ignore it) | set %help $snick(#) | /mode $chan +v $snick(#)
  .Force Leave:/say  $+ %help $+ , if that is all Please /part $chan $+  or I will be forced to remove you. | .timer 1 10 forceremove
  .Idle Warning:/say  $+ %help $+ , this is your first and last warning. If there is nothing else you need regarding SurrealHosting Please /part #sSupport
}

on ^*:text:*:#sSupport:{
  if (%help == $nick) {
    haltdef
    echo $chan $timestamp <4 $+ $iif($nick isop $chan,@,+) $+ $nick $+ 1> $1- 
  }
}
on ^*:part:#sSupport:{
  if (%help == $nick) {
    unset %help
  }
}
on ^*:quit:{
  if (%help == $nick) {
    unset %help
  }
}
on ^*:kick:#sSupport:{
  if (%help == $knick) {
    unset %help
  }
}
on ^*:join:#sSupport:{
  echo -a $timestamp $nick ( $address($nick,2) ) has joined #sSupport. Please attend to him!
}
ctcp ^*:*:*:{
  if ($1 == VERSION) {
    ctcpreply $nick $1 #sSupport Helper Script made by #cBots aka coNNect 
  }
}
on *:connect: { /timestamp -f (hh:nn:ss TT) }

;;;;;;;;;;;;;;;;;;;;
; query side
;;;;;;;;;;;;;;;;;;;;

on *:OPEN:?:{
  if ($me ison #sSupport) {
    if ($nick == %help) && ((%help.pm.warn == 0) || (%help.pm.warn == $null)) {
      msg #sSupport  $+ %help $+ , Please do not PM me, next time ill be forced to remove you.
      set %help.pm.warn 1
    }
    if ($nick == %help) && (%help.pm.warn == 1) {
      forceremove
    }
  }
  var %x 1 
  while (%x <= $comchan($nick,0)) {
    set %cc %cc $comchan($nick,%x) $+ ,
    inc %x
  }
  set %pm.nick $nick 
  set %pm.message $1- 
  msg $nick $qs1 $+ $qs2 $qt1(Idle For) $qt2($duration($idle)) $qt1(Queries Open) $qt2($query(0)) $qs2 $+ $qs1
  msg $nick $qs1 $+ $qs2 $qt1(I see you in) $qt2($iif(%cc == $null,no channels of mine.,$left(%cc,-1)) $+ .) ( $+ $qt2( $+ $comchan($nick,0) $+ / $+ $chan(N) $+  ~ $calc(($comchan($nick,0) / $chan(N)) * 100) $+ %) $+ ) $qs2 $+ $qs1
  unset %cc
  dialog -m evasionpm $+ $nick evasionpm $+ $nick
}
dialog evasionpm* {
  title "coNNect's Evasion PM System"
  size -1 -1 112 62
  option dbu
  box "", 1, 2 0 108 60
  edit "", 2, 5 7 100 20, read autovs
  button "Accept", 3, 12 30 37 12
  button "Deny", 4, 63 30 37 12
  button "Temp Ignore", 5, 12 45 37 12
  button "Perm Ignore", 6, 63 45 37 12
  pmc
}
on *:dialog:evasionpm*:sclick:*:{
  if ($did == 3) {
    msg $did(1) $qs1 $+ $qs2 $qt1(Your query has been:) $qt2(Accepted!) $qs2 $+ $qs1
    dialog -x evasionpm $+ $did(1) evasionpm $+ $did(1)
  }
  if ($did == 4) {
    msg $did(1) $qs1 $+ $qs2 $qt1(Your query has been:) $qt2(Denied!) $qs2 $+ $qs1
    close -m $did(1)
    dialog -x evasionpm $+ $did(1) evasionpm $+ $did(1)
  }
  if ($did == 5) {
    msg $did(1) $qs1 $+ $qs2 $qt1(Your query has been:) $qt2(Ignored for 60 Seconds!) $qs2 $+ $qs1
    ignore -pu60 %pm.nick 2
    close -m $did(1)
    dialog -x evasionpm $+ $did(1) evasionpm $+ $did(1)
  }
  if ($did == 6) {
    var %ignorereason $$?="What is your reason for permanently ignoring $did(1) $+ ?"
    msg $did(1) $qs1 $+ $qs2 $qt1(All of your future messages are now ignored Reason:!) $qt2(%ignorereason) $qs2 $+ $qs1
    ignore -p %pm.nick 2
    close -m $did(1)
    dialog -x evasionpm $+ $did(1) evasionpm $+ $did(1)
  }
}

on *:dialog:evasionpm*:init:*:{
  did -ra evasionpm $+ %pm.nick 1 %pm.nick
  did -ra evasionpm $+ %pm.nick 2 $strip(%pm.message,bmurc)
}

;;;;;;;;;;;;;;;;;;;;;
;;; channel
;;;;;;;;;;;;;;;;;;;;;

alias chanimin {
  var %i 1
  while (%i <= $chan(N)) {
    if ($me isop $chan(%i)) {
      set %chanimin $chan(%i) $+ (op), %chanimin
    }
    elseif ($me isvoice $chan(%i)) {
      set %chanimin $chan(%i) $+ (voice), %chanimin
    }
    elseif ($me isreg $chan(%i)) {
      set %chanimin $chan(%i) $+ (regular), %chanimin
    }
    inc %i
  }
  msg $active %chanimin
  unset %chanimin
}
alias power {
  set %oc.a $comchan($me,0)
  set %oc.d 1
  while (%oc.d <= %oc.a) {
    if ($comchan($me,%oc.d).op == $true) { 
      inc %oc.ops 
      inc %oc.power $calc($nick($comchan($me,%oc.d),0)-1)
    }
    if (%oc.d == %oc.a) { 
      if ($comchan($me,%oc.d).op == $true) { 
        inc %oc.ops  
        inc %oc.power $calc($nick($comchan($me,%oc.d),0)-1)
        inc %oc.nicks $nick($comchan($me,%oc.d),0)
      }
    }
    if ($comchan($me,%oc.d).voice == $true) { 
      inc %oc.voice
    }
    if (%oc.d == %oc.a) { 
      if ($comchan($me,%oc.d).voice == $true) { 
        inc %oc.voice
      } 
    }
    inc %oc.nicks $nick($comchan($me,%oc.d),0)
    inc %oc.d 
  }
  /msg $active $qt1(I'm voiced on) $qt2(( $+ %oc.voice $+ / $+ %oc.a ~ $calc((%oc.voice / %oc.a) * 100) $+ % $+ )) $qt1(I'm opped on) $qt2(( $+ %oc.ops $+ / $+ %oc.a ~ $ceil($calc((%oc.ops / %oc.a) * 100)) $+ $chr(37) $+ ) channels.) -=- $qt1(I have power over) $qt2(( $+ %oc.power $+ / $+ %oc.nicks ~ $ceil($calc((%oc.power / %oc.nicks) * 100)) $+ $chr(37) $+ ) users.)
  /unset %oc.*
}