21

When trying to connect to an IRC server in Irssi, I get the following error:

root Erroneous Nickname: Reserved for services

I don't know how to change the nickname before the connection is established. I'm currently connected to one server, where I have my proper nick, but when trying to connect to another server with connect irc.foo.com, which should open another connection, it's trying with the nickname root.

How do I change this nickname?

Peter Mortensen
  • 12,090
  • 23
  • 70
  • 90
Frantisek
  • 1,886
  • 5
  • 22
  • 32

3 Answers3

32

You can use Irssi's -n option to specify your nick:

irssi -n test123

Or you can go to the bottom of your $HOME/.irssi/config file and in the settings section, change the entry "nick".

Peter Mortensen
  • 12,090
  • 23
  • 70
  • 90
freethinker
  • 3,660
  • 3
  • 22
  • 21
  • An ***alternative*** to changing the configuration file directly (entry "nick") is ***from within an Irssi session***: `/set nick SomePreferredNickname` and `/save` ([documentation](https://irssi.org/documentation/startup/), near "User information" (though it is somewhat broken and incomplete)). Similar for entry "user_name": `/set user_name SomePreferredNickname` and `/save`. – Peter Mortensen Jun 02 '21 at 12:04
  • Though changing the global nick name permanently may not be a good answer to the question here(?). – Peter Mortensen Jun 02 '21 at 12:05
11

You can use the command:

irssi -n nickname1234 

and to change the default nickname after you are connected

/SET default_nick = <nick>, defaults to user_name

/SET alternate_nick = <nick>, defaults to <default_nick>

/SET user_name = <user>, defaults to your login name

/SET real_name = <name>, taken from /etc/passwd by default

guntbert
  • 383
  • 3
  • 14
holyoffice
  • 127
  • 1
  • 2
  • Can you back it up with a reference to documentation? – Peter Mortensen Jun 02 '21 at 12:02
  • `default_nick` is ***way*** out of date. It is just `nick` now. It changed in October 2000 (not a typo - more than 20 years ago). Version [0.7.96](https://irssi.org/NEWS/#v0-7-96) (2000-10-19): *"Changes ... /SET default_nick -> /SET nick"* – Peter Mortensen Jun 02 '21 at 12:09
  • After some consideration (e.g., based on some actual testing), someone might want to update this answer. And specify which version of Irssi was used for testing. – Peter Mortensen Jun 02 '21 at 12:11
-1

In a terminal, go to the user home directory and cd into the .irssi directory.

Then

touch config

Paste in the following:

servers = (
  {
    address = "irc.freenode.net";
    chatnet = "freenode";
    port = "6667";
    use_ssl = "no";
    ssl_verify = "no";
    autoconnect = "yes";
  }
);

chatnets = {
  Freenode = {
    type = "IRC";
    autosendcmd = "/msg nickserv identify yourname yourpass";
  };
};

channels = (
  { name = "#test-channel"; chatnet = "Freenode"; autojoin = "Yes"; }
  { name = "#private-test-channel"; chatnet = "Freenode"; password = "yourpass"; autojoin = "Yes"; }
);

settings = {
  core = { real_name = "real name"; user_name = "user name"; nick = "yourusername"; };
  "fe-text" = { actlist_sort = "refnum"; term_force_colors = "yes"; scrollback_time = "7day "; };
  "fe-common/core" = { theme = "default"; };
};
Peter Mortensen
  • 12,090
  • 23
  • 70
  • 90
  • 1
    There is no reason to not use TLS, copy pasting settings without understanding them is a generally bad idea. I'll edit the answer – Yarek T Dec 06 '19 at 10:14
  • Some of those settings may already exist in the `~/.irssi/config` file. What is the consequence of duplicate entries? – Peter Mortensen Jun 02 '21 at 10:28
  • What is the purpose of `touch config`? Is it really necessary? Doesn't the `~/.irssi/config` file already exist if Irssi has been run and Irssi doesn't care about the modification date? (Not rhetorical questions.) – Peter Mortensen Jun 02 '21 at 10:31