emacs-circe / circe

Circe, a Client for IRC in Emacs
GNU General Public License v3.0
395 stars 51 forks source link

hook to run after joining all channels in :channels list #289

Closed backwardspy closed 8 years ago

backwardspy commented 8 years ago

i would like to run code after circe has created the buffers for each channel in the :channels list in my circe-network-options block.

for example, i have three channels specified under :channels for the freenode network. when i run irc, circe connects to the freenode server, then creates three buffers for those channels. when this has happened, i would like to run my irc-window-layout function that splits emacs into three windows, each showing one channel.

thanks, and great work on circe. :)

jorgenschaefer commented 8 years ago

Hello, and thanks for the suggestion! Considering the erratic and asynchronous nature of IRC, it's really difficult to know when something is "done" … you can hook into circe-channel-mode-hook and check if all channel buffers you expect exist, and then run your code. Would that work for you?

backwardspy commented 8 years ago

fair enough, i can understand why it's probably non-trivial to do. i'll look into doing something with circe-channel-mode-hook, it should work just fine for what I want. thanks a lot!

jorgenschaefer commented 8 years ago

You're welcome, and enjoy Circe! :-)