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.
Autoop: Difference between revisions
m This module ships with znc. |
Sopel calls them "plugins" now |
||
(One intermediate revision by one other user not shown) | |||
Line 48: | Line 48: | ||
* .chattr <handle> +Zo [channel] | * .chattr <handle> +Zo [channel] | ||
* .aopkey <handle> [key/none] | * .aopkey <handle> [key/none] | ||
== Sopel plugin == | |||
A simple plugin for the [https://github.com/sopel-irc/sopel Sopel] IRC bot is available [https://pastebin.com/5TKSJkkR here]. | |||
The configuration is non-interactive and has to be edited into the plugin's Python file. | |||
[[Category:Modules]] | [[Category:Modules]] |
Latest revision as of 20:16, 9 May 2020
This module is a part of ZNC. This module is shipped with ZNC by default. If you have the right "LoadMod" you can activate it with /znc LoadMod autoop The code for this module can be found here. This module is part of ZNC since 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.
Usage
Arguments
This network module takes no arguments.
Read loading modules to learn more about loading modules.
Commands
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
Here are the steps:
- Frank_ joins #znc and our znc sees that his host matches the "frank" user
- Our znc sends Frank_ a challenge (random string with 32 characters)
- /notice Frank_ !ZNCAO CHALLENGE <challenge>
- Frank_'s znc appends the challenge to his password and creates an md5 of the two together (MD5(KEY + "::" + CHALLENGE))
- Frank_ sends us the result
- /notice us !ZNCAO RESPONSE <response>
- We verify that it matches using his password on file (you supplied his pass when calling AddUser)
- 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.
Usage:
- 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.