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

Difference between revisions of "Autoop"

From ZNC
Jump to: navigation, search
(Commands: Update the *autoop reply on 'listusers'. *autoop shows the key since version 0.045)
m (This module ships with znc.)
 
(One intermediate revision by one other user not shown)
Line 1: Line 1:
 
{{DISPLAYTITLE:autoop}}
 
{{DISPLAYTITLE:autoop}}
 +
{{Core Module | version = 1.0}}
 
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 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.
  
 
== Usage ==
 
== Usage ==
{{Module arguments}}
+
{{Module arguments
 +
| type  = network}}
  
 
=== Commands ===
 
=== Commands ===

Latest revision as of 19:55, 16 July 2014

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.

Usage[edit]

Arguments

This network module takes no arguments.

Read loading modules to learn more about loading modules.

Commands[edit]

First... add a user or two:

/msg *autoop ADDUSER frank *!*frank@franks.vhost.com pr0z&fr4nkp4ss #mychan

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

<prozac> AddUser frank *!*frank@franks.vhost.com pr0z&fr4nkp4ss #znc
<*autoop> User [frank] added with hostmask [*!*frank@franks.vhost.com]
<prozac> listusers
<*autoop> +-------+---------------------------+----------------+----------+
<*autoop> | User  | Hostmask                  | Key            | Channels |
<*autoop> +-------+---------------------------+----------------+----------+
<*autoop> | frank | *!*frank@franks.vhost.com | 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[edit]

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[edit]

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.

Usage:

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