default_operstring = "is an IRC Operator";
default_adminstring = "is a Server Administrator";
+ default_operhost = "staff.testnet.net";
servicestring = "is a Network Service";
disable_fake_channels = no;
tkline_expire_notices = no;
*/
default_adminstring = "is a Server Administrator";
+ /* default operhost: defines the default virtual host that
+ * operators will receiving upon opering up. Can be overriden
+ * by the vhost option in individual operator blocks. This
+ * must be a valid hostmask.
+ */
+ default_operhost = "staff.testnet.net";
+
/* servicestring: defines the response for opered services (+S)
* in /whois queries, eg "is a Network Service".
* This is updated on rehash.
char *default_operstring;
char *default_adminstring;
+ char *default_operhost;
char *servicestring;
char *kline_reason;
&ConfigFileEntry.default_operstring,
"Default operstring at startup.",
},
+ {
+ "default_operhost",
+ OUTPUT_STRING,
+ &ConfigFileEntry.default_operhost,
+ "Default vhost for operators to receive upon opering up.",
+ },
{
"servicestring",
OUTPUT_STRING,
{ "default_operstring", CF_QSTRING, NULL, REALLEN, &ConfigFileEntry.default_operstring },
{ "default_adminstring",CF_QSTRING, NULL, REALLEN, &ConfigFileEntry.default_adminstring },
+ { "default_operhost", CF_QSTRING, NULL, REALLEN, &ConfigFileEntry.default_operhost },
{ "servicestring", CF_QSTRING, NULL, REALLEN, &ConfigFileEntry.servicestring },
{ "egdpool_path", CF_QSTRING, NULL, MAXPATHLEN, &ConfigFileEntry.egdpool_path },
{ "kline_reason", CF_QSTRING, NULL, REALLEN, &ConfigFileEntry.kline_reason },
ConfigFileEntry.default_operstring = rb_strdup("is an IRC operator");
ConfigFileEntry.default_adminstring = rb_strdup("is a Server Administrator");
+ ConfigFileEntry.default_operhost = rb_strdup("");
ConfigFileEntry.servicestring = rb_strdup("is a Network Service");
ConfigFileEntry.default_umodes = UMODE_INVISIBLE;
splitchecking = 0;
}
+ if(!valid_hostname(ConfigFileEntry.default_operhost))
+ {
+ conf_report_error("Warning -- invalid default_operhost specified, ignoring.");
+ ConfigFileEntry.default_operhost = rb_strdup("");
+ }
+
/* Parse the exemptchanops option and set the internal variables
* that we will use. */
char * ech;
else
source_p->umodes |= DEFAULT_OPER_UMODES;
+ if(!EmptyString(ConfigFileEntry.default_operhost))
+ {
+ change_nick_user_host(source_p, source_p->name, source_p->username, ConfigFileEntry.default_operhost, 0, "Changing host");
+
+ sendto_one_numeric(source_p, RPL_HOSTHIDDEN, "%s :is now your hidden host (set by %s)", source_p->host, source_p->servptr->name);
+
+ sendto_server(NULL, NULL,
+ CAP_EUID | CAP_TS6, NOCAPS, ":%s CHGHOST %s :%s",
+ use_id(&me), use_id(source_p), source_p->host);
+ sendto_server(NULL, NULL,
+ CAP_TS6, CAP_EUID, ":%s ENCAP * CHGHOST %s :%s",
+ use_id(&me), use_id(source_p), source_p->host);
+
+ if (!IsDynSpoof(source_p))
+ SetDynSpoof(source_p);
+ }
+
if (oper_p->snomask)
{
source_p->snomask |= oper_p->snomask;