From 6aae811eb3d759cd76e3ec9ea740bb68d007dfdc Mon Sep 17 00:00:00 2001 From: William Pitcock Date: Tue, 1 Apr 2008 20:31:26 -0500 Subject: [PATCH 1/7] fix s_log. --- src/s_log.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/s_log.c b/src/s_log.c index de696d3e..3cafbf0e 100644 --- a/src/s_log.c +++ b/src/s_log.c @@ -118,7 +118,7 @@ ilog(ilogfile dest, const char *format, ...) return; va_start(args, format); - ircvsnprintf(buf, sizeof(buf), format, args); + rb_vsnprintf(buf, sizeof(buf), format, args); va_end(args); rb_snprintf(buf2, sizeof(buf2), "%s %s\n", smalldate(), buf); From e410dcf5453e2de009cdf290572b313b1c1331b7 Mon Sep 17 00:00:00 2001 From: William Pitcock Date: Tue, 1 Apr 2008 20:34:02 -0500 Subject: [PATCH 2/7] make s_newconf.c compile --- src/s_newconf.c | 21 ++++++++++++--------- 1 file changed, 12 insertions(+), 9 deletions(-) diff --git a/src/s_newconf.c b/src/s_newconf.c index 8fa1b0dd..222a32e0 100644 --- a/src/s_newconf.c +++ b/src/s_newconf.c @@ -63,13 +63,16 @@ static rb_bh *nd_heap = NULL; static void expire_temp_rxlines(void *unused); static void expire_nd_entries(void *unused); +struct ev_entry *expire_nd_entries_ev = NULL; +struct ev_entry *expire_temp_rxlines_ev = NULL; + void init_s_newconf(void) { - tgchange_tree = New_Patricia(PATRICIA_BITS); - nd_heap = rb_bh_create(sizeof(struct nd_entry), ND_HEAP_SIZE); - eventAddIsh("expire_nd_entries", expire_nd_entries, NULL, 30); - eventAddIsh("expire_temp_rxlines", expire_temp_rxlines, NULL, 60); + tgchange_tree = rb_new_patricia(PATRICIA_BITS); + nd_heap = rb_bh_create(sizeof(struct nd_entry), ND_HEAP_SIZE, "nd_heap"); + expire_nd_entries_ev = rb_event_addish("expire_nd_entries", expire_nd_entries, NULL, 30); + expire_temp_rxlines_ev = rb_event_addish("expire_temp_rxlines", expire_temp_rxlines, NULL, 60); } void @@ -203,7 +206,7 @@ propagate_generic(struct Client *source_p, const char *command, va_list args; va_start(args, format); - ircvsnprintf(buffer, sizeof(buffer), format, args); + rb_vsnprintf(buffer, sizeof(buffer), format, args); va_end(args); sendto_match_servs(source_p, target, cap, NOCAPS, @@ -224,7 +227,7 @@ cluster_generic(struct Client *source_p, const char *command, rb_dlink_node *ptr; va_start(args, format); - ircvsnprintf(buffer, sizeof(buffer), format, args); + rb_vsnprintf(buffer, sizeof(buffer), format, args); va_end(args); RB_DLINK_FOREACH(ptr, cluster_conf_list.head) @@ -796,7 +799,7 @@ void add_tgchange(const char *host) { tgchange *target; - patricia_node_t *pnode; + rb_patricia_node_t *pnode; if(find_tgchange(host)) return; @@ -816,9 +819,9 @@ add_tgchange(const char *host) tgchange * find_tgchange(const char *host) { - patricia_node_t *pnode; + rb_patricia_node_t *pnode; - if((pnode = match_exact_string(tgchange_tree, host))) + if((pnode = rb_match_exact_string(tgchange_tree, host))) return pnode->data; return NULL; From c626889a84d2bd257b411d9702ff60565bfa582f Mon Sep 17 00:00:00 2001 From: William Pitcock Date: Tue, 1 Apr 2008 20:34:58 -0500 Subject: [PATCH 3/7] make s_stats.c compile --- src/s_stats.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/s_stats.c b/src/s_stats.c index 0dd277ea..c972293a 100644 --- a/src/s_stats.c +++ b/src/s_stats.c @@ -284,7 +284,7 @@ count_memory(struct Client *source_p) class_count = rb_dlink_list_length(&class_list) + 1; - count_linebuf_memory(&linebuf_count, &linebuf_memory_used); + rb_count_rb_linebuf_memory(&linebuf_count, &linebuf_memory_used); sendto_one_numeric(source_p, RPL_STATSDEBUG, "z :Users %u(%lu) Invites %u(%lu)", From fa94d8fb9353fc3b2effcd8ad0e36a2979ff5b7c Mon Sep 17 00:00:00 2001 From: William Pitcock Date: Tue, 1 Apr 2008 20:36:50 -0500 Subject: [PATCH 4/7] make s_user.c build. --- include/cache.h | 9 +++++---- src/s_user.c | 6 +++++- 2 files changed, 10 insertions(+), 5 deletions(-) diff --git a/include/cache.h b/include/cache.h index 059c5838..b303f34f 100644 --- a/include/cache.h +++ b/include/cache.h @@ -42,10 +42,11 @@ void free_cachefile(struct cachefile *); void load_help(void); void send_user_motd(struct Client *); +void send_oper_motd(struct Client *); void cache_user_motd(void); -struct Dictionary; -extern struct Dictionary *help_dict_oper; +struct Dictionary; +extern struct Dictionary *help_dict_oper; extern struct Dictionary *help_dict_user; -#endif - +#endif + diff --git a/src/s_user.c b/src/s_user.c index a9537d05..2428c856 100644 --- a/src/s_user.c +++ b/src/s_user.c @@ -290,10 +290,14 @@ register_local_user(struct Client *client_p, struct Client *source_p, const char /* Apply nick override */ if(*source_p->preClient->spoofnick) { + char note[NICKLEN + 10]; + del_from_client_hash(source_p->name, source_p); strlcpy(source_p->name, source_p->preClient->spoofnick, NICKLEN + 1); add_to_client_hash(source_p->name, source_p); - rb_note(source_p->localClient->F->fd, "Nick: %s", source_p->name); + + rb_snprintf(note, NICKLEN + 10, "Nick: %s", source_p->name); + rb_note(source_p->localClient->F, note); } if(!valid_hostname(source_p->host)) From f589ec6fb1c2734e6d44ccf2e3d446f22042dbad Mon Sep 17 00:00:00 2001 From: William Pitcock Date: Tue, 1 Apr 2008 20:40:26 -0500 Subject: [PATCH 5/7] run autoreconf. --- configure | 10 ++++++++++ include/setup.h.in | 3 +++ 2 files changed, 13 insertions(+) diff --git a/configure b/configure index edcf3637..99166102 100755 --- a/configure +++ b/configure @@ -11017,6 +11017,11 @@ cat >>confdefs.h <<\_ACEOF #define MONITOR_HEAP_SIZE 128 _ACEOF + +cat >>confdefs.h <<\_ACEOF +#define AWAY_HEAP_SIZE 128 +_ACEOF + else cat >>confdefs.h <<\_ACEOF @@ -11088,6 +11093,11 @@ cat >>confdefs.h <<\_ACEOF #define MONITOR_HEAP_SIZE 1024 _ACEOF + +cat >>confdefs.h <<\_ACEOF +#define AWAY_HEAP_SIZE 512 +_ACEOF + fi diff --git a/include/setup.h.in b/include/setup.h.in index ea38d3d7..627dd80a 100644 --- a/include/setup.h.in +++ b/include/setup.h.in @@ -1,5 +1,8 @@ /* include/setup.h.in. Generated from configure.ac by autoheader. */ +/* Size of away heap. */ +#undef AWAY_HEAP_SIZE + /* Size of the ban heap. */ #undef BAN_HEAP_SIZE From 696d527789d464b401c2a378595ca5feec3a354b Mon Sep 17 00:00:00 2001 From: William Pitcock Date: Tue, 1 Apr 2008 20:52:46 -0500 Subject: [PATCH 6/7] update CREDITS a little. --- CREDITS | 18 +++++++++++------- 1 file changed, 11 insertions(+), 7 deletions(-) diff --git a/CREDITS b/CREDITS index ce3dd9a9..fe387287 100644 --- a/CREDITS +++ b/CREDITS @@ -1,24 +1,28 @@ $Id: CREDITS 3133 2007-01-21 15:38:16Z jilles $ -Charybdis started as an evolution from ircd-ratbox-2.1.5+datadrain. Its -development is led by a team of dedicated developers who have put a lot -of time into the project. +Charybdis started as an evolution from ircd-ratbox. Its development +is led by a team of dedicated developers who have put a lot of time +into the project, and it has seen use on a variety of different +network configurations. The charybdis core team is listed in nick-alphabetical order: - + +dwr, Valery Yatsko gxti, Michael Tharp jilles, Jilles Tjoelker nenolod, William Pitcock -twincest, River Tarnell -The following people have made contributions to the Charybdis release, +The following people have made contributions to the Charybdis releases, in nick-alphabetical order: AndroSyn, Aaron Sethman anfl, Lee Hardy beu, Elfyn McBratney Entrope, Michael Poole +spb, Stephen Bennett ThaPrince, Jon Christopherson +twincest, River Tarnell w00t, Robin Burchell -Visit the Charybdis website at: http://www.ircd-charybdis.org +Visit the Charybdis website at: http://www.ircd-charybdis.net +Visit us on IRC at: irc.staticbox.net #charybdis From 2cc2e15b4a9c37b36ab33eca52bf0a3716b877ed Mon Sep 17 00:00:00 2001 From: William Pitcock Date: Tue, 1 Apr 2008 20:52:58 -0500 Subject: [PATCH 7/7] oops have to have a space --- CREDITS | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/CREDITS b/CREDITS index fe387287..8c3c087b 100644 --- a/CREDITS +++ b/CREDITS @@ -6,7 +6,7 @@ into the project, and it has seen use on a variety of different network configurations. The charybdis core team is listed in nick-alphabetical order: - + dwr, Valery Yatsko gxti, Michael Tharp jilles, Jilles Tjoelker