All pastes #176657 Raw Edit

Someone

public text v1 · immutable
#176657 ·published 2006-09-19 21:03 UTC
rendered paste body
menu channel {
  Runescape Stats Kicker:/rsstatskicker
}
alias rsstats {
  dialog -ma rsstats rsstats
}
alias rsstatskicker {
  dialog -ma rsstatskicker rsstatskicker
}
dialog rsstatskicker {
  title "Runescape Stats Kicker"
  size -1 -1 177 161
  option dbu
  tab "Channels", 1, -2 -1 179 185
  combo 2, 21 52 124 44, tab 1 size
  text "Settings: Channels", 3, 22 26 122 8, tab 1
  button "Add", 7, 23 99 37 12, tab 1
  button "Remove", 8, 65 99 37 12, tab 1
  button "Clear", 9, 109 99 37 12, tab 1
  button "Clear Confirm", 10, 109 111 37 12, tab 1
  tab "Nicks", 11
  combo 12, 21 52 80 50, tab 11 size
  text "Settings: Nicks", 13, 22 26 79 8, tab 11
  text "Nicks below will not be kicked", 14, 22 34 79 8, tab 11
  button "Add", 15, 110 52 37 12, tab 11
  button "Remove", 16, 110 66 37 12, tab 11
  button "Clear", 17, 110 80 37 12, tab 11
  button "Clear Confirm", 18, 110 94 37 12, tab 11
  tab "Cache", 19
  text "Cache:", 21, 22 26 25 8, tab 19
  text "A feature that saves if the nick meets the requirements for that channel. This will eliminate the need to retrieve the stats for the user every time they join.", 20, 22 34 119 29, tab 19
  button "Clear Cache", 22, 24 80 37 12, tab 19
  button "Ok", 6, 110 139 37 12, ok cancel
}
alias rsstatskicker.refresh {
  did -h rsstatskicker 10,18
  did -r rsstatskicker 2,12
  var %x = 1
  while ($read(RSstatschan.txt,%x)) {
    did -a rsstatskicker 2 $read(RSstatschan.txt,%x)
    inc %x
    continue
  }
  var %x = 1
  while ($read(RSstatsnick.txt,%x)) {
    did -a rsstatskicker 12 $read(RSstatsnick.txt,%x)
    inc %x
    continue
  }
}
on *:dialog:rsstatskicker:init:*: {
  rsstatskicker.refresh 
}
on *:dialog:rsstatskicker:sclick:*: {
  if ($did == 7) { 
    if (!$read(RSStatschan.txt,w,$did(2))) && ($chr(35) isin $did(2)) {
      write RSStatschan.txt $did(2)
      rsstatskicker.refresh
    }
  }
  if ($did == 8) {
    if ($read(RSStatschan.txt,w,$did(2))) {
      write -ds $+ $gettok($did(2),1,32) RSStatschan.txt
      rsstatskicker.refresh
    }
  }
  if ($did == 9) { did -v rsstatskicker 10 }
  if ($did == 10) { 
    .remove rsstatschan.txt
    rsstatskicker.refresh 
  }
  if ($did == 15) {
    if (!$read(RSStatsnick.txt,w,$gettok($did(12),1,32))) {
      write RSStatsnick.txt $did(12)
      rsstatskicker.refresh
    }
  }
  if ($did == 16) {
    if ($read(RSStatsnick.txt,w,$did(12))) {
      write -ds $+ $did(12) RSStatsnick.txt
      rsstatskicker.refresh
    }
  }
  if ($did == 17) { did -v rsstatskicker 18 }
  if ($did == 18) {
    .remove rsstatsnick.txt
    rsstatskicker.refresh
  }
  if ($did == 22) { .remove rsstatscache.txt }
}