[PATCH] ZNC: Update to 0.096, fix build and minor changes.
authorJo-Philipp Wich <jow@openwrt.org>
Mon, 13 Dec 2010 18:36:41 +0000 (18:36 +0000)
committerJo-Philipp Wich <jow@openwrt.org>
Mon, 13 Dec 2010 18:36:41 +0000 (18:36 +0000)
Several small fixes for ZNC:
 * Update to current 0.096, include new module
 * Fix build to not link modules against libstdc++
 * Move root check to after module load, to remove the 30 second pause on start.
 * Add the possibility to directly use hashed passwords.
 * Make the sample config more verbose for easier adaption.
Signed-off-by: Jonas Gorski <jonas.gorski+openwrt@gmail.com>
SVN-Revision: 24548

net/znc/Makefile
net/znc/files/znc.conf
net/znc/files/znc.init

index caa635c8b667c5692fbba828205050da3d99a5b2..d139947237e0f0a809198927547eada1286eaf54 100644 (file)
@@ -8,12 +8,12 @@
 include $(TOPDIR)/rules.mk
 
 PKG_NAME:=znc
-PKG_VERSION:=0.094
-PKG_RELEASE:=2
+PKG_VERSION:=0.096
+PKG_RELEASE:=1
 
 PKG_SOURCE:=$(PKG_NAME)-$(PKG_VERSION).tar.gz
 PKG_SOURCE_URL:=@SF/znc
-PKG_MD5SUM:=db101f7a7756285d824b59e3b33e3ad5
+PKG_MD5SUM:=38eec4f1911a68b4d2fc704170e7cbf6
 
 PKG_BUILD_PARALLEL:=1
 
@@ -45,11 +45,11 @@ endef
 
 
 CONFIGURE_VARS += \
-       CXX="$(STAGING_DIR)/host/bin/g++-uc"
+       CXX="$(STAGING_DIR)/host/bin/g++-uc" \
        CXXFLAGS="$(TARGET_CFLAGS) -fno-builtin -fno-rtti -nostdinc++" \
        CPPFLAGS="-I$(STAGING_DIR)/usr/include -I$(STAGING_DIR)/include" \
        LDFLAGS="-nodefaultlibs -L$(STAGING_DIR)/usr/lib -L$(STAGING_DIR)/lib" \
-       LIBS="-luClibc++ -lm -lssl $(LIBGCC_S) -lc"
+       LIBS="-luClibc++ -lm -lssl -lcrypto $(LIBGCC_S) -lc"
 
 CONFIGURE_ARGS += \
        --disable-c-ares \
@@ -192,6 +192,9 @@ $(eval $(call module,autovoice,Autovoices everyone who joins some channel., \
 $(eval $(call module,block-motd,This module blocks the server's Message of the \
        Day.,extra/))
 
+$(eval $(call module,clearbufferonmsg,This module keeps the buffer until the \
+       next message from the client.,extra/))
+
 $(eval $(call module,ctcpflood,This module tries to block ctcp floods.,extra/))
 
 $(eval $(call module,fakeonline,This module fakes the online status of \
index ea7f46047e391f67c0ece1c71a87b2df3abca9cf..f7eceb1d63c3954a7cd6ee4b46554e5c589dacca 100644 (file)
@@ -1,15 +1,23 @@
 config znc
        # where to listen for connections
        list listener   '192.168.1.1 1234'
+       # load global modules (You need to install them first):
+       # list module 'fail2ban'
 
 config user 'sampleUser'
+       # Use either a plain text password or use the full sha256#... line.
+       # You can generate one with 'znc -s'.
        option password 'changeme'
        option nick     'sampleUser'
        option altnick  'userSample'
        option ident    'openwrt'
        option realname 'John Doe'
+
        # This adds support for channels in znc configuration:
        # list channel    '#chan optional_password'
 
-       # list of allowed servers
+       # list of allowed servers:
        list server     'chat.freenode.net 6667'
+
+       # load user modules ('<module> [params...]'):
+       # list module 'simple_away -timer 10 disconnected'
index 35aba1c861b1614a29d46c60f7dbc22d9f3c95ca..856b64696ba65c585dd0ce424d3f4da2d29dccf4 100644 (file)
@@ -67,7 +67,16 @@ add_user() {
        config_get vhost "$user" vhost
 
        echo "<User $user>" >> $ZNC_CONFIG
-       echo "  Pass = plain#$password" >> $ZNC_CONFIG
+
+       case "$password" in
+       "md5#"* | "sha256#"* | "plain#"*)
+               echo "  Pass = $password" >> $ZNC_CONFIG
+               ;;
+       *)
+               echo "  Pass = plain#$password" >> $ZNC_CONFIG
+               ;;
+       esac
+
        echo "  Nick = $nick" >> $ZNC_CONFIG
        echo "  AltNick = ${altnick:-$nick"_"}" >> $ZNC_CONFIG
        echo "  Ident = ${ident:-$nick}" >> $ZNC_CONFIG