All pastes #729498 Raw Edit

Miscellany

public text v1 · immutable
·published 2007-10-08 01:34 UTC
rendered paste body
;
; pre script by infused
;

; fill this in first nub
; network can be $null
; password is optional
alias pre.setup {
  ; remote network name (type //echo $network on remote server to get )
  %pre.remotenetwork =
  ; local network
  %pre.localnetwork = $null
  ; pre bot name
  %pre.prebot =
  ; remote channel you are taking the information from
  %pre.remoteprechannel =
  ; remote channel password, if it has one
  %pre.remoteprechannelpassword =
  ; local channel you are echoing the information to
  %pre.localprechannel = #pre
  ; local channel password, if it has one
  %pre.localprechannelpassword =
}

; sample config
; %pre.remotenetwork = rizon
; %pre.localnetwork = efnet
; %pre.prebot = SomeBot
; %pre.remoteprechannel = #pre4free
; %pre.remoteprechannelpassword =
; %pre.localprechannel = #pre
; %pre.localprechannelpassword =


; join pre chans
on 1:connect: {
  pre.setup
  if ($network == %pre.remotenetwork) {
    join %pre.remoteprechannel %pre.remoteprechannelpassword
  }
  elseif ($network == %pre.localnetwork) {
    join %pre.localprechannel %pre.localprechannelpassword
  }
}

; catch remote bot commands
on 1:text:*:%pre.remoteprechannel: {
  if ($nick == %pre.prebot) {
    if (pre isin $1) {
      ; change to local server
      scid 1
      if ($me ison %pre.localprechannel) { msg %pre.localprechannel $1- }
    }
  }
}