All pastes #497039 Raw Edit

Miscellany

public text v1 · immutable
·published 2007-05-19 16:28 UTC
rendered paste body
on *:INPUT:?: { 
  if ($1 == @bind) {
    if (!$2 || !$3) { 
     notice $nick Invalid syntax.  Please use @bind <commandname> <text>.
    }
    else {
      writeini binds.ini binds $2 $encode($3-,m)
      notice $nick $2 has been binded.
    }
  }
  if ($1 == @unbind) {
    if (!$2) {
      notice $nick Invalid syntax.  Please use: @unbind <commandname>.
    }
    else {
      remini binds.ini binds $2
      notice $nick $2 unbinded.
    }
  }
}
on *:TEXT:*:?: {
  if ($readini(binds.ini,binds,$remove($1,@))) {
    msg $nick $v1
  }
  else {
    msg $nick Thanks for pming me.
    msg $nick Please use @commands while waiting.
  }
}