Giter VIP home page Giter VIP logo

znc.el's Introduction

It's a ZNC "mode"

MELPA

Aint that exciting?

Quickstart

$ git clone https://github.com/sshirokov/ZNC.el

Make sure the contents of the repo, or just znc.el is on your load-path. Then add this to your init.el or equivalent

;; Install
(require 'znc)

Configure it for your specific instance from within emacs once installed.

M-x customize-group znc RET

alternatively, put this in your init.el/configuration file..

(require 'znc)
(setq znc-servers
    '(("example.com" PORT# t
      ((NETWORK-SLUG "USERNAME" "PASSWORD")
       (NETWORK-SLUG "USERNAME" "PASSWORD"))
)))

where example.com is your ZNC bouncer address/hostname and PORT# is the port # that the bouncer is listening on. NETWORK-SLUG would be freenode or whatever you defined in your znc as the network name. USERNAME and PASSWORD are the username and password you authenticate to ZNC with.

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

Usage notes

/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.

You can also get ZNC.el from the MELPA ELPA repository. See https://melpa.org/#/getting-started for instructions on using it.

znc.el's People

Contributors

birlorg avatar bmansurov avatar hasimir avatar ozanmakes avatar purcell avatar skalnik avatar sshirokov avatar vincentbernat avatar

Stargazers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

Watchers

 avatar  avatar  avatar  avatar  avatar

znc.el's Issues

It just wont do given my 'znc-servers

I made a small change:
https://github.com/cloudkitsch/ZNC.el/commit/24aa6bc8e3d32adf91bb05a072d6042750343364#diff-7c2b922ba84ee91732befba250409b2dL222

my 'znc-servers
https://gist.github.com/cloudkitsch/74cd686d9fe410a064fa#file-gistfile6-txt

my conclusion is it's way too slow. This is more of an ERC issue, but I thought I might merely point this out for posterity. If I had to take a guess this might be a problem fundamentally with Emacs. It would be cool though... I sure would like to have a vast selection of IRC channels across all of netsplit's known networks to peruse.

Connecting to multiple networks causes erratic behavior

I have a ZNC bouncer set up with one account connecting to multiple networks. Using znc-erc to connect to a single network works great, but upon connecting to the second network, either with znc-erc, or immediately with znc-all, everything goes crazy. Every IRC buffer with changed content gets automatically pulled up in the right-side frame. I can kill the frame, but it comes back at some point no matter what I do. I also cannot figure out a way to see my channels on the second network.

Also, once I connect to the second network, all of my messages begin showing up duplicated and all spaced out.

ERC reconnect fails after suspend

If I suspend my laptop and resume it, ERC tries to reconnect automatically but fails. Running M-x znc-erc again works, but it would be nice if ERC's automatic reconnect worked or at least were disabled if it can't be easily made to work.

Connecting to ZNC via SSL IRC client not working

I try to connect to ZNC server via SSL by znc-erc command. I can connect to ZNC without SSL with no problem. But when I try to connect via SSL I get "Opening Connection.." message which lasts forever.

My ZNC config:

AnonIPLimit = 10
AuthOnlyViaModule = false
ConfigWriteDelay = 0
ConnectDelay = 5
HideVersion = false
LoadModule = adminlog
MaxBufferSize = 500
ProtectWebSessions = true
SSLCertFile = /home/znc/.znc/znc.pem
SSLCiphers = EECDH+AESGCM:EDH+AESGCM:AES256+EECDH:AES256+EDH
SSLDHParamFile = /home/znc/.znc/znc.pem
SSLKeyFile = /home/znc/.znc/znc.pem
SSLProtocols = -SSLv2 -SSLv3 -TLSv1 +TLSv1.1 +TLSv1.2
ServerThrottle = 30
Skin = _default_
StatusPrefix = *
Version = 1.7.2

<Listener listener0>
	AllowIRC = true
	AllowWeb = false
	IPv4 = true
	IPv6 = false
	Port = 34112
	SSL = true
	URIPrefix = /
</Listener>
...

TLS config:

  (require 'tls nil t)
  (setq tls-program
    '("gnutls-cli --x509cafile %t -p %p %h"
      "gnutls-cli --x509cafile %t -p %p %h --protocols ssl3"
      "gnutls-cli --priority secure256 -p %p %h"))

Any idea what may be wrong?

It is parting instead of detaching when a buffer is closed

When I issue (kill-current-buffer) It will part the channel, meaning i will
have to join it again on other irc clients, instead of simply detaching like it
is described on the README.md.

Is it possible to have it not sent the part command?

Handle multiple networks for the same server

ZNC now allows one to use the same server for multiple networks. In this case, the password should be login/network:password. Even with one network, this should work, so the password could be unconditionaly formatted like this.

Make messages from another computer appear to be sent locally

If I have two Emacsen open with ZNC.el in use on two computers, and I send a message from one of them, it appears on the other one to come from someone else but with my exact nick. ZNC.el should make the extra message display as if it had been sent locally.

Access to help maintain znc.el

I'll like help to maintain this package, I use this every day and I'll like to fix some critical issues, I don't want do a fork and new package in melpa with a different name, Is possible have access to make/merge contribution and help with the review?

Use self-message in query buffers

For those that save query buffers in ZNC, it is useful to see what messages you sent as well as what messages the other person sent. ERC can do this by default, but it doesn't send the necessary CAP. It seems sufficient to send

CAP REQ :znc.in/self-messsage
CAP END

when connecting. I have in my .emacs:

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

This does the trick. Consider putting this in ZNC.el as well?

ZNC.el should smooth over ZNC's replay timestamps

When you reconnect to ZNC, it will replay a certain amount of IRC traffic, complete with timestamps. It would be pretty cool if ZNC.el was able to parse those timestamps and turn them into "real" ERC timestamps, so that the conversation looked more natural.

Prompt for password for Unknown network and nil buffer on connection

I get this prompt in minibuffer when I run znc-all:

NickServ password for <username> on Unknown network (RET to cancel)

I always suppress that by pressing RET twice. After that I have one strange looking buffer named nil.

znc.el & ERC config I use:

(use-package erc
  :ensure nil
  :demand t
  :hook ((ercn-notify . my/erc-notify)
          (erc-send-pre . my/erc-preprocess))
  :custom
  (erc-port 6697)
  (erc-autoaway-message "I'm away (after %i seconds of idle-time)")
  (erc-nick-uniquifier "_")
  (erc-kill-server-buffer-on-quit t)
  (erc-kill-queries-on-quit t)
  (erc-track-showcount t)
  (erc-rename-buffers t)
  (erc-server-reconnect-timeout 3)
  (erc-track-exclude-types '("JOIN" "MODE" "NICK" "PART" "QUIT"
                              "324" "329" "332" "333" "353" "477"))
  (erc-hide-list '("JOIN" "PART" "QUIT"))
  (erc-lurker-hide-list '("JOIN" "PART" "QUIT"))
  (erc-autojoin-timing 'ident)
  (erc-user-mode "iR")
  (erc-header-line-format "%n on %t (%m) %o")
  (erc-join-buffer 'bury)
  (erc-lurker-threshold-time 43200)
  (erc-server-reconnect-attempts 5)
  :config
  (require 'erc-services)
  (require 'erc-join)

  (add-to-list 'erc-modules 'autojoin)
  (add-to-list 'erc-modules 'button)
  (add-to-list 'erc-modules 'completion)
  (add-to-list 'erc-modules 'fill)
  (add-to-list 'erc-modules 'irccontrols)
  (add-to-list 'erc-modules 'keep-place)
  (add-to-list 'erc-modules 'list)
  (add-to-list 'erc-modules 'match)
  (add-to-list 'erc-modules 'move-to-prompt)
  (add-to-list 'erc-modules 'netsplit)
  (add-to-list 'erc-modules 'networks)
  (add-to-list 'erc-modules 'notifications)
  (add-to-list 'erc-modules 'spelling)
  (add-to-list 'erc-modules 'noncommands)
  (add-to-list 'erc-modules 'readonly)
  (add-to-list 'erc-modules 'services)
  ;; (add-to-list 'erc-modules 'scrolltobottom)
  (add-to-list 'erc-modules 'ring)
  (add-to-list 'erc-modules 'stamp)
  (add-to-list 'erc-modules 'track)
  ;; (add-to-list 'erc-autojoin-channels-alist '(".*freenode.net" "#bitcoin" "#bitcoin-pricetalk"))

  (erc-services-mode 1)
  (erc-autojoin-mode 1)))

(use-package znc
:custom 
(setq
znc-servers '(("999.999.999" 55555 t
                      ((freenode "zncadmin" "password"))))))

Any ideas how to stop this prompt from popping up?
Is this nil buffer on purpose or it shouldn't be created? If it shouldn't how can I stop him for creating?


EDIT: I did some more investigations on the topic.

Even if I connect via regular ERC interface, the buffer nil is created, so it's probably how it is. But it would be great to have better name for it other than nil.

In regards to prompt in minibuffer I believe this is because freenode has many different servers and I don't have specified user/password for any of them in particular - just chat.freenode.org. But it would be great to do something about it as well, so this doesn't popup on start.

Loop

Hi,

I have been looking for such things for a while, I have tried it and it seems it doesnt work for me since entering in a loop forever trying to connect.

Does it support SSL ?

Kind Regards,
Chmouel.

Nothing happens after "Opening connection.."

I configured a few of my networks in my ZNC - however, when I try to connect to any of them, a new buffer appears:

Opening connection..  
ERC> 

Nothing else is there. My ZNC runs - with no SSL (yet :-)) - on port 31337.

What can I be missing?

Have to enter the IRC network password when using multiple networks

Hi,

Myself, and other users, as reported on this blog post about using znc.el+znc with erc+spacemacs etc, have an issue when using znc.el and multiple networks.

Basically when you run znc-all, one needs to type in each IRC network password in manually.

My configure is like so:

(use-package znc
  :ensure t
  :pin melpa
  :config
  (setq znc-servers '(("znc.mydomain.com" 10667 t
                       ((gitter "divansantana/gitter" "myzncserverpassword")
                        (freenode "divansantana/freenode" "myzncserverpassword")))))
  )

Is there a way to get this to connect without having to manually enter each IRC network password on connect?

Allow reading in passwords from external sources

ZNC.el should allow the user to omit a password, and then automatically read that password from somewhere else.

Primarily .netrc or a keyring would be great, but anything would work.

This is useful if you check your configurations into Git.

Byte compilation warning: value from (get-buffer wants-name) is unused

I've installed znc into my emacs 26.1 on Fedora Linux, and I'm getting the following warning:

Warning (bytecomp): value returned from (get-buffer wants-name) is unused

It appears that this warning is coming from line 119 of znc.el, in the following function:

(defadvice erc-server-reconnect (after znc-erc-rename last nil activate)
  "Maybe rename the buffer we create"
  (let* ((wants-name (and (local-variable-p 'znc-buffer-name (erc-server-buffer))
                          (buffer-local-value 'znc-buffer-name (erc-server-buffer))))
         (current (erc-server-buffer))
         (returning ad-return-value))
    (if wants-name
        (progn
          (ignore-errors (znc-kill-buffer-always wants-name))
          (with-current-buffer returning
            (znc-set-name wants-name)
            (rename-buffer wants-name))
          (get-buffer wants-name))
      returning)))

Does there need to be a (get-buffer wants-name) there? Is there a side-effect that znc.el is relying on?

Package cl is deprecated

I'm seeing Package cl is deprecated on emacs 27.2.

Based on this thread it seems like maybe it's possible to just swap out (require 'cl) with (require 'cl-lib)?

znc-all connection hangs

This is with the latest znc package on MELPA with two networks defined.

(setq znc-servers
      '(("myserver.org" 1234 t
         ((network-slug-freenode "me/freenode" "mypassword")
          (network-slug-efnet    "me/efnet"    "mypassword")))))

Running znc-all, usually one connection will hang with Opening connection.. shown in the irc-network-slug-xxx buffer. Running list-processes, killing the process for this connection, then running znc-erc usually ends with a connection, but sometimes this takes a few attempts.

I am running Emacs from the master branch (emacs-devel-27.0.50.20190201,2).

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.