Skip to content

Instantly share code, notes, and snippets.

@parsa
Last active January 17, 2024 22:44
Show Gist options
  • Save parsa/8d03ea272add575c67cc9b9305c5237a to your computer and use it in GitHub Desktop.
Save parsa/8d03ea272add575c67cc9b9305c5237a to your computer and use it in GitHub Desktop.
Nickserv Commands

Generate a certificate

Note: Git Bash comes with OpenSSL

$ openssl req -x509 -new -newkey rsa:4096 -sha256 -days 730 -nodes -out freenode.pem -keyout freenode.pem
Generating a 4096 bit RSA private key
.....................................................++
............................................................................++
writing new private key to 'freenode.pem'
-----
You are about to be asked to enter information that will be incorporated
into your certificate request.
What you are about to enter is what is called a Distinguished Name or a DN.
There are quite a few fields but you can leave some blank
For some fields there will be a default value,
If you enter '.', the field will be left blank.
-----
Country Name (2 letter code) [AU]:us
State or Province Name (full name) [Some-State]:
Locality Name (eg, city) []:
Organization Name (eg, company) [Internet Widgits Pty Ltd]:
Organizational Unit Name (eg, section) []:
Common Name (e.g. server FQDN or YOUR name) []:
Email Address []:

HexChat Certificate Configuration Directory:

C:\> %USERPROFILE%\AppData\Roaming\HexChat\certs

View Fingerprint

$ openssl x509 -in freenode.pem -outform der | sha1sum -b | cut -d' ' -f1
<50 character fingerprint>

Register and vertify a certificate with NickServ

/query nickserv
cert list
cert add <fingerprint>

Registering Nicknames

Step 1: Set your nickname: /nick <nickname>

Step 2: Register your nickname using the following command:

/msg NickServ REGISTER <password> <email>

Step 3: An email containing an authentication code will be sent to the email address you provided in step 2. Once you receive this email use the authenticate code provided in it using the following command:

/msg NickServ AUTH <auth_code>

Once you successfully register your nickname and authenticate your email address you can identify yourself to NickServ each time you log on.

Note: Unused nicknames may be removed from the database if they're not used a period exceeding 60 days.

Identifying with a password

/msg NickServ IDENTIFY <password>

Once you're logged in you may receive a message like You are now logged in as <nick>

Retrieve a password

If you forgot your password you may use the SENDPASS command from NickServ to have a key sent to the email address corresponding to the specified nickname, that can be used to set a new password using SETPASS. You can use the following syntax to do so:

/msg NickServ SENDPASS <nickname>

Then use the following syntax to change your password:

/msg NickServ SETPASS <nickname> <key> <password>

Where is the key you got from SENDPASS

Drop a Nickname

If you do not wish to use a nickname you can drop it from the NickServ (so that other people can use it if they want to).

/msg NickServ DROP <nickname> <password>

Note: All nicknames linked to a nick will be dropped as well.

Grouping Nicknames

Unregistered nicknames can be grouped with previously registered nicknames without needing to register them. Grouped nicknames inherit the access levels and other network services from the original nickname. The following syntax can be used to group a nickname:

First, identify to your old nick:

/msg NickServ IDENTIFY OldNick SecretPassword

Then:

/msg NickServ GROUP

To ungroup a nickname use the following syntax:

/msg NickServ UNGROUP <nickname>

To view the list of currently linked nicknames use the following syntax:

/msg NickServ INFO

And look for the line starting with "Nicks: "

Dealing with "Nick/channel is temporarily unavailable"

/msg nickserv release <nickname>

Nickname Options

NickServ offers a variety of options which you can set for your nick name. If you would like to set an option you can enter the following syntax:

/msg NickServ SET <option> <parameters>

Some of the options include:

Subcommand Description
ACCOUNTNAME   Changes your account name.
EMAIL         Changes your e-mail address.
EMAILMEMOS    Forwards incoming memos to your e-mail address.
ENFORCE       Enables or disables automatic protection of a nickname.
HIDEMAIL      Hides your e-mail address.
NEVEROP       Prevents you from being added to access lists.
NOMEMO        Disables the ability to receive memos.
NOOP          Prevents services from setting modes upon you automatically.
PASSWORD      Changes the password associated with your account.
PRIVATE       Hides information about you from other users.
PROPERTY      Manipulates metadata entries associated with an account.
PUBKEY        Changes your ECDSA-NIST256p-CHALLENGE public key.
QUIETCHG      Allows you to opt-out of channel change messages.
@parsa
Copy link
Author

parsa commented Feb 5, 2019

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment