Modules

From ZNC
Jump to: navigation, search

ZNC can dynamically load C++ or Perl modules. To learn more about creation of modules you should read Perl Modules or C++ Modules. On this page the majority of modules is listed. Feel free to create wikipages about modules you created, but don't forget to add a download link, contact information and use the same layout as the rest of the modules. Contributions are always much appreciated.

Modules are categorized in global modules and user modules. Global modules work server-wide. User modules can be specifically loaded per user.

Contents

[edit] Module List

Some of the modules listed here may not be available in the current release. If you want them, you have to use SVN.

[edit] Global Modules

adminlog 
Log user connects and disconnects and failed logins to file or syslog.
blockuser 
Blocks certain users from using ZNC saying their account was disabled.
connect_throttle 
Limit the number of login attempts a user can make per time
droproot 
Allows ZNC to drop root privileges on systems that implement POSIX setuid/setgid.
fail2ban 
Block IPs for some time after a failed login.
imapauth 
Allow users to authenticate via IMAP.
lastseen 
Logs when a user last logged in to ZNC.
modperl 
Loads perl scripts as ZNC modules.
modtcl 
Allows you to run tcl scripts in ZNC, including some eggdrop.
motdfile 
Reads a MOTD from a file and displays it to users when they login.
notify 
Notifies all ZNC users when a client attaches/detaches.
partyline 
Allows ZNC users to join internal channels and query other ZNC users on the same ZNC.
saslauth 
Allow users to authenticate via SASL.
webadmin 
Allows you to add/remove/edit users and settings on the fly via a web browser.
notify_connect 
Sends a notice to all admins when a user logs in or out.

[edit] User Modules

admin 
Allows you to add/remove/edit users and settings on the fly via IRC messages.
amsgfilter 
Filters amsgs from specified channels.
antiidle 
Hides your idle time.
autoattach 
Reattaches you to channels on activity.
autocycle 
Cycles a channel when you are the only one in there and you don't have op.
autoop 
Auto op the good guys.
autoreply 
Gives a automatic reply if someone messages you if you are away.
autovoice
Autovoices everyone who joins some channel.
away 
Stores messages while away, also auto away.
awaynick 
Change your nick while you are away.
buffextras 
Add nick changes, joins, parts, topic changes etc. to your playback buffer.
chansaver 
Keeping config up to date when user joins and parts.
colloquy 
Push private messages and highlights to your iPhone/iPod Touch via Colloquy Mobile.
crypt 
Encryption for channel/private messages.
email 
Monitors email activity on local disk /var/mail/user.
fish 
FiSH encryption for channel/private messages.
fixfreenode 
This module blocks some freenode-specific feature which results in plus (+) and minus (-) signs being displayed in front of every message from a client.
fakeonline 
Fakes online status of ZNC *-users, to fix some clients.
keepnick 
Tries to get you your primary nick.
kickrejoin 
Implements auto-rejoin-on-kick.
log 
Log conversations to file.
nickserv 
Auths you with NickServ.
perform 
Performs commands on connect.
q 
Auths you with Q (and a little more).
raw 
View all of the raw traffic.
route_replies 
Routes back answers to the right client when connected with multiple clients.
sample 
This is an example for writing modules to do whatever you want.
savebuff 
Saves your channel buffers into an encrypted file so they can survive restarts and reboots.
schat 
SSL (encrypted) DCC chats.
send_raw 
Allows you to send raw traffic to IRC from other users.
shell 
Have your unix shell in a query window right inside of your IRC client.
stickychan 
Keeps you sticked to specific channels.
twitter 
Implements a Twitter client. It can post new tweets and monitor searches, users, timeline and @mentions.
watch 
Monitor activity for specific text patterns from specific users and have the text sent to a special query window.

For more modules, see Category:Modules.

[edit] Managing Modules

Modules can be added or removed easily. Modules can be stored in ~/.znc/modules and /usr/local/lib/znc by default. ZNC installs its modules to that second directory, which in fact is ${prefix}/lib/znc, but this can be changed with ./configure --module-prefix=DIR before compiling.

ZNC will first look in the local sub-directory modules when searching for modules. Only files that end with ".so" will be seen as a module. To remove modules you can simply delete them from the folder. No other configuration changes or restarts are necessary. To remove, but also keep a module for later use you can also change the name, like: mv sample.so sample.so_.

To compile a new module you must first save the source as a ".cpp" file. Compiling modules describes the process in detail.

[edit] (Un)Loading Modules

Global modules can be loaded by adding them to your config file (znc.conf) right before the user definitions, like:

LoadModule = <module> <parameters>
<User foo>

If you want to load user modules they have to be added within a specific user, like:

<User foo>
  ...
  LoadModule = <module> <parameters>
  ...
</User>

Alternatively modules can be (un)loaded via the *status query window, like:

/msg *status loadmod <module> <parameters>
/msg *status unloadmod <module>
  • * is the StatusPrefix set in your configuration.
  • <module> is based on the modules file name excluding ".so".
  • <parameters> are specific for each module and not required.

[edit] Using modules

It is recommended to read the module's wikipage if you want to find out how a module works. Alternatively the following command can be used to get a command list:

/msg *<module> help
  • * is the StatusPrefix set in your config file.
Personal tools