All pastes #586786 Raw Edit

Davids #chanfix net script

public text v1 · immutable
#586786 ·published 2007-06-24 01:05 UTC
rendered paste body
on 1:TEXT:.connect*:#:{
  if ($nick !isin %owner) { halt }
  if (%connect = on) { msg $nick Sorry but %conid is already using the network }
  if (%connect != on) {  
    if ($2 = $me) {  
      set %connect on
      set %conid $3
      set %nchan $chan(0)
      set %ichan 1
      while (%ichan <= %nchan) {
        set %schan %schan $chan(%ichan)
        inc %ichan 1
      }
      msg %conid ***Welcome to the ChanFix InterBot Network
      msg %conid ***Please Choose a Channel
      msg %conid ***You Have These Channels To Choose From: %schan
      msg %conid ***Use .switch To Switch Your Channel
      msg %conid ***Use .com To List The Current Commands Available
      msg %conid ***Use .Disconnect To Disconnect From The NetWork
      unset %schan
    }
  }
}
on *:TEXT:*:*:{
  if ($nick isin %conid) { 
    if ($1 = .disconnect) {
      msg %conid ***Disconnecting From ChanFix InterBot Network
      set %connect off
      unset %conchan
      msg %conid ***Disconnected
      close -m %conid
      unset %conid
    }
    if ($1 = .com) {
      if (!$2) { 
        msg %conid ***Current commands Available are: Load, and Unload
        msg %conid ***Syntax: .com load <-a|-pscqnm|-ruvsN> <filename>
      }
      if ($2 = load) { /load $3- }
      if ($2 = unload) { /unload $3- }
    }
    if ($1 = .switch) {
      set %conchan $2
      msg %conid ***You're now on %conchan
      msg %conid ***Use .users To Get the Current User List
    }
    if ($1 = .msg) { msg %conchan $2- }
    if ($1 = .users) { /names %conchan | goto ;names }
  }
  if ($nick isin %owner) { 
    if ($1 = .disconnect) { 
      if ($2 isin %conid) {  
        msg %conid ***Net Admin Forcing Disconnect
        set %connect off
        msg %conid ***Disconnected
        close -m %conid
        unset %conid
        unset %conchan
        msg $chan $2 Disconnected From Network
      }
    }
  }
  if ($chan = %conchan) { msg %conid $+($chr(40),$time,$chr(41),$nick,:,$1-)
  }
}
on 1:join:#:{
  if ($chan isin %conchan) { 
    msg %conid $+(***,$nick) Has Joined %conchan
  }
}
on 1:PART:#:{
  if ($chan isin %conchan) {
    msg %conid $+(***,$nick) Has Parted %conchan
  }
}
on *:action:*:#:{
  if ($chan isin %conchan) { 
    describe %conid $+(***,$nick) $1-
  }
}
;names
raw 353:*: { msg %conid ***Users On $+($chr(40),%conchan,$chr(41),:) $4- }