XchatPyScriptSamples

normally the best to get started is to play a bit around with a simple script and alter it ..

a barebone structure of a xchat python script could be:

a nice way to test interactively the commands you want afterwards use in the script is to place them in the input field  as example:

 

to print from the script to another tab (as example to summary) is to use the context paradigm where the context needs to exist

in the previous prnt example the "current context" was returned by xchat.

 

(in the days before xchat2 there existed a perl method IRC::print_on_channel that got now a much more general/nicer replacement with the context paradigm)