#
# Initialization Scripts for Valis
#
# Christian Williams - xian@youth.org

proc putaction {arg1 {arg2 ""}} { global channel
  if {[string length $arg2] == 0} {
    set arg2 $arg1 ; set arg1 $channel
  }
  putserv "privmsg $arg1 :\001ACTION $arg2\001"
}

proc putchan {arg1 {arg2 ""}} { global channel
  if {[string length $arg2] == 0} {
    set arg2 $arg1 ; set arg1 $channel
  }
  putserv "privmsg $arg1 :$arg2"
}

proc putmsg {nick msg} { puthelp "PRIVMSG $nick :$msg" }

# the bind command
proc cmd_bind {hand idx arg} {
  dccSimul $idx "tcl bind $arg"
}
bind dcc - bind cmd_bind

# the unbind command
proc cmd_unbind {hand idx arg} {
  dccSimul $idx "tcl bind $arg #"
}
bind dcc - unbind cmd_unbind
putlog "00init -load complete"