# arch-tag: automatic-ChangeLog--srvx@srvx.net--2006/srvx--devo--1.3
#
+2006-09-23 01:03:08 GMT Michael Poole <mdpoole@troilus.org> patch-48
+
+ Summary:
+ Dummy handling fixes.
+ Revision:
+ srvx--devo--1.3--patch-48
+
+ src/proto-p10.c (irc_notice): Fix the conditions for sending message to
+ IRC.
+ (irc_privmsg): Likewise.
+ (parse_cleanup): Zero num_*_funcs when freeing the corresponding
+ arrays, so that DelUser() doesn't read after free.
+
+ modified files:
+ ChangeLog src/proto-p10.c
+
+
2006-09-23 00:58:27 GMT Michael Poole <mdpoole@troilus.org> patch-47
Summary:
void
irc_notice(struct userNode *from, const char *to, const char *message)
{
- if (to[0] != '#' && to[0] != '$'
- && !deliver_to_dummy(from, GetUserN(to), message, 0))
+ if (to[0] == '#' || to[0] == '$'
+ || !deliver_to_dummy(from, GetUserN(to), message, 0))
putsock("%s " P10_NOTICE " %s :%s", from->numeric, to, message);
}
void
irc_privmsg(struct userNode *from, const char *to, const char *message)
{
- if (to[0] != '#' && to[0] != '$'
- && !deliver_to_dummy(from, GetUserN(to), message, 1))
+ if (to[0] == '#' || to[0] == '$'
+ || !deliver_to_dummy(from, GetUserN(to), message, 1))
putsock("%s " P10_PRIVMSG " %s :%s", from->numeric, to, message);
}
unsigned int nn;
free(of_list);
free(privmsg_funcs);
+ num_privmsg_funcs = 0;
free(notice_funcs);
+ num_notice_funcs = 0;
free(mcf_list);
dict_delete(irc_func_dict);
for (nn=0; nn<dead_users.used; nn++)