ViewVC Help
View File | Revision Log | Show Annotations | View Changeset | Root Listing
root/svn/ircd-hybrid/trunk/src/conf.c
(Generate patch)

Comparing ircd-hybrid/trunk/src/conf.c (file contents):
Revision 6698 by michael, Thu Oct 29 13:08:59 2015 UTC vs.
Revision 6956 by michael, Thu Dec 17 10:54:07 2015 UTC

# Line 72 | Line 72 | dlink_list server_items;
72   dlink_list cluster_items;
73   dlink_list operator_items;
74   dlink_list shared_items;
75 < dlink_list xconf_items;
75 > dlink_list gecos_items;
76   dlink_list nresv_items;
77   dlink_list cresv_items;
78  
# Line 137 | Line 137 | map_to_list(enum maskitem_type type)
137    switch (type)
138    {
139      case CONF_XLINE:
140 <      return &xconf_items;
140 >      return &gecos_items;
141        break;
142      case CONF_SHARED:
143        return &shared_items;
# Line 801 | Line 801 | set_default_conf(void)
801    ConfigChannel.disable_fake_channels = 0;
802    ConfigChannel.invite_client_count = 10;
803    ConfigChannel.invite_client_time = 300;
804 +  ConfigChannel.invite_delay_channel = 5;
805    ConfigChannel.knock_client_count = 1;
806    ConfigChannel.knock_client_time = 300;
807    ConfigChannel.knock_delay_channel = 60;
# Line 820 | Line 821 | set_default_conf(void)
821  
822    ConfigGeneral.away_count = 2;
823    ConfigGeneral.away_time = 10;
824 <  ConfigGeneral.max_watch = WATCHSIZE_DEFAULT;
824 >  ConfigGeneral.max_watch = 50;
825    ConfigGeneral.cycle_on_host_change = 1;
826    ConfigGeneral.dline_min_cidr = 16;
827    ConfigGeneral.dline_min_cidr6 = 48;
# Line 836 | Line 837 | set_default_conf(void)
837    ConfigGeneral.dots_in_ident = 0;
838    ConfigGeneral.min_nonwildcard = 4;
839    ConfigGeneral.min_nonwildcard_simple = 3;
840 <  ConfigGeneral.max_accept = 20;
840 >  ConfigGeneral.max_accept = 50;
841    ConfigGeneral.anti_nick_flood = 0;
842    ConfigGeneral.max_nick_time = 20;
843    ConfigGeneral.max_nick_changes = 5;
844    ConfigGeneral.anti_spam_exit_message_time = 0;
845 <  ConfigGeneral.ts_warn_delta = TS_WARN_DELTA_DEFAULT;
846 <  ConfigGeneral.ts_max_delta = TS_MAX_DELTA_DEFAULT;
845 >  ConfigGeneral.ts_warn_delta = 30;
846 >  ConfigGeneral.ts_max_delta = 600;
847    ConfigGeneral.warn_no_connect_block = 1;
848    ConfigGeneral.stats_e_disabled = 0;
849    ConfigGeneral.stats_i_oper_only = 1;  /* 1 = masked */
# Line 870 | Line 871 | set_default_conf(void)
871   static void
872   validate_conf(void)
873   {
873  if (ConfigGeneral.ts_warn_delta < TS_WARN_DELTA_MIN)
874    ConfigGeneral.ts_warn_delta = TS_WARN_DELTA_DEFAULT;
875
876  if (ConfigGeneral.ts_max_delta < TS_MAX_DELTA_MIN)
877    ConfigGeneral.ts_max_delta = TS_MAX_DELTA_DEFAULT;
878
874    if (EmptyString(ConfigServerInfo.network_name))
875      ConfigServerInfo.network_name = xstrdup(NETWORK_NAME_DEFAULT);
876  
877    if (EmptyString(ConfigServerInfo.network_desc))
878      ConfigServerInfo.network_desc = xstrdup(NETWORK_DESC_DEFAULT);
884
885  ConfigGeneral.max_watch = IRCD_MAX(ConfigGeneral.max_watch, WATCHSIZE_MIN);
879   }
880  
881   /* read_conf()
# Line 1042 | Line 1035 | void
1035   cleanup_tklines(void *unused)
1036   {
1037    hostmask_expire_temporary();
1038 <  expire_tklines(&xconf_items);
1038 >  expire_tklines(&gecos_items);
1039    expire_tklines(&nresv_items);
1040    expire_tklines(&cresv_items);
1041   }
# Line 1095 | Line 1088 | oper_privs_as_string(const unsigned int
1088    static char privs_out[IRCD_BUFSIZE];
1089    char *privs_ptr = privs_out;
1090  
1098  *privs_ptr = '0';
1099
1091    for (const struct oper_privs *opriv = flag_list; opriv->flag; ++opriv)
1092      if (port & opriv->flag)
1093        *privs_ptr++ = opriv->c;
1094  
1095 +  if (privs_ptr == privs_out)
1096 +    *privs_ptr++ = '0';
1097 +
1098    *privs_ptr = '\0';
1099  
1100    return privs_out;
# Line 1160 | Line 1154 | clear_out_old_conf(void)
1154    dlink_node *node = NULL, *node_next = NULL;
1155    dlink_list *free_items [] = {
1156      &server_items,   &operator_items,
1157 <     &shared_items,   &xconf_items,
1157 >     &shared_items,   &gecos_items,
1158       &nresv_items, &cluster_items,  &service_items, &cresv_items, NULL
1159    };
1160  
# Line 1288 | Line 1282 | read_conf_files(int cold)
1282    isupport_add("NICKLEN", NULL, ConfigServerInfo.max_nick_length);
1283    isupport_add("NETWORK", ConfigServerInfo.network_name, -1);
1284  
1285 <  snprintf(chanmodes, sizeof(chanmodes), "beI:%d", ConfigChannel.max_bans);
1285 >  snprintf(chanmodes, sizeof(chanmodes), "beI:%u", ConfigChannel.max_bans);
1286    isupport_add("MAXLIST", chanmodes, -1);
1287    isupport_add("MAXTARGETS", NULL, ConfigGeneral.max_targets);
1288    isupport_add("CHANTYPES", "#", -1);
1289  
1290 <  snprintf(chanlimit, sizeof(chanlimit), "#:%d",
1290 >  snprintf(chanlimit, sizeof(chanlimit), "#:%u",
1291             ConfigChannel.max_channels);
1292    isupport_add("CHANLIMIT", chanlimit, -1);
1293 <  snprintf(chanmodes, sizeof(chanmodes), "%s", "beI,k,l,cimnprstCMORS");
1293 >  snprintf(chanmodes, sizeof(chanmodes), "%s", "beI,k,l,cimnprstCMORST");
1294    isupport_add("CHANNELLEN", NULL, CHANNELLEN);
1295    isupport_add("TOPICLEN", NULL, ConfigServerInfo.max_topic_length);
1296    isupport_add("CHANMODES", chanmodes, -1);
# Line 1581 | Line 1575 | find_user_host(struct Client *source_p,
1575      if (target_p->username[0] == '~')
1576        luser[0] = '*';
1577  
1578 <    if (!strcmp(target_p->sockhost, "0"))
1585 <      strlcpy(lhost, target_p->host, HOSTLEN*4 + 1);
1586 <    else
1587 <      strlcpy(lhost, target_p->sockhost, HOSTLEN*4 + 1);
1578 >    strlcpy(lhost, target_p->sockhost, HOSTLEN*4 + 1);
1579      return 1;
1580    }
1581  

Diff Legend

Removed lines
+ Added lines
< Changed lines (old)
> Changed lines (new)