webadmin
From ZNC
| Languages: |
English • Deutsch |
This module allows you to administrate your ZNC bouncer through a web interface.
Contents |
[edit] Usage
Arguments
This global module takes up to three arguments. The arguments are [-noircport] [-ipv6] [ip] [[+]port].
Read loading modules to learn more about loading modules.
- The + in front of the port indicates that you want it to listen using SSL, if no port is specified, no dedicated webadmin port will be used.
- Note: SSL must be enabled if you want it to listen using SSL.
- The IP indicates that you want to bind the webinterface to a specific host.
- Add -ipv6 if you want to listen on a IPv6 host.
- Unless you use -noircport, webadmin will also accept HTTP connections on ZNC's normal IRC ports.
[edit] Connecting
- By default webadmin runs on the same port as your znc is accessible.
Once the module is loaded it listens on the specified port using the HTTP protocol. You may connect to the module using a web browser. For example, if your ZNC is running on a shell called foo.com and it listens on port 8080 non-SSL, then you would open up your favorite browser and go to this URL:
If you enabled ssl, you would instead use this:
Once you connect, the module will prompt you for a username and password.
Non-admin ZNC users are able to connect to this module using their ZNC username and password to authenticate. When a non-admin user authenticates he is only allowed to edit his own settings. If an admin user logs in, he is also able to modify the settings of other users, add or delete users and modify global ZNC settings.
[edit] Functions
After you connect as an admin user you are able to:
- Edit ZNC settings such as the ISpoofFile, Global Modules and VHosts.
- List all users
- Edit a user - Change any and all user settings
- Add a new user
(standard ZNC users can only edit their own user.)
You can add admin users by logging into the admin interface and edit a user and then activating the admin option. You can also define it in the config file:
<User foo>
...
Admin = true
...
</User>
[edit] Skins
You can add your own style to the webadmin user interface. All of the HTML has been stripped out of the module and put into templates.
[edit] Skinpath
To add your own skin you need to create some directories in the webadmin module's skins dir.
First, find the path to where you installed znc. If you're not sure you can type which znc and it will tell you something like /usr/bin/znc or /usr/local/bin/znc. You take everything before the /bin/znc to figure out the path we're after. If it is not found at all, you probably don't have it installed in the system and you probably know where it is located since you cd into the znc dir and run ./znc to start it.
Let's assume you have installed znc into your system under /usr. The webadmin skins would be in the /usr/share/znc/webadmin/skins dir.
So now that you're in the right place, the best way to begin is to run cp -r default myskin to copy over the default skin for your editing pleasure. Then run cd myskin
[edit] Files to Edit
If you like the layout and all you are worried about is colors you can just edit this file:
css/main.css
If you want to change the layout you will want to edit these template files:
Channel.tmpl Error.tmpl Footer.tmpl Header.tmpl ListUsers.tmpl Main.tmpl Settings.tmpl UserPage.tmpl
The most important ones are Header.tmpl and Footer.tmpl which will be all of the static (non changing) portions of every page. By editing only those files and the data/main.css file to change color, you could effectively create a good looking custom skin.
If you want to use images you have to store them in the data directory and reference them by using src="<?VAR Skin ESC=URL?>/foo.jpg" in the template file. The /<Skin name> path is mapped to <zncpath>/webadmin/skins/<current skin>/data.
You should only use relative URLs in your skin. This should make embedding webadmin into other pages easier (e.g. through a reverse proxy which maps the /znc/ subpath to webadmin).
[edit] Skin download
You might just download a skin that's already modified and unpack it into the skin-directorie like described above.
Additional avalible Skins are:
GreenVision - http://un1matr1x.de/home/webadmin-skins-f8/green-vision-0-2-t3.html