Page MenuHomeDevCentral

D1931.id4880.diff
No OneTemporary

D1931.id4880.diff

diff --git a/pillar/viperserv/bots.sls b/pillar/viperserv/bots.sls
--- a/pillar/viperserv/bots.sls
+++ b/pillar/viperserv/bots.sls
@@ -29,6 +29,7 @@
- transfer
- filesys
- seen
+ nickserv: on
Wearg:
realname: RabbitMQ broker client
@@ -40,6 +41,7 @@
# startup components, with broker/Notifications
# dependencies
- Wearg/Time.tcl
+ nickserv: on
TC2:
realname: Tau Ceti Central
diff --git a/roles/viperserv/eggdrop/config.sls b/roles/viperserv/eggdrop/config.sls
--- a/roles/viperserv/eggdrop/config.sls
+++ b/roles/viperserv/eggdrop/config.sls
@@ -70,6 +70,7 @@
scripts: {{ bot['scripts'] }}
modules: {{ bot['modules'] | default([]) }}
runas: {{ bot['runas'] | default('viperserv') }}
+ nickserv: {{ bot['nickserv'] | default(False) }}
/srv/viperserv/{{ botname }}/motd:
file.managed:
diff --git a/roles/viperserv/eggdrop/files/eggdrop-bot.conf b/roles/viperserv/eggdrop/files/eggdrop-bot.conf
--- a/roles/viperserv/eggdrop/files/eggdrop-bot.conf
+++ b/roles/viperserv/eggdrop/files/eggdrop-bot.conf
@@ -43,9 +43,6 @@
set network freenode
set net-type 5
-set servers {
- chat.freenode.net:+6697
-}
# Main eggdrop settings common to all ViperServ bots
source core.conf
@@ -62,6 +59,26 @@
sql selectdb $sql(database)
sql2 selectdb $sql(database)
+# -------------------------------------------------------------
+# Base settings with scripts dependencies
+# - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
+
+# Dependencies
+source scripts/Core.tcl
+
+# Settings
+{%- if nickserv %}
+set nickserv_password [registry get nickserv.$username.password]
+
+set servers "
+ chat.freenode.net:+6697:$username:$nickserv_password
+"
+{% else %}
+set servers {
+ chat.freenode.net:+6697
+}
+{%- endif %}
+
# -------------------------------------------------------------
# Eggdrop modules
# - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
@@ -74,7 +91,6 @@
# These scripts are provided by the rVIPER distribution.
# - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
-source scripts/Core.tcl
source scripts/Tech.tcl
{% for script in scripts %}
source scripts/{{ script }}{% endfor %}
diff --git a/roles/viperserv/eggdrop/files/rc/eggdrop b/roles/viperserv/eggdrop/files/rc/eggdrop
--- a/roles/viperserv/eggdrop/files/rc/eggdrop
+++ b/roles/viperserv/eggdrop/files/rc/eggdrop
@@ -86,7 +86,7 @@
eggdrop_chdir=${eggdrop_basedir}
home_directory=$(getent passwd $eggdrop_user | cut -d: -f6)
-eggdrop_env="HOME=$home_directory PATH=/sbin:/bin:/usr/sbin:/usr/bin:/usr/local/sbin:/usr/local/bin:$home_directory/bin"
+eggdrop_env="LC_ALL=en_US.UTF-8 MM_CHARSET=UTF-8 LANG=en_US.UTF-8 HOME=$home_directory PATH=/sbin:/bin:/usr/sbin:/usr/bin:/usr/local/sbin:/usr/local/bin:$home_directory/bin"
pidfile=$eggdrop_pidfile
command_args="$eggdrop_conf"

File Metadata

Mime Type
text/plain
Expires
Sun, Nov 24, 12:22 (9 h, 32 m)
Storage Engine
blob
Storage Format
Raw Data
Storage Handle
2260161
Default Alt Text
D1931.id4880.diff (2 KB)

Event Timeline