Difference between revisions of "ZNC"

From Amahi Wiki
Jump to: navigation, search
Line 12: Line 12:
  
 
* As '''root''' user, install one dependency:
 
* As '''root''' user, install one dependency:
{{Code|Lang=Bash|Code=yum -y install mod_ssl}}
+
{{Code|lang=Bash|Code=yum -y install mod_ssl}}
 
<!--* Add the following line to the end of '''''/etc/httpd/conf/httpd.conf''''' if it does not already exist:
 
<!--* Add the following line to the end of '''''/etc/httpd/conf/httpd.conf''''' if it does not already exist:
 
  NameVirtualHost *:443-->
 
  NameVirtualHost *:443-->
Line 18: Line 18:
 
{{Code|RedirectPermanent / <nowiki>https://znc:26244</nowiki>}}
 
{{Code|RedirectPermanent / <nowiki>https://znc:26244</nowiki>}}
 
* Restart the web server:
 
* Restart the web server:
{{Code|Lang=Bash|Code=service httpd restart}}
+
{{Code|lang=Bash|Code=service httpd restart}}
 
* Modify the line in '''''/home/username/.znc/config/znc.conf''''' to read:
 
* Modify the line in '''''/home/username/.znc/config/znc.conf''''' to read:
 
{{Code|Code=Listener4 = +26244}}
 
{{Code|Code=Listener4 = +26244}}
 
* Restart ZNC:
 
* Restart ZNC:
{{Code|service znc restart}}
+
{{Code|lang=Bash|Code=service znc restart}}
 
* Access the web console via '''<nowiki>https://znc:26244</nowiki>'''
 
* Access the web console via '''<nowiki>https://znc:26244</nowiki>'''
 
* All connections with IRC clients will be SSL.  When you add new servers, ensure you precede the port number with a '''+'''.  The default server on install is already set for SSL communication.
 
* All connections with IRC clients will be SSL.  When you add new servers, ensure you precede the port number with a '''+'''.  The default server on install is already set for SSL communication.

Revision as of 01:47, 6 February 2011

ZNC is an IRC bounce with many advanced features such as a built-in web interface, persistent connection (detaching), multiple users, per channel playback buffer, SSL, IPv6, transparent DCC bouncing, and c++ module support, to name a few.

About ZNC in Amahi

  • Currently BETA in Amahi.
  • The application makes use of your HDA first admin user. To log in to the web interface, enter that user name and the password is admin. You can change the password once logged in to anything you desire.
  • Once the application is installed, you are automatically connected to the IRC for the server irc.freenode.net. This setting can be turned off via the web interface if you do not want to autoconnect when ZNC is started.
  • ZNC appears in the Servers tab so you can stop, start, and restart as needed.

SSL Configuration

To enable SSL support, some manual configuration must be done.

  • As root user, install one dependency:
Bash code
​yum -y install mod_ssl​
  • Change the line in /etc/httpd/conf.d/####-znc.conf to read (replace #### with the number in your file name):
bash code
​RedirectPermanent / https://znc:26244​
  • Restart the web server:
Bash code
​service httpd restart​
  • Modify the line in /home/username/.znc/config/znc.conf to read:
bash code
​Listener4 = +26244​
  • Restart ZNC:
Bash code
​service znc restart​
  • Access the web console via https://znc:26244
  • All connections with IRC clients will be SSL. When you add new servers, ensure you precede the port number with a +. The default server on install is already set for SSL communication.


NOTE: See ZNC Configuration for more guidance on customization.

IRC Client Setup

mIRC

When using the mIRC client you will need to connect to ZNC using the following command:

/server -m <yourHdaIp> -p 26244 -g gZNC -w <username>:<password> -d ZNC

Chatzilla (FireFox Add-on)

After installation of Chatzilla Add-on you can write the following in your browsers address bar:

Link
​irc://<YouHdaIp>:26244/<channel>/?pass=<ZncUser>:<ZncUserPass>


or

Link
​irc://<YourHdaIp>:26244/,needpass?pass=<ZncUser>:<ZncUserPass>


or SSL

Link
​ircs://<YourHdaIp>:26244/,needpass?pass=<ZncUser>:<ZncUserPass>


Client Commands

Commands are given to ZNC by messaging the virtual user *status. Likewise, modules are communicated to by messaging *modname as well. Alternatively you can use /znc command instead of /msg *status command and /znc *module command instead of /msg *module command.

Command Arguments Description
Version Prints which version of znc this is
ListDCCs List all active DCCs
ListMods List all loaded modules
ListAvailMods List all available modules
ListChans List all channels
ListNicks <#chan> List all nicks on a channel
ListServers List all servers
AddServer <host> [[+]port] [pass] Add a server to the list
RemServer <host> Remove a server from the list
Enablechan <#chan> Enable the channel
Detach <#chan> Detach from the channel
Topics Show topics in all channels
PlayBuffer <#chan> Play back the buffer for a given channel
ClearBuffer <#chan> Clear the buffer for a given channel
ClearAllChannelBuffers Clear the channel buffers
SetBuffer <#chan> [linecount] Set the buffer count for a channel
SetVHost <vhost (ip preferred)> Set the VHost for this connection
ClearVHost Clear the VHost for this connection
Jump Jump to the next server in the list
Disconnect Disconnect from IRC
Connect Reconnect to IRC
Send <nick> <file> Send a shell file to a nick on IRC
Get <file> Send a shell file to yourself
LoadMod <module> Load a module
UnloadMod <module> Unload a module
ReloadMod <module> Reload a module
ShowMOTD Show the message of the day
SetMOTD <Message> Set the message of the day
AddMOTD <Message> Append <Message> to MOTD
ClearMOTD Clear the MOTD
Rehash Reload znc.conf from disk
SaveConfig Save the current settings to disk
ListUsers List all users/clients connected to znc
ListClients [User] List all clients connected to your znc user
Traffic Show basic traffic stats for all znc users
Uptime Show how long ZNC is already running
Broadcast [message] Broadcast a message to all users
Shutdown [message] Shutdown znc completely
Restart [message] Restarts znc


NOTE: Go here for guidance on how to use ZNC modules.

Troubleshooting

ZNC can't connect to server (No route to host)

If ZNC can't connect to a IRC server with the message:

Attempting to connect to [chat.freenode.net +7000] ...
Disconnected from IRC (No route to host).  Reconnecting...

You could try using the IP address of the server you are trying to connect to. For chat.freenode.net this IP is: 140.211.166.3

  • Go to your ZNC webadmin page
  • Login using your username and password
  • Click on "Your Settings"
  • Edit the server name in the Servers: text box.

ZNC will pickup this new server name the next time trying to connect (wait a minute or so).