Default gecos supporting user hostname insertion
authorDarren <darren@darrenwhitlen.com>
Sun, 5 Jan 2014 23:28:01 +0000 (23:28 +0000)
committerDarren <darren@darrenwhitlen.com>
Sun, 5 Jan 2014 23:28:01 +0000 (23:28 +0000)
config.example.js
server/irc/connection.js

index 77a2729a0e7e56d7322085bcd8b2e9af4e162531..936aea9bfe66b8589354ae58835baebe3db3ff64 100644 (file)
@@ -75,6 +75,7 @@ conf.default_encoding = 'utf8';
 /*
 * Default GECOS (real name) for IRC connections
 * %n will be replaced with the users nick
+* %h will be replaced with the users hostname
 */
 //conf.default_gecos = 'Web IRC Client';
 
index b0f3a939b980d69bf8303b9ce2339a12f5a05e0e..f28fd65ac0a6ad86e3d7543363431e4898c55c43 100644 (file)
@@ -574,6 +574,7 @@ var socketConnectHandler = function () {
 
         if (global.config.default_gecos) {
             gecos = global.config.default_gecos.toString().replace('%n', that.nick);
+            gecos = gecos.toString().replace('%h', that.irc_host.hostname);
         }
 
         // Send any initial data for webirc/etc