ZNC.el is a customize group and a set of helpers to manage IRC connections through one or many ZNC servers.

It is available at https://github.com/sshirokov/ZNC.el

Make sure the contents of the repo, or just ./znc.el is on your load-path.

===Note===
This package is not necessary for most use-cases. ZNC works perfectly normal without it.

==Configuration and Usage==
<pre>
;; Install
(require 'znc)

;; Configure
M-x customize-group znc RET

;; Engage!
; It'll prompt you for a configured server, or tell you to configure one
M-x znc-erc

; Or you can make a giant sweep and connect to freaking everything
M-x znc-all
</pre>

/reconnect will recycle the hell out of the server buffer.

By default, when you kill a channel buffer instead of /parting from the channel, you will detach from it
This is customizable

==Query Buffers Self-Messages Fix==

When using the ZNC setting 'AutoClearQueryBuffer = false',
in order to have query buffers (ex. direct message with another user) restore with your messages it is necessary to add this advice to your ERC configuration:

Ref: https://github.com/sshirokov/ZNC.el/issues/32

<pre>
(advice-add #'erc-login :before (lambda ()
                                  (erc-server-send "CAP REQ :znc.in/self-message")
                                  (erc-server-send "CAP END")))
</pre>

If you would like ZNC to not restore the query buffers after they have been killed (C-x k):

<pre>
(defun erc-clear-query-buffer ()
    (when (erc-query-buffer-p)
      (erc-send-input-line "*status" (format "clearbuffer %s" (erc-target)))))
(add-to-list 'erc-kill-buffer-hook 'erc-clear-query-buffer)

</pre>
Once again, this is only necessary when using 'AutoClearQueryBuffer = false'.

Ref: https://wiki.znc.in/Query_buffers

==Notes==

[PhilHudson:2015-01-18 23:11 UTC]
Question: what is a "network slug"?

[new:WadeMealing:2018-09-27 11:11 UTC]
Answer: Slug is a "name-like-this" identifier.  No spaces or dots, i think the term originates from django's slug url.  This question originates from the term used in the customize-group znc "Account" information.

