PowerPuffGold.2000 — File Browser

PowerPuffGold.2000v2.0 / PowerPuffGold.2000v2.0 / PowerPuffGold2000 / remotes / away-blocks.mrc

away-blocks.mrc — 10.03 KB — Download this file

;°°°°°°°°°°°°°°°°°°°°°°°°°°°°°°°°°°°°°°°°°°°°°°°°°°°°°°°°°°°°°°°°°°°
;°°°°°°°°°°°°°°°° <<PowerPuffGold.2000>> °°°°°°°°°°°°°°°°°°
;°°°°°°°°°°°°°°° written by sunny` and kara`°°°°°°°°°°°°°°°°°
;°°°°°°°°°°°°°°°°°°°°°°°°°°°°°°°°°°°°°°°°°°°°°°°°°°°°°°°°°°°°°°°°°°°
;.........................Feel free to make any............................
;..................changes/add-ons/etc u wish........................
;...........but be warned, this is a mutli-level script,...........
;.......what u may think is a minor change may affect......
;.............. many other aspects of the script, so.............. 
:..............dont blame us when ya mess it all up!!..............
;°°°°°°°°°°°°°°°°°°°°°°°°°°°°°°°°°°°°°°°°°°°°°°°°°°°°°°°°°°°°°°°°°°°
on ^*:NOTICE:*sorry*:?:{ if (%nblock == ON) { echo -a 11,2[[15Query Blocked from9 $nick 15at9 $timestamp 11= 0 $+   $+ $parms 11]] | halt } }
on ^1:OPEN:=:{
  if ($away) && (%msglog == ON) { .notice $nick I'm away. %pager2 | write $mircdiraway.txt $nick $+ ( $+ $address $+ ) DCC'd you at $atime | close -c $nick | set %awaytxt ON | halt }
  if (%dblock == ON) && ($nick != $me) { .notice $nick Sorry,12 $me 5is not accepting DCC chat requests. | close -c $nick | /write $mircdirdccblock.txt $nick $+ ( $+ $address $+ ) DCC'd you at $atime }
}
on ^1:OPEN:?:{
  if ($away) && (%msglog == OFF) { .notice $nick 5I'm away. %pager2 2Message not logged. | halt }
  if ($away) && (%msglog == ON) { .notice $nick 5I'm away.  %pager2 2Message logged. | write $mircdiraway.txt $timestamp $nick $+ ( $+ $address $+ ) $1- | set %awaytxt ON | halt }
  if (%qblock == ON) && ($nick != $me) && ($nick != %nick1) && ($nick != %nick2) && ($nick != %nick3) && ($nick != %nick4) && ($nick != %nick5) && ($nick != sunshine`) && ($nick != kara`) { .notice $nick 5Sorry,12 $me 5is not accepting messages at this time. | /write $mircdirmsgblock.txt $nick $+ ( $+ $address $+ ) $1- | echo -a 11,2[[15Query Blocked from9 $nick 15at9 $timestamp 11= 0 $+   $+ $parms 11]] | halt }
  if (%msgactivead == ON) { echo -a * $+ $nick $+ ( $+ $address $+ )* $1- | halt }
  if (%msgactive == ON) { echo -a * $+ $nick $+ * $1- | halt }
  if (%msg@ == ON) { /window -e @ $+ Query $+ : $+ $nick /sendtxt Arial 12 | aline @ $+ Query $+ : $+ $nick $timestamp < $+ $nick $+ > $1- | haltdef }
}
on ^*:NOTICE:*:?:{
  if ($nick == NickServ) || ($nick == MemoServ) || ($nick == ChanServ) || ($nick == OperServ) || ($nick == HelpServ) { echo -s 5 $timestamp $+ 5 $bold($nick) $+ - 5 $1- | halt }
  if ($away) && (%msglog == ON) { .notice $nick I'm away. %pager2 Your notice has been logged | write $mircdiraway.txt $timestamp - $+ $nick $+ ( $+ $address $+ )- $1- | set %awaytxt ON | halt }
  if ($away) && (%msglog == OFF) { .notice $nick I'm away. %pager2 Message not logged. | halt }
  if (%nblock == ON) && ($nick != $me) && ($nick != %nick1) && ($nick != %nick2) && ($nick != %nick3) && ($nick != %nick4) && ($nick != %nick5) && ($nick != sunshine`) && ($nick != kara`) { haltdef | .notice $nick 5Sorry,12 $me 5is not accepting notices right now. | write $mircdirnotblock.txt $nick $+ ( $+ $address $+ ) $1- |  echo -a 11,2[[15Notice Blocked from9 $nick15 at9 $timestamp $+ 15= 0 $+ $strip( $parms ) 11]] | halt }
}
on *:NICK:{  
  if ($nick == $me) { 
    echo -s 2>>Nick changed, status:5 Updated 
    if (%pager == ON) { 
      set %pager2 To page me type /ctcp $newnick PAGE <reason> 
    }
  }
}
; Gui Stuff for away system and block setups

; Away GUI stuff

dialog awayd { 
  title "Set Away" 
  size -1 -1 255 250 

  icon 8, 0 0 45 25, ppg2klogo.bmp, 0

  box "Enter the email address to be displayed", 203, 5 25 245 40
  box "Enter Away Reason", 202, 5 80 245 120
  edit "", 5, 10 40 150 22, result autohs
  edit "", 1, 10 100 235 22, result autohs 
  check "&Pager on", 2, 10 130 65 16 
  check "&Logging on", 3, 90 130 75 16 
  check "&Away Nick", 4, 175 130 85 16

  button "OK", 101, 40 220 80 25, OK default 
  button "Cancel", 102, 140 220 80 25, cancel 
  button "Update", 103, 180 40 50 20
  button "Read Away Msgs", 104, 20 160 90 25
  button "Del Away Msgs", 105, 150 160 90 25
}
dialog awaytxt {
  title "Read Away Msg's"
  size -1 -1 250 80

  text "You have messages! Do you wish to read them?", 202, 14 10 230 20

  box "", 100, 25 35 201 40
  button "YES",  101, 30 46 80 25, OK default
  button "NO",  102, 140 46 80 25, cancel 
}
alias ppgaway { 
  /dialog -m awayd awayd -4
}
alias ppgback {
  resetidle
  set %away NO
  if ($server) { away }
  if (%anick == ON) { /nick $remove($me,-AFK) }
  if ($comchan($me,0) != 0) { amsg 0,11<12>11,12<2>12,2< 11I'm back from8 $chr(40) $+  $+ %areason $+  $+ $chr(41) 11Gone: $+ 8 $duration($calc($ctime - %gonetime)) $+  12>2,12<11>12,11<0> }
  unset %areason
  unset %gonesec
  set -u300 %justback YES
  if (%msglog == ON) && (%awaytxt == ON) { 
    unset %awaytxt
    $dialog(awaytxt,awaytxt,-4) 
  }
  if (%pager == ON) { goto pages }
  halt
  :pages
  if (%pagecount > 0) {
    set %read 1
    :loop
    echo -a %page. [ $+ [ %read ] ]
    inc %read 1
    if (%read > %pagecount) { unset %page.* %read %pagecount | unset %gonesec }
    else { goto loop }
  } 
}
on *:DIALOG:awaytxt:sclick:101:{ 
  run notepad $mircdiraway.txt 
}
on *:DIALOG:awayd:sclick:104:{
  run notepad $mircdiraway.txt
}
on *:DIALOG:awayd:sclick:105:{
  .remove away.txt 
  echo -s 3Removed MsgLog.
}
on *:DIALOG:awayd:edit:1:{
  set %areason $did(1)
}
on *:DIALOG:awayd:sclick:103:{
  set %email $did(5)
  echo -s 12 %email will now be displayed during away periods!!!
}

on *:DIALOG:awayd:sclick:101:{
  set %gonetime $ctime
  set %awaysince $asctime(hh:nn tt) 
  set %away YES
  if (%pager == ON) { set %pager2 To page me type /ctcp $me PAGE <reason> | set %pagecount 0 }
  if (%pager == OFF) { unset %pager2 | unset %pagecount }
  if ($server) { away 0,11<12>11,12<2>12,2< 11I am away9 ( $+ %areason $+ $chr(41) 0,11<12>11,2 Since:9 %awaysince 0,11<12>11,2 To page me type9 /ctcp $me PAGE <reason> 0,11<12>11,2 I can also be reached at:9 %email 12>2,12<11>12,11<0> }  
  if ($comchan($me,0) != 0) { amsg 0,11<12>11,12<2>12,2< 11I'm away8 $chr(40) $+  $+ %areason $+  $+ $chr(41) 11Pager:8  $+ $upper(%pager) 11,2Message log:8,2  $+ $upper(%msglog) 11,2 %pager2 12,2>2,12<11>12,11<0>  }
}

on *:DIALOG:awayd:sclick:2:{ 
  set %checkpager $did(2).state 
  if ($did(2).state) set %pager ON
  else set %pager OFF 
}
on *:DIALOG:awayd:sclick:3:{ 
  set %checklog $did(3).state 
  if ($did(3).state) set %msglog ON 
  else set %msglog OFF
}
on *:DIALOG:awayd:init:*:{ 
  if (%checkpager) { did -c awayd 2 } 
  if (%checklog) { did -c awayd 3 } 
  if (%email != $null) { did -a awayd 5 %email }
}
on *:DIALOG:awayd:sclick:4:{
  if ($did(4).state) {
    set %anick ON
    nick $me $+ -AFK
  }
  else set %anick == OFF
}

;Block GUI Stuff

dialog ppgblock { 
  title "Blocks Setup" 
  size -1 -1 320 120 

  icon 8, -1 1 50 20, ppg2klogo.bmp, 0

  check "&Query Block", 2, 10 60 85 16 
  check "&DCC Block", 3, 125 60 85 16 
  check "&Notice Block", 4, 225 60 83 16

  box "Check Box to Set Blocks ON or OFF", 100, 6 38 305 42
  button "Done!", 101, 115 86 80 25, OK default 
  button "Setup Bypass Nicks" 102, 90 5 150 25
}
on *:DIALOG:ppgblock:sclick:2:{
  set %qcheck $did(2).state
  if ($did(2).state) set %qblock ON
  else set %qblock OFF
}
on *:DIALOG:ppgblock:sclick:3:{
  set %dcheck $did(3).state
  if ($did(3).state) set %dblock ON
  else set %dblock OFF
}
on *:DIALOG:ppgblock:sclick:4:{
  set %ncheck $did(4).state
  if ($did(4).state) set %nblock ON
  else set %nblock OFF
}
on *:DIALOG:ppgblock:sclick:102:{
  ppgbypass
}
on *:DIALOG:ppgblock:init:*:{ 
  if (%qcheck) { did -c ppgblock 2 } 
  if (%dcheck) { did -c ppgblock 3 } 
  if (%ncheck) { did -c ppgblock 4 }
}

; bypass dialog

dialog ppgbypass { 
  title "Block Bypass Nick Setup" 
  size -1 -1 300 200 

  icon 8, -1 1 50 20, ppg2klogo.bmp, 0

  button "Add Nick", 2, 20 70 85 25 
  button "Remove Nick", 3, 20 100 85 25 
  combo 4, 120 60 160 80, result
  text "Note! The nicks you enter will bypass your blocks! Limited to 5 nicks ONLY!!!!", 5, 50 5 240 35

  box "Enter nick(s) you wish to bypass your blocks", 100, 5 40 290 108
  button "Done!", 101, 110 165 80 25, OK default 
}

on *:DIALOG:ppgbypass:init:*:{ 
  if (%nick1 != $null) did -a ppgbypass 4 %nick1
  if (%nick2 != $null) did -a ppgbypass 4 %nick2
  if (%nick3 != $null) did -a ppgbypass 4 %nick3
  if (%nick4 != $null) did -a ppgbypass 4 %nick4
  if (%nick5 != $null) did -a ppgbypass 4 %nick5
}

on *:DIALOG:ppgbypass:sclick:2:{
  if ( %nick1 == $null) {
    set %nick1 $did(4) 
    did -ca ppgbypass 4 $did(4) 
    did -t ppgbypass 101
    halt
  }
  if ( %nick2 == $null) {
    set %nick2 $did(4) 
    did -ca ppgbypass 4 $did(4) 
    did -t ppgbypass 101
    halt
  }
  if ( %nick3 == $null) {
    set %nick3 $did(4) 
    did -ca ppgbypass 4 $did(4) 
    did -t ppgbypass 101
    halt
  }
  if ( %nick4 == $null) {
    set %nick4 $did(4) 
    did -ca ppgbypass 4 $did(4) 
    did -t ppgbypass 101
    halt
  }
  if ( %nick5 == $null) {
    set %nick5 $did(4) 
    did -ca ppgbypass 4 $did(4) 
    did -t ppgbypass 101
    halt
  }
  else echo -s 12 All nick-bypass varibles are taken please remove one before attempting to add another!
}

on *:DIALOG:ppgbypass:sclick:3:{
  if ($did(4) == %nick1) {
    did -d ppgbypass 4 $did(4).sel
    unset %nick1
    halt
  }
  if ($did(4) == %nick2) {
    did -d ppgbypass 4 $did(4).sel
    unset %nick2
    halt
  }
  if ($did(4) == %nick3) {
    did -d ppgbypass 4 $did(4).sel
    unset %nick3
    halt
  }
  if ($did(4) == %nick4) {
    did -d ppgbypass 4 $did(4).sel
    unset %nick4
    halt
  }
  if ($did(4) == %nick5) {
    did -d ppgbypass 4 $did(4).sel
    unset %nick5
    halt
  }
  else echo -s 12 That nick does not exist in your nick bypass database!
}

alias ppgbypass {
  /dialog -m ppgbypass ppgbypass -4
}