All pastes #513451 Raw Edit

Untitled

public text v1 · immutable
#513451 ·published 2007-05-27 08:23 UTC
rendered paste body

on *:start:{
  set %bottrigger .
  echo -a By #cbots
  echo -a For help, #cbots or #connect on irc.gamesurge.net
}

;when it conencts to a server ie gamesurge
on *:connect: {
  ; checks if the network is gamesurge
  if ($network == GameSurge) {
    ; auth's
    .as auth AUTHACCOUNT PASS
    .mode $me +ixw
    ;set thes channels
    .set %home #MOT
    .set %sup #MOT-support
    .set %h #cbots
    .set %hs #c-staff
    ; gets chanserv to invite the bot
    .cs inviteme %home
    .cs inviteme %sup
    .cs inviteme %h
    ; joins the channel
    .join %home
    .join %sup
    .join %h
    .join %hs
  }
}

on *:join:#: {
  ; now it checks what channel they join
  if ($chan == %home) {
    ;; now when they join it wil send them %skin but it will replace <cmd> with greeting so forth
    .msg $nick $replace(%skin,<cmd>,GREETING,<info>,%greeting)
    .msg $nick $replace(%skin,<cmd>,GREETING,<info>,%greeting2)
    ;; stops the whole operation
    .halt
  }
  if ($chan == %sup) {
    .msg $nick No idling is allowed in #MOT-Support Please Idle And Support #MOT #MOT #MOT and #GTE #GTE #GTE
    .halt
  }
}
on *:TEXT:*:#:{
  if ($right($1,-1) == join) {
    if ($nick isop %home) {
      .join $2
    }
  }
  if ($right($1,-1) == part) {
    if ($nick isop %home) {
      .part $2
    }
  }
  if ($1 == %bottrigger $+ bind) {
    if ($nick !isop %home) { msg $chan [ACCESS] you have insufficent access to the command  $+ $right($1,-1)
      halt
    }
    if ($2 == $null) { msg $chan [ERROR] %bottrigger $+ bind [COMMAND] [INFO]
      halt
    }
    if ($2 == greeting) {
      set % [ $+ [ $chan $+ [ greeting ] ] ] $3-
      notice $nick [GREETING]  $+ $2 $+  bound as $3- $+ .
      halt
    }
    if ($2 == greeting2) {
      set % [ $+ [ $chan $+ [ greeting ] ] ] $3-
      notice $nick [GREETING]  $+ $2 $+  bound as $3- $+ .
      halt
    }
    if ($2 == skin) {
      if (<cmd> !iswm $3-) {
        .msg $chan use it correctly, use .set skin <cmd> <info>  <<--- add colours
        .halt
      }
      set %skin $3-
      notice $nick [SKIN]  $+ $2 $+  bound as $3- $+ .
      halt
    }
    if ($3 == $null) {
      msg $chan [ERROR] You must enter something after $2 $+ , If you are trying to unbind please do .bind $2 *
      halt
    }
    if ($3 == *) {
      unset % [ $+ [ $chan $+ $2 ] ]
      msg $chan [UNBOUND] $2 $+ , Successfully.
      halt
    }    
    set % [ $+ [ $chan $+ [ $2 ] ] ] $3-
    notice $nick [COMMAND]  $+ $2 $+  bound as $3- $+ .
    halt
  }
  if (% [ $+ [ $chan $+ [ $right($1,-1) ] ] ] == $null) {
    halt
  }
  elseif ($left($1,1) == %bottrigger) && (!$2) {
    set %botcmd $chan $+ [ $right($1,-1) ]
    if (%botcmd !== $null) {
      .notice $nick $replace(%skin,<cmd>,$right($1,-1),<info>,%botcmd)
    }
  }
}