- irc_dictionary_destroy(alias_dict, free_alias_cb, NULL);
- alias_dict = NULL;
-
- destroy_blacklists();
-
- /* OK, that should be everything... */
-}
-
-
-/* write_confitem()
- *
- * inputs - kline, dline or resv type flag
- * - client pointer to report to
- * - user name of target
- * - host name of target
- * - reason for target
- * - time string
- * - type of xline
- * output - NONE
- * side effects - This function takes care of finding the right conf
- * file and adding the line to it, as well as notifying
- * opers and the user.
- */
-void
-write_confitem(KlineType type, struct Client *source_p, char *user,
- char *host, const char *reason, const char *oper_reason,
- const char *current_date, int xtype)
-{
- char buffer[1024];
- FILE *out;
- const char *filename; /* filename to use for kline */
-
- filename = get_conf_name(type);
-
- if(type == KLINE_TYPE)
- {
- if(EmptyString(oper_reason))
- {
- sendto_realops_snomask(SNO_GENERAL, L_ALL,
- "%s added K-Line for [%s@%s] [%s]",
- get_oper_name(source_p), user,
- host, reason);
- ilog(L_KLINE, "K %s 0 %s %s %s",
- get_oper_name(source_p), user, host, reason);
- }
- else
- {
- sendto_realops_snomask(SNO_GENERAL, L_ALL,
- "%s added K-Line for [%s@%s] [%s|%s]",
- get_oper_name(source_p), user,
- host, reason, oper_reason);
- ilog(L_KLINE, "K %s 0 %s %s %s|%s",
- get_oper_name(source_p), user, host,
- reason, oper_reason);
- }
-
- sendto_one_notice(source_p, ":Added K-Line [%s@%s]",
- user, host);
- }
- else if(type == DLINE_TYPE)
- {
- if(EmptyString(oper_reason))
- {
- sendto_realops_snomask(SNO_GENERAL, L_ALL,
- "%s added D-Line for [%s] [%s]",
- get_oper_name(source_p), host, reason);
- ilog(L_KLINE, "D %s 0 %s %s",
- get_oper_name(source_p), host, reason);
- }
- else
- {
- sendto_realops_snomask(SNO_GENERAL, L_ALL,
- "%s added D-Line for [%s] [%s|%s]",
- get_oper_name(source_p), host,
- reason, oper_reason);
- ilog(L_KLINE, "D %s 0 %s %s|%s",
- get_oper_name(source_p), host,
- reason, oper_reason);
- }
-
- sendto_one_notice(source_p, ":Added D-Line [%s] to %s", host, filename);
-
- }
- else if(type == RESV_TYPE)
- {
- sendto_realops_snomask(SNO_GENERAL, L_ALL,
- "%s added RESV for [%s] [%s]",
- get_oper_name(source_p), host, reason);
- ilog(L_KLINE, "R %s 0 %s %s",
- get_oper_name(source_p), host, reason);
-
- sendto_one_notice(source_p, ":Added RESV for [%s] [%s]",
- host, reason);
- }
-
- if((out = fopen(filename, "a")) == NULL)