emacs-circe / circe

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

bitlbee thru circe: Warning (emacs): Unknown option :lagmon-disabled, ignored #406

Closed thor314 closed 2 years ago

thor314 commented 2 years ago

On starting circe with bitlbee (not Libera), I get a warning buffer, with the message "Warning (emacs): Unknown option :lagmon-disabled, ignored"

config:

    (setf circe-network-options
    `(("Libera"
        :host "irc.eu.libera.chat"
        :tls t
        :nick "cryptograthor"
        :port "6697"
        :channels ("#emacs")
        :nickserv-password ,(my-fetch-password :user "cryptograthor" :machine "irc.libera.chat"))
       ("Bitlbee"
         :host "localhost"
         :nick "cryptograthor"
         ;; :tls t ; stops me from connecting, idk why
         :port "6667"
         :nickserv-password ,(my-fetch-password :user "cryptograthor" :machine "bitlbee"))
       ))

From the bitlbee docs, I expected to enter into the &bitlbee control channel. I'm new to bitlbee, so I could be incorrect, but I don't see any users (me and root) in this channel, so I suspect I may not be there. When I enter commands, I'm returned the message "No target for current buffer".

Sorry if this issue reads as noob spam, lmk if this should better be directed at a bitlbee issue forum.

Checking that bitlbee is running:

$ systemctl status bitlbee
● bitlbee.service - LSB: Start and stop BitlBee IRC to other chat networks gateway
     Loaded: loaded (/etc/init.d/bitlbee; generated)
     Active: active (running) since Mon 2021-11-22 08:44:10 WET; 2 days ago
       Docs: man:systemd-sysv-generator(8)
      Tasks: 1 (limit: 28528)
     Memory: 2.1M
     CGroup: /system.slice/bitlbee.service
             └─1118 /usr/sbin/bitlbee -P /var/run/bitlbee.pid -F

Output on starting circe/bitlbee:

-Server Notice- BitlBee-IRCd initialized, please go on
*** Welcome to the BitlBee gateway, cryptograthor
*** Host localhost is running BitlBee 3.6-1.2.
*** BitlBee <http://www.bitlbee.org/>
*** localhost 3.6-1.2 abiswRo ntC
*** PREFIX=(ohv)@%+ CHANTYPES=&# CHANMODES=,,,ntC NICKLEN=23 CHANNELLEN=23
    NETWORK=BitlBee SAFELIST CASEMAPPING=rfc1459 MAXTARGETS=1 WATCH=128
    FLOOD=0/9999 are supported by this server
*** - localhost Message Of The Day - 
*** - Welcome to the BitlBee server at localhost.
*** - 
*** - This server is running BitlBee version 3.6-1.2.
*** - The newest version can be found on http://www.bitlbee.org/
*** - 
*** - You are getting this message because the server administrator has not
*** - yet had the time (or need) to change it.
*** - 
*** - For those who don't know it yet, this is not quite a regular Internet
*** - Relay Chat server. Please see the site mentioned above for more
*** - information.
*** - 
*** - The developers of the Bee hope you have a buzzing time.
*** - -- BitlBee development team.
*** -  
*** - ... Buzzing, haha, get it?
*** End of MOTD
*** Mode change: +s on cryptograthor by cryptograthor (thor@localhost)
wasamasa commented 2 years ago

The warning is, well, a warning. It doesn't prevent you from connecting to Bitlbee. I can look into fixing the warning, but it's a merely cosmetic change.

I can connect to Bitlbee just fine after installing it, starting the service and using the following config:

(setq circe-network-options '(("Bitlbee" :nick "wasamasa")))

This gives me two buffers, "Bitlbee" (which contains the MOTD) and "&bitlbee@Bitlbee". The latter shows me messages from the root user telling me about the "help" command. I can interact with it just fine.

If I try to interact with the "Bitlbee" buffer, I get the "No target for current buffer" error. Not terribly surprising, it's the server buffer. The only messages that make sense to use there are the IRC command kind, like /msg root help.

Now, the real mystery is why nickserv authentication doesn't work programmatically (when adding :nickserv-password to the above options) as opposed to doing it manually.

edit: It doesn't like some special characters in my password apparently. Sigh.

(setq circe-network-options '(("Bitlbee" :nick "wasamasa" :nickserv-password "hunter2")))

edit: The passwords are fine actually. Something went wrong in my password function.

I'll keep the issue open until figuring out the warning bit.

wasamasa commented 2 years ago

Regarding the warning: It only shows up if you have not evaluated (circe-lagmon-mode) before (circe "Bitlbee"). The reason for that is that the circe-lagmon-disabled variable is only defined after enabling lagmon-mode and it cannot be set before enabling it.

I find it debatable whether this should even be fixed as the warning points you to variables that don't exist, for example because there's a typo in them. Technically speaking it doesn't exist. Silencing it is possible (for example by declaring the variable in circe.el), but doesn't seem worth it.