Retribution V101 : Syndicate — File Browser

RetributionSyndicatev1.01 / RetributionSyndicatev1.01 / System / Syndicate / utils.mrc

utils.mrc — 5.8 KB — Download this file

;[----------------------------------------------------------------------]
;[	Name	: Syndicate : Retribution V101				]
;[	Support	: DefCon Industries					]
;[	Author	: Risc							]
;[									]
;[	This Code, Content, is CopyRight 1999 : DefCon Industries	]
;[	No Copying, Ripping, or calling this Code your own		]
;[									]
;[----------------------------------------------------------------------]

alias ftpsetup { dialog -nm ftpsetup ftpsetup }
dialog ftpsetup {
  title "Syndicate FTP System"
  size -1 -1 300 300

  box "Syndicate FTP System Setup", 1, 5 5 290 250

  text "channel:", 2, 20 60 100 20
  edit "", 3, 70 60 210 22, autohs

  text "login:", 4, 20 100 100 20
  edit "", 5, 70 100 210 22, autohs

  text "password:", 6, 20 125 100 20
  edit "", 7, 70 125 210 22, autohs

  text "info:", 8, 20 165 100 20
  edit "", 9, 70 165 210 22, autohs

  text "location:", 10, 20 190 100 20
  edit "", 11, 70 190 210 22, autohs

  button "Current IP", 12, 20 220 90 25

  button "Syndicate FTP System Status: OFF",  13, 20 25 260 25 

  button "OK",249, 10 265 60 25, ok
}
on *:dialog:ftpsetup:init:0: {
  dialog -t ftpsetup FTP Advertisment System SETUP
  if (%ftp.online == ON) {
    did -o ftpsetup 13 1 FTP Advertisment Status: ON
  }
  if (%ftp.online == OFF) {
    did -o ftpsetup 13 1 FTP Advertisment Status: OFF
  }
  did -o ftpsetup 3 1 %ftp.channel
  did -o ftpsetup 5 1 %ftp.login
  did -o ftpsetup 7 1 %ftp.password
  did -o ftpsetup 9 1 %ftp.info
  did -o ftpsetup 11 1 %ftp.ip
}
on *:DIALOG:ftpsetup:sclick:12:{
  did -o ftpsetup 11 1 $ip
  set %ftp.ip $ip
}
on *:DIALOG:ftpsetup:sclick:13:{
  if (%ftp.online == ON) {
    set %ftp.online OFF
    did -o ftpsetup 13 1 FTP Advertisment Status: OFF
    ftp.offline
  }
  elseif (%ftp.online == OFF) { 
    set %ftp.online ON
    did -o ftpsetup 13 1 FTP Advertisment Status: ON
    ftp.online
  }
}
on *:DIALOG:ftpsetup:edit:3:{
  set %ftp.channel $did(3).text
}
on *:DIALOG:ftpsetup:edit:5:{
  set %ftp.login $did(5).text
}
on *:DIALOG:ftpsetup:edit:7:{
  set %ftp.password $did(7).text
}
on *:DIALOG:ftpsetup:edit:9:{
  set %ftp.info $did(9).text
}
on *:DIALOG:ftpsetup:edit:11:{
  set %ftp.ip $did(11).text
}
alias ftp.online {
  /msgg %ftp.channel $ftp.onlinemsg
  .timerftpserv 0 300 ftp.timer
}

alias ftp.timer {
  /msgg %ftp.channel $ftp.onlinemsg
}

alias ftp.offline {
  .timerftpserv off
}


;%%%%% FILE DROP SYS %%%%%
alias fdropsetup { dialog -nm fdrop fdrop }
dialog fdrop {
  title "File Dropper System"
  size -1 -1 300 300

  box "File Dropper Setup", 1, 5 5 290 250

  text "channel:", 2, 20 60 100 20
  edit "", 3, 70 60 210 22, autohs

  text "trigger", 4, 20 100 100 20
  edit "", 5, 70 100 210 22, autohs

  text "max gets:", 6, 20 140 100 20
  edit "", 7, 70 140 210 22, autohs

  text "info:", 8, 20 165 100 20
  edit "", 9, 70 165 210 22, autohs

  button "File:", 10, 20 205 50 20
  edit "", 11, 70 205 210 22, autohs

  button "File Dropper: OFF",  13, 20 25 260 25 

  button "OK",249, 10 265 60 25, ok
}
on *:dialog:fdrop:init:0: {
  dialog -t fdrop File Dropper Setup
  if (%ftp.online == ON) {
    did -o fdrop 13 1 File Dropper: ON
  }
  if (%ftp.online == OFF) {
    did -o fdrop 13 1 File Dropper: OFF
  }
  did -o fdrop 3 1 %fdrop.channel
  did -o fdrop 5 1 %fdrop.trigger
  did -o fdrop 7 1 %fdrop.maxgets
  did -o fdrop 9 1 %fdrop.info
  did -o fdrop 11 1 %fdrop.file
}
alias ffile {
  set %fdrop.file $$dir *.*
  did -o fdrop 11 1 %fdrop.file
}
on *:DIALOG:fdrop:sclick:10:{
  .timer 1 0 ffile
}
on *:DIALOG:fdrop:sclick:13:{
  if (%fdrop.online == ON) {
    set %fdrop.online OFF
    did -o fdrop 13 1 File Dropper: OFF
    fdrop.offline
  }
  elseif (%ftp.online == OFF) { 
    set %fdrop.online ON
    did -o fdrop 13 1 File Dropper: ON
    fdrop.online
  }
}
on *:DIALOG:fdrop:edit:3:{
  set %fdrop.channel $did(3).text
}
on *:DIALOG:fdrop:edit:5:{
  set %fdrop.trigger $did(5).text
}
on *:DIALOG:fdrop:edit:7:{
  set %fdrop.maxgets $did(7).text
}
on *:DIALOG:fdrop:edit:9:{
  set %fdrop.info $did(9).text
}

alias fdrop.online {
  /msgg %fdrop.channel $fdrop.onlinemsg
  .timerfdrop 0 300 fdrop.timer
}

alias fdrop.timer {
  /msgg %fdrop.channel $fdrop.onlinemsg
}

alias fdrop.offline {
  .timerfdrop off
}

on 1:TEXT:%fdrop.trigger:%fdrop.channel:{
  if (%fdrop.online == ON) {
    if ($send(0) >= %fdrop.maxgets) { /msg $nick $ug $+ %theme.2 $+ max sends established $+ $ug $+ $banner | /halt }
    /dcc send $nick %fdrop.file
  }
}

;%%%%% TIMER SYS %%%%%
alias asksetup { dialog -nm ask ask }
dialog ask {
  title "Timer System Setup"
  size -1 -1 300 250

  box "Timer System Setup", 1, 5 5 290 200

  text "channel:", 2, 20 60 100 20
  edit "", 3, 70 60 210 22, autohs

  text "message", 4, 20 100 100 20
  edit "", 5, 70 100 210 88, multi autohs

  button "Timer System: OFF",  13, 20 25 260 25 

  button "OK",249, 10 215 60 25, ok
}
on *:dialog:ask:init:0: {
  dialog -t ask Timer System Setup
  if (%timer.online == ON) {
    did -o ask 13 1 File Dropper: ON
  }
  if (%timer.online == OFF) {
    did -o ask 13 1 File Dropper: OFF
  }
  did -o ask 3 1 %timer.channel
  did -o ask 5 1 %timer.msg
}
on *:DIALOG:ask:sclick:13:{
  if (%timer.online == ON) {
    set %timer.online OFF
    did -o ask 13 1 Timer System: OFF
    ask.offline
  }
  elseif (%timer.online == OFF) { 
    set %timer.online ON
    did -o ask 13 1 Timer System: ON
    ask.online
  }
}
on *:DIALOG:ask:edit:3:{
  set %timer.channel $did(3).text
}
on *:DIALOG:ask:edit:5:{
  set %timer.msg $did(5).text
}
alias ask.online {
  /msgg %timer.channel $timr.onlinemsg
  .timerasktimer 0 300 ask.timer
}

alias ask.timer {
  /msgg %timer.channel $timr.onlinemsg
}

alias ask.offline {
  .timerasktimer off
}