HexChat Python Plugin: How to write to specific channel? reddit / irc ---------------------------------------------------------------------- grisu48 · 2020-08-04 06:35 Hey there! Noob question ahead. I would like to write a simple HexChat Python plugin, that writes to a specific channel on a specific server. I have HexChat with three servers configured and this script is supposed to write the contents of a file to a specific channel at a specific time or when it is triggered by the '!ombrometer' command. I checked the [HexChat Python Interface manual](https://hexchat.readthedocs.io/en/latest/script_python.html) but cannot find anything on how to post a message to a certain channel on a specific server. I tried `hexchat.command('msg ...')` but that is bound to the current context and will not work if I'm on a different server. Anyone an idea? ---------------------------------------------------------------------- htepO · 2020-08-04 07:11 I'm not a HexChat user, but going through the documentation, you might be interested in the [context handling](https://hexchat.readthedocs.io /en/latest/script_python.html#context-handling) section at the bottom. ---------------------------------------------------------------------- grisu48 · 2020-08-04 07:41 Yep, that did the trick: context = hexchat.find_context(channel='#channel-to-search-for') context.command("say Hello World")