* Fix order of port and IP in sample socks4 proxy test.
* Fix a bug in dict_remove2() that corrupted the tree order if a
cleanup function tried to delete another node.
* Fix a buffer overflow in cmd_joiner.
* Get rid of free_nick_info() since it is really just free().
* If our P10 uplink sends an oplevel in a burst, treat it as a chanop.
git-archimport-id: srvx@srvx.net--2004-srvx/srvx--devo--1.3--patch-78
# arch-tag: automatic-ChangeLog--srvx@srvx.net--2004-srvx/srvx--devo--1.3
#
+2004-09-06 13:35:59 GMT Michael Poole <mdpoole@troilus.org> patch-78
+
+ Summary:
+ Fix bugs; better handle oplevels from ircu2.10.12
+ Revision:
+ srvx--devo--1.3--patch-78
+
+ * Fix order of port and IP in sample socks4 proxy test.
+
+ * Fix a bug in dict_remove2() that corrupted the tree order if a
+ cleanup function tried to delete another node.
+
+ * Fix a buffer overflow in cmd_joiner.
+
+ * Get rid of free_nick_info() since it is really just free().
+
+ * If our P10 uplink sends an oplevel in a burst, treat it as a chanop.
+
+ modified files:
+ ChangeLog sockcheck.conf.example src/dict-splay.c src/modcmd.c
+ src/nickserv.c src/proto-p10.c
+
+
2004-08-12 16:06:55 GMT Zoot <zoot@gamesurge.net> patch-77
Summary:
* It would be generally wise to replace the $p$i with a hard-coded
* one; many insecure proxies refuse to connect to themselves.
*/
-"1080:0401$i$p=p=r=o=x=y00" {
+"1080:0401$p$i=p=r=o=x=y00" {
"..5a...." "reject:Unsecured socks4";
};
int
dict_remove2(dict_t dict, const char *key, int no_dispose)
{
- struct dict_node *new_root;
+ struct dict_node *new_root, *old_root;
if (!dict->root)
return 0;
if (dict->first == dict->root) dict->first = dict->first->next;
if (dict->root->next) dict->root->next->prev = dict->root->prev;
if (dict->last == dict->root) dict->last = dict->last->prev;
+ old_root = dict->root;
+ dict->root = new_root;
+ dict->count--;
if (no_dispose) {
- free(dict->root);
+ free(old_root);
} else {
- dict_dispose_node(dict->root, dict->free_keys, dict->free_data);
+ dict_dispose_node(old_root, dict->free_keys, dict->free_data);
}
- dict->root = new_root;
- dict->count--;
return 1;
}
}
static MODCMD_FUNC(cmd_joiner) {
- char cmdname[80];
+ char cmdname[MAXLEN];
if (argc < 2) {
int len = sprintf(cmdname, "%s ", cmd->name);
dict_insert(nickserv_nick_dict, ni->nick, ni);
}
-static void
-free_nick_info(void *vni)
-{
- struct nick_info *ni = vni;
- free(ni);
-}
-
static void
delete_nick(struct nick_info *ni)
{
dict_set_free_keys(nickserv_id_dict, free);
nickserv_nick_dict = dict_new();
- dict_set_free_data(nickserv_nick_dict, free_nick_info);
+ dict_set_free_data(nickserv_nick_dict, free);
nickserv_allow_auth_dict = dict_new();
mode |= MODE_CHANOP;
else if (sep == 'v')
mode |= MODE_VOICE;
- else
+ else if (isdigit(sep)) {
+ mode |= MODE_CHANOP;
+ while (isdigit(*end)) end++;
+ } else
break;
}
if (rel_age < 0)