Clean these modules up.

This commit is contained in:
William Pitcock 2008-04-01 16:12:16 -05:00
parent 0e7cb7e6a1
commit 75d600888f
2 changed files with 9 additions and 5 deletions

View file

@ -79,16 +79,18 @@ mapi_hfn_list_av1 list_hfnlist[] = {
DECLARE_MODULE_AV1(list, _modinit, _moddeinit, list_clist, NULL, list_hfnlist, "$Revision: 3372 $"); DECLARE_MODULE_AV1(list, _modinit, _moddeinit, list_clist, NULL, list_hfnlist, "$Revision: 3372 $");
static struct ev_entry *iterate_clients_ev = NULL;
static int _modinit(void) static int _modinit(void)
{ {
rb_event_add("safelist_iterate_clients", safelist_iterate_clients, NULL, 3); iterate_clients_ev = rb_event_add("safelist_iterate_clients", safelist_iterate_clients, NULL, 3);
return 0; return 0;
} }
static void _moddeinit(void) static void _moddeinit(void)
{ {
rb_event_delete(safelist_iterate_clients, NULL); rb_event_delete(iterate_clients_ev);
} }
static void safelist_check_cliexit(hook_data_client_exit * hdata) static void safelist_check_cliexit(hook_data_client_exit * hdata)
@ -224,7 +226,7 @@ static int mo_list(struct Client *client_p, struct Client *source_p, int parc, c
*/ */
static int safelist_sendq_exceeded(struct Client *client_p) static int safelist_sendq_exceeded(struct Client *client_p)
{ {
if (linebuf_len(&client_p->localClient->buf_sendq) > (get_sendq(client_p) / 2)) if (rb_linebuf_len(&client_p->localClient->buf_sendq) > (get_sendq(client_p) / 2))
return YES; return YES;
else else
return NO; return NO;
@ -260,7 +262,7 @@ static void safelist_client_instantiate(struct Client *client_p, struct ListClie
sendto_one(client_p, form_str(RPL_LISTSTART), me.name, client_p->name); sendto_one(client_p, form_str(RPL_LISTSTART), me.name, client_p->name);
/* pop the client onto the queue for processing */ /* pop the client onto the queue for processing */
dlinkAddAlloc(client_p, &safelisting_clients); rb_dlinkAddAlloc(client_p, &safelisting_clients);
/* give the user some initial data to work with */ /* give the user some initial data to work with */
safelist_iterate_client(client_p); safelist_iterate_client(client_p);

View file

@ -154,6 +154,7 @@ me_rsfnc(struct Client *client_p, struct Client *source_p,
struct Client *target_p; struct Client *target_p;
struct Client *exist_p; struct Client *exist_p;
time_t newts, curts; time_t newts, curts;
char note[NICKLEN + 10];
if(!(source_p->flags & FLAGS_SERVICE)) if(!(source_p->flags & FLAGS_SERVICE))
return 0; return 0;
@ -237,7 +238,8 @@ me_rsfnc(struct Client *client_p, struct Client *source_p,
del_all_accepts(target_p); del_all_accepts(target_p);
rb_note(target_p->localClient->F->fd, "Nick: %s", target_p->name); rb_snprintf(note, NICKLEN + 10, "Nick: %s", target_p->name);
rb_note(target_p->localClient->F, note);
return 0; return 0;
} }