To create new wiki account, please join us on #znc at Libera.Chat and ask admins to create a wiki account for you. You can say thanks to spambots for this inconvenience.


From ZNC
Jump to navigation Jump to search

This module is meant to auto op users that you have added to your personal list. It attempts to do so using CRAM-MD5 to increase security, but you should always use with caution.



This network module takes no arguments.

Read loading modules to learn more about loading modules.


First... add a user or two:

/msg *autoop ADDUSER frank *!* pr0z&fr4nkp4ss #mychan

The hostmask format is of the form nick!ident@host, so for the above the nick = *, ident = *frank and host = The supported wildcards are * and ?

<prozac> AddUser frank *!* pr0z&fr4nkp4ss #znc
<*autoop> User [frank] added with hostmask [*!*]
<prozac> listusers
<*autoop> +-------+---------------------------+----------------+----------+
<*autoop> | User  | Hostmask                  | Key            | Channels |
<*autoop> +-------+---------------------------+----------------+----------+
<*autoop> | frank | *!* | pr0z&fr4nkp4ss | #znc     |
<*autoop> +-------+---------------------------+----------------+----------+

Note: You and Frank MUST add eachother with the SAME password as eachother.
If you want to get ZNC to op a-non ZNC user, set the password as __NOKEY__ (in caps, with two underscores each side); then ZNC will just op based on hostmask and whatnot.

Allowed commands to *autoop: ListUsers, AddUser, DelUser, AddChans, DelChans

How it works

Here are the steps:

  1. Frank_ joins #znc and our znc sees that his host matches the "frank" user
  2. Our znc sends Frank_ a challenge (random string with 32 characters)
    1. /notice Frank_ !ZNCAO CHALLENGE <challenge>
  3. Frank_'s znc appends the challenge to his password and creates an md5 of the two together (MD5(KEY + "::" + CHALLENGE))
  4. Frank_ sends us the result
    1. /notice us !ZNCAO RESPONSE <response>
  5. We verify that it matches using his password on file (you supplied his pass when calling AddUser)
  6. If he had the correct response our znc will op him in any and all channels that are associated with his user. In this case the only channel would be #znc

There is a queue and timer involved in this process so the auto op will not happen instantly. This is good for two reasons. First, it won't look like obvious auto ops to other people in the channel. Second, if all of the ops have eachother added to their autoop modules then they shouldn't all send the +o mode to the server.

Eggdrop script

A script that provides a way for Eggdrop bots to give and gain ops the same way as this module exists and can be downloaded here.


  • Load the script, no settings exist.
  • .chattr <handle> +Zo [channel]
  • .aopkey <handle> [key/none]

Sopel plugin

A simple plugin for the Sopel IRC bot is available here.

The configuration is non-interactive and has to be edited into the plugin's Python file.