All pastes #742024 Raw Edit

Someone

public text v1 · immutable
·published 2007-10-19 04:50 UTC
rendered paste body
on *:TEXT:*:#: {
  if ($mid($1-,1,$len($trig)) == $trig) {
    tokenize 32 $mid($1-,$calc($len($trig) + 1) $+ -)
    if ($1 == version) {
      notice $nick ProTV MatchCast Bot, v1.0
    }
    if ($1 == game1 && $chan == #ProStaff) {
      if ($ulevel == 5) {
        set %caster1 $nick
        set %game1 $2-
        notice $nick Game for Cast1 has been set to %game1
      }
    }
    if ($1 == time1 && $chan == #ProStaff){
      if ($uelevel == 5){
	set %time1 $2-
	notice $ nick The match time for Cast1 is %time1
      }
    }
    if ($1 == match1 && $chan == #ProStaff) {
      if ($ulevel == 5) {
        set %match1 $2-
        notice $nick The match name for Cast1 is %match1
      }
    }
    if ($1 == hltv1 && $chan == #ProStaff) {
      if ($ulevel == 5) {
        set %HLTV1 $2-
        notice $nick The HLTV for Cast1 is %HLTV1
      }
    }
    if ($1 == showcast1 && $chan == #ProStaff){
      if ($ulevel == 5) {
	msg #ProTV Matchcaster %caster1 is going to cast a %game1 match between %match1 at %time1
	msg #ProTV Please type @cast1 for HLTV and where you can listen to the MatchCast.
      }
    }
    if ($1 == cast1 && $chan == #ProTV) {
      if (%caster1) {
        notice $nick MatchCaster %caster1 is about to MatchCast a %game1 match, between %match1
        notice $nick You can watch this match on: %HLTV1
        notice $nick You can listen to this match on:
      }
      else {
        notice $nick There is no matchcast currently going on.
      }
    }
    if ($1 == endcast1 && $chan == #ProSTAFF) {
      if ($ulevel == 5) {
        notice $nick Cast1 has been ended.
        unset %caster1
        unset %game1
        unset %match1
        unset %HLTV1
      }
    }
  }
}

alias trig { return @ }