You have to use 'bind dcc' which is explained in doc/tcl-commands.doc. In case you are new to all this (and because i am unusually good today) here is a small example.
bind dcc o|o sayonchan proc:mydcc
binddcc {handle idx text} {
putserv "PRIVMSG #put-some-channel-here :[hand2nick $handle] just typed $text"
}
Usage: .sayonchan <some text here>
This trivial example should be a good starting point.
Ignorant and lazy people will save 30 minutes by chosing simple config file. Smart ones will save 3000 minutes of *everyone's* time by opting for complete config file.