mirror of
https://github.com/znc/znc.git
synced 2026-08-03 23:43:42 +02:00
Documentation
git-svn-id: https://znc.svn.sourceforge.net/svnroot/znc/trunk@171 726aef4b-f618-498e-8847-2d620e286838
This commit is contained in:
@@ -0,0 +1,61 @@
|
||||
<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.0 Transitional//EN">
|
||||
<html>
|
||||
<head>
|
||||
<meta http-equiv="Content-Type" content="text/html; charset=iso-8859-1" />
|
||||
<meta name="robots" content="index,follow" />
|
||||
<meta name="language" content="en" />
|
||||
<title>ZNC - Configuration</title>
|
||||
</head>
|
||||
|
||||
<body bgcolor="#FFFFFF" text="#000000" alink="#993333" link="#333399" vlink="#666666">
|
||||
[<a href="index.php">Home</a>]
|
||||
-
|
||||
[<a href="http://sourceforge.net/projects/znc">Project Page</a>]
|
||||
|
||||
<hr noshade>
|
||||
<p />
|
||||
<h2>
|
||||
File Locations
|
||||
</h2>
|
||||
<ul>
|
||||
<li> <strong>Config</strong> - ZNC gets its configuration by reading the file ~/.znc/znc.conf
|
||||
<li> <strong>Misc</strong> - Other files are also stored in the ~/.znc directory such as the SSL cert (znc.pem) and PidFile (znc.pid).
|
||||
<li> <strong>Local Modules</strong> - Stored in ~/.znc/modules. ZNC will look in the local module dir first when trying to load a module.
|
||||
<li> <strong>Global Modules</strong> - Stored in /usr/share/znc/modules by default.
|
||||
<li> <strong>Binaries</strong> - znc, znc-config, and zncchk are all stored in /usr/bin by default. You can change this when you configure by using <em>./configure --prefix=/whatever/path/you/want</em>
|
||||
</ul>
|
||||
<h2>
|
||||
Config File - (~/.znc/znc.conf)
|
||||
</h2>
|
||||
<ul>
|
||||
<li> <strong>ListenPort</strong> - The port that ZNC will listen on. If the port is prepended with a '+' then ZNC listens using ssl.
|
||||
<li> <strong>ISpoofFile</strong> - ZNC will write the ident of the user trying to connect to this file. Very useful if your shell supports oidentd.
|
||||
<li> <strong>PidFile</strong> - The pid file that is needed if you want to crontab the zncchk shell script.
|
||||
<li> <strong>StatusPrefix</strong> - The prefix for the status and module queries.
|
||||
<li> <strong>User</strong> - The user definition, you can have more than one..
|
||||
<ul>
|
||||
<li> <strong>Pass</strong> - Used by the client to connect to ZNC. Can be a hash generated by <em>znc --makepass</em>
|
||||
<li> <strong>Nick, AltNick, Ident, RealName, VHost</strong> - Setup your IRC user info.
|
||||
<li> <strong>ChanModes</strong> - Default modes ZNC will set when you join an empty channel.
|
||||
<li> <strong>KeepNick</strong> - Will keep trying to regain your primary nick if it is in use.
|
||||
<li> <strong>QuitMsg</strong> - The default quit message znc will use when you jump servers or call shutdown.
|
||||
<li> <strong>VersionReply</strong> - The reply sent to CTCP version requests while you are detached.
|
||||
<li> <strong>AutoCycle</strong> - Set this to false if you don't want ZNC to part/join a channel when you are the last user left and not opped.
|
||||
<li> <strong>Buffer</strong> - This is the amount of lines that the playback buffer will store before dropping off the oldest line.
|
||||
<li> <strong>KeepBuffer</strong> - Buffer channels while you are attached and play the whole buffer back to you each time you connect.
|
||||
<li> <strong>Server</strong> - Adds a server to the list of servers ZNC will connect to.
|
||||
<li> <strong>LoadModule</strong> - Load a module on startup
|
||||
<li> <strong>Chan</strong> - Channels you want ZNC to join when first launched.
|
||||
<ul>
|
||||
<li> <strong>Key</strong> - Key for the channel.
|
||||
<li> <strong>Modes</strong> - Modes to override ChanModes.
|
||||
<li> <strong>Buffer</strong> - You can set this to override the Buffer size set in the User section.
|
||||
<li> <strong>KeepBuffer</strong> - You can set this to override the KeepBuffer option set in the User section.
|
||||
<li> <strong>AutoCycle</strong> - You can set this to override the AutoCycle option set in the User section.
|
||||
<li> <strong>Detached</strong> - If true, znc will join this channel as detached so that the IRC client will not be bothered by it.
|
||||
</ul>
|
||||
</ul>
|
||||
</ul>
|
||||
|
||||
</body>
|
||||
</html>
|
||||
@@ -0,0 +1,27 @@
|
||||
<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.0 Transitional//EN">
|
||||
<html>
|
||||
<head>
|
||||
<meta http-equiv="Content-Type" content="text/html; charset=iso-8859-1" />
|
||||
<meta name="robots" content="index,follow" />
|
||||
<meta name="language" content="en" />
|
||||
<title>ZNC - Installation</title>
|
||||
</head>
|
||||
|
||||
<body bgcolor="#FFFFFF" text="#000000" alink="#993333" link="#333399" vlink="#666666">
|
||||
[<a href="index.php">Home</a>]
|
||||
-
|
||||
[<a href="http://sourceforge.net/projects/znc">Project Page</a>]
|
||||
|
||||
<hr noshade>
|
||||
<p />
|
||||
<ol>
|
||||
<li> <a href="http://sourceforge.net/project/showfiles.php?group_id=115828&package_id=125745">Download Tarball</a>
|
||||
<li> tar -xzvf znc*.*gz
|
||||
<li> cd znc*
|
||||
<li> ./configure (use --prefix=/path/to/shell/znc) if you don't want a system wide installation or simply don't have root
|
||||
<li> make
|
||||
<li> make install
|
||||
</ol>
|
||||
|
||||
</body>
|
||||
</html>
|
||||
@@ -0,0 +1,54 @@
|
||||
<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.0 Transitional//EN">
|
||||
<html>
|
||||
<head>
|
||||
<meta http-equiv="Content-Type" content="text/html; charset=iso-8859-1" />
|
||||
<meta name="robots" content="index,follow" />
|
||||
<meta name="language" content="en" />
|
||||
<title>ZNC - Module Hooks</title>
|
||||
</head>
|
||||
|
||||
<body bgcolor="#FFFFFF" text="#000000" alink="#993333" link="#333399" vlink="#666666">
|
||||
[<a href="index.php">Home</a>]
|
||||
-
|
||||
[<a href="http://sourceforge.net/projects/znc">Project Page</a>]
|
||||
|
||||
<hr noshade>
|
||||
<p />
|
||||
<pre>
|
||||
virtual bool OnLoad(const string& sArgs);
|
||||
virtual bool OnBoot();
|
||||
virtual void OnUserAttached();
|
||||
virtual void OnUserDetached();
|
||||
virtual void OnIRCDisconnected();
|
||||
virtual void OnIRCConnected();
|
||||
</pre>
|
||||
<pre>
|
||||
virtual bool OnDCCUserSend(const CNick& RemoteNick, unsigned long uLongIP, unsigned short uPort, const string& sFile, unsigned long uFileSize);
|
||||
</pre>
|
||||
<pre>
|
||||
virtual void OnOp(const CNick& OpNick, const CNick& Nick, const CChan& Channel, bool bNoChange);
|
||||
virtual void OnDeop(const CNick& OpNick, const CNick& Nick, const CChan& Channel, bool bNoChange);
|
||||
virtual void OnVoice(const CNick& OpNick, const CNick& Nick, const CChan& Channel, bool bNoChange);
|
||||
virtual void OnDevoice(const CNick& OpNick, const CNick& Nick, const CChan& Channel, bool bNoChange);
|
||||
virtual void OnRawMode(const CNick& OpNick, const CChan& Channel, const string& sModes, const string& sArgs);
|
||||
</pre>
|
||||
<pre>
|
||||
virtual bool OnUserRaw(string& sLine);
|
||||
virtual bool OnRaw(string& sLine);
|
||||
</pre>
|
||||
<pre>
|
||||
virtual bool OnStatusCommand(const string& sCommand);
|
||||
virtual void OnModCommand(const string& sCommand);
|
||||
virtual void OnModNotice(const string& sMessage);
|
||||
virtual void OnModCTCP(const string& sMessage);
|
||||
</pre>
|
||||
<pre>
|
||||
virtual void OnQuit(const CNick& Nick, const string& sMessage, const vector<CChan*>& vChans);
|
||||
virtual void OnNick(const CNick& Nick, const string& sNewNick, const vector<CChan*>& vChans);
|
||||
virtual void OnKick(const CNick& Nick, const string& sOpNick, const CChan& Channel, const string& sMessage);
|
||||
virtual void OnJoin(const CNick& Nick, const CChan& Channel);
|
||||
virtual void OnPart(const CNick& Nick, const CChan& Channel);
|
||||
</pre>
|
||||
|
||||
</body>
|
||||
</html>
|
||||
@@ -0,0 +1,63 @@
|
||||
<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.0 Transitional//EN">
|
||||
<html>
|
||||
<head>
|
||||
<meta http-equiv="Content-Type" content="text/html; charset=iso-8859-1" />
|
||||
<meta name="robots" content="index,follow" />
|
||||
<meta name="language" content="en" />
|
||||
<title>ZNC - Using Commands</title>
|
||||
</head>
|
||||
|
||||
<body bgcolor="#FFFFFF" text="#000000" alink="#993333" link="#333399" vlink="#666666">
|
||||
[<a href="index.php">Home</a>]
|
||||
-
|
||||
[<a href="http://sourceforge.net/projects/znc">Project Page</a>]
|
||||
|
||||
<hr noshade>
|
||||
<p />
|
||||
<h2>
|
||||
Commands
|
||||
</h2>
|
||||
<p>
|
||||
Commands are given to ZNC by messaging the virtual user *status. Likewise, modules are communicated to by messaging *modname as well.
|
||||
</p>
|
||||
<h3>
|
||||
Example: /msg *status listmods
|
||||
</h3>
|
||||
<pre>
|
||||
<prozac> listmods
|
||||
<*status> +---------+------------------------------------------------------+
|
||||
<*status> | Name | Description |
|
||||
<*status> +---------+------------------------------------------------------+
|
||||
<*status> | email | Monitors Email activity on local disk /var/mail/user |
|
||||
<*status> | shell | Gives shell access. |
|
||||
<*status> | schat | Secure cross platform (:P) chat system |
|
||||
<*status> +---------+------------------------------------------------------+
|
||||
</pre>
|
||||
<p>
|
||||
The prefix for these virtual users can be changed from * in the znc.conf file. It is wise to use a character that is illegal to use on IRC so that you don't lose the ability to talk to a real person who happens to be using the same prefix on their IRC nick.
|
||||
</p>
|
||||
<h2>
|
||||
Command List
|
||||
</h2>
|
||||
<pre>
|
||||
<zncuser> help
|
||||
<*status> +-----------+---------------------+-------------------------------------+
|
||||
<*status> | Command | Arguments | Description |
|
||||
<*status> +-----------+---------------------+-------------------------------------+
|
||||
<*status> | ListDCCs | | List all active DCCs |
|
||||
<*status> | ListMods | | List all loaded modules |
|
||||
<*status> | ListChans | | List all channels |
|
||||
<*status> | ListNicks | <#chan> | List all nicks on a channel |
|
||||
<*status> | Topics | | Show topics in all channels |
|
||||
<*status> | SetBuffer | <#chan> [linecount] | Set the buffer count for a channel |
|
||||
<*status> | Jump | | Jump to the next server in the list |
|
||||
<*status> | Send | <nick> <file> | Send a shell file to a nick on IRC |
|
||||
<*status> | Get | <file> | Send a shell file to yourself |
|
||||
<*status> | LoadMod | <module> | Load a module |
|
||||
<*status> | UnloadMod | <module> | Unload a module |
|
||||
<*status> | ReloadMod | <module> | Reload a module |
|
||||
<*status> +-----------+---------------------+-------------------------------------+
|
||||
</pre>
|
||||
|
||||
</body>
|
||||
</html>
|
||||
@@ -0,0 +1,75 @@
|
||||
<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.0 Transitional//EN">
|
||||
<html>
|
||||
<head>
|
||||
<meta http-equiv="Content-Type" content="text/html; charset=iso-8859-1" />
|
||||
<meta name="robots" content="index,follow" />
|
||||
<meta name="language" content="en" />
|
||||
<title>ZNC - Writing Modules</title>
|
||||
</head>
|
||||
|
||||
<body bgcolor="#FFFFFF" text="#000000" alink="#993333" link="#333399" vlink="#666666">
|
||||
[<a href="index.php">Home</a>]
|
||||
-
|
||||
[<a href="http://sourceforge.net/projects/znc">Project Page</a>]
|
||||
|
||||
<hr noshade>
|
||||
<p />
|
||||
<h2>
|
||||
Overview
|
||||
</h2>
|
||||
<ul>
|
||||
<li> Create your own module.cpp file
|
||||
<li> #include <main.h> and <Modules.h>
|
||||
<li> Create a new class derived from CModule overriding any <a href="ModuleHooks.html">ModuleHooks</a> that you need
|
||||
<li> Be sure to add the macro call <em>MODULEDEFS(CYourClass)</em> at the END of the file
|
||||
<li> Compile your module into a shared object (.so file)
|
||||
<ul>
|
||||
<li> The easy way to compile is to use the znc-buildmod script as long as your module is a single .cpp file
|
||||
<ul>
|
||||
<li> <em>znc-buildmod example.cpp</em>
|
||||
</ul>
|
||||
<li> alternative is to manually compile using znc-config to ensure that you are using the same flags and libs that the znc engine was compiled with
|
||||
<ul>
|
||||
<li> <em>g++ `znc-config --cflags` `znc-config --include` `znc-config --libs` -shared -o example.so example.cpp</em>
|
||||
</ul>
|
||||
</ul>
|
||||
<li> Place the .so file into your ~/.znc/modules directory !!!WARNING!!! if you overwrite a .so file while znc has it loaded it can and probably will crash znc, <em>/msg *status unloadmod foo</em> first!
|
||||
</ul>
|
||||
<h2>
|
||||
Code
|
||||
</h2>
|
||||
<pre>
|
||||
#include <main.h>
|
||||
#include <Modules.h>
|
||||
</pre>
|
||||
<pre>
|
||||
class CExampleMod : public CModule {
|
||||
public:
|
||||
MODCONSTRUCTOR(CExampleMod) {}
|
||||
virtual ~CExampleMod() {}
|
||||
</pre>
|
||||
<pre>
|
||||
virtual void OnModCommand(const string& sCommand) {
|
||||
if (strcasecmp(sCommand.c_str(), "HELP") == 0) {
|
||||
PutModule("I'd like to help, but I am just an example");
|
||||
} else {
|
||||
PutModule("Unknown command, try HELP");
|
||||
}
|
||||
}
|
||||
};
|
||||
</pre>
|
||||
<pre>
|
||||
MODULEDEFS(CExampleMod)
|
||||
</pre>
|
||||
<h2>
|
||||
Output
|
||||
</h2>
|
||||
<pre>
|
||||
<zncuser> test
|
||||
<*example> Unknown command, try HELP
|
||||
<zncuser> help
|
||||
<*example> I'd like to help, but I am just an example
|
||||
</pre>
|
||||
|
||||
</body>
|
||||
</html>
|
||||
@@ -0,0 +1,50 @@
|
||||
<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.0 Transitional//EN">
|
||||
<html>
|
||||
<head>
|
||||
<meta http-equiv="Content-Type" content="text/html; charset=iso-8859-1" />
|
||||
<meta name="robots" content="index,follow" />
|
||||
<meta name="language" content="en" />
|
||||
<title>ZNC - Front Page</title>
|
||||
</head>
|
||||
|
||||
<body bgcolor="#FFFFFF" text="#000000" alink="#993333" link="#333399" vlink="#666666">
|
||||
[<a href="index.html">Home</a>]
|
||||
-
|
||||
[<a href="http://sourceforge.net/projects/znc">Project Page</a>]
|
||||
|
||||
<hr noshade>
|
||||
<p />
|
||||
<h1>
|
||||
ZNC - An advanced IRC bouncer
|
||||
</h1>
|
||||
<h2>
|
||||
Main Features
|
||||
</h2>
|
||||
<ul>
|
||||
<li> <strong>Detaching</strong> - ZNC will stay on IRC even while you are offline.
|
||||
<li> <strong>Multiple Users</strong> - You can add additional users under one running process. Useful for public shells that limit background processes.
|
||||
<li> <strong>Playback Buffers</strong> - Stay up-to-date with what happened while you were detached.
|
||||
<li> <strong>SSL</strong> - Encryption for both the listen port and connecting to IRC servers.
|
||||
<li> <strong>DCC Bouncing</strong> - Transparent bouncing for DCC anonymity.
|
||||
<li> <strong>C++ Modules</strong> - Dynamically loaded shared objects. Just derive from CModule and overload any needed functions such as OnPrivMsg(). IRC scripting in C++, what could be better than that?
|
||||
<ul>
|
||||
<li> <strong>shell</strong> - Have your unix shell in a query window right inside of your IRC client.
|
||||
<li> <strong>savebuff</strong> - Saves your channel buffers into an encrypted file so they can survive restarts and reboots.
|
||||
<li> <strong>email</strong> - Monitors email activity on local disk /var/mail/user
|
||||
<li> <strong>schat</strong> - SSL (encrypted) DCC chats.
|
||||
<li> <strong>watch</strong> - Monitor activity for specific text patterns from specific users and have the text sent to a special query window.
|
||||
<li> <strong>custom</strong> - Write your own modules to do whatever you want.
|
||||
</ul>
|
||||
</ul>
|
||||
<h2>
|
||||
Using ZNC
|
||||
</h2>
|
||||
<ul>
|
||||
<li> <a href="Installation.html">Installation</a>
|
||||
<li> <a href="Configuration.html">Configuration</a>
|
||||
<li> <a href="UsingCommands.html">UsingCommands</a>
|
||||
<li> <a href="WritingModules.html">WritingModules</a>
|
||||
</ul>
|
||||
|
||||
</body>
|
||||
</html>
|
||||
Reference in New Issue
Block a user