From a36d730dc2c6e6e68d2a84ec8e1c7cff91e2986b Mon Sep 17 00:00:00 2001 From: Russell King Date: Sun, 5 Jun 2016 16:33:27 +0100 Subject: update contrib modules --- contrib/m_force.c | 28 ++++++++++++++++------------ 1 file changed, 16 insertions(+), 12 deletions(-) (limited to 'contrib/m_force.c') diff --git a/contrib/m_force.c b/contrib/m_force.c index 9e8265b..db96553 100644 --- a/contrib/m_force.c +++ b/contrib/m_force.c @@ -50,7 +50,7 @@ * parv[1] = user to force * parv[2] = channel to force them into */ -static void +static int mo_forcejoin(struct Client *client_p, struct Client *source_p, int parc, char *parv[]) { @@ -66,14 +66,14 @@ mo_forcejoin(struct Client *client_p, struct Client *source_p, { sendto_one(source_p, form_str(ERR_NOPRIVILEGES), me.name, source_p->name); - return; + return 0; } if ((target_p = hash_find_client(parv[1])) == NULL || !IsClient(target_p)) { sendto_one(source_p, form_str(ERR_NOSUCHNICK), me.name, source_p->name, parv[1]); - return; + return 0; } if (!MyConnect(target_p)) @@ -89,7 +89,7 @@ mo_forcejoin(struct Client *client_p, struct Client *source_p, source_p->name, target_p->name, parv[2]); } - return; + return 0; } /* select our modes from parv[2] if they exist... (chanop)*/ @@ -127,7 +127,7 @@ mo_forcejoin(struct Client *client_p, struct Client *source_p, { sendto_one(source_p, ":%s NOTICE %s :*** Notice -- %s is already in %s", me.name, source_p->name, target_p->name, chptr->chname); - return; + return 0; } add_user_to_channel(chptr, target_p, type, 0); @@ -191,7 +191,7 @@ mo_forcejoin(struct Client *client_p, struct Client *source_p, { sendto_one(source_p, form_str(ERR_BADCHANNAME), me.name, source_p->name, newch); - return; + return 0; } chptr = make_channel(newch); @@ -225,9 +225,11 @@ mo_forcejoin(struct Client *client_p, struct Client *source_p, sendto_one(source_p, ":%s NOTICE %s :*** Notice -- Creating channel %s", me.name, source_p->name, chptr->chname); } + + return 0; } -static void +static int mo_forcepart(struct Client *client_p, struct Client *source_p, int parc, char *parv[]) { @@ -239,7 +241,7 @@ mo_forcepart(struct Client *client_p, struct Client *source_p, { sendto_one(source_p, form_str(ERR_NOPRIVILEGES), me.name, source_p->name); - return; + return 0; } /* if target_p == NULL then let the oper know */ @@ -247,7 +249,7 @@ mo_forcepart(struct Client *client_p, struct Client *source_p, { sendto_one(source_p, form_str(ERR_NOSUCHNICK), me.name, source_p->name, parv[1]); - return; + return 0; } if (!MyConnect(target_p)) @@ -263,21 +265,21 @@ mo_forcepart(struct Client *client_p, struct Client *source_p, source_p->name, target_p->name, parv[2]); } - return; + return 0; } if ((chptr = hash_find_channel(parv[2])) == NULL) { sendto_one(source_p, form_str(ERR_NOSUCHCHANNEL), me.name, source_p->name, parv[2]); - return; + return 0; } if ((member = find_channel_link(target_p, chptr)) == NULL) { sendto_one(source_p, form_str(ERR_USERNOTINCHANNEL), me.name, source_p->name, chptr->chname, target_p->name); - return; + return 0; } sendto_server(target_p, CAP_TS6, NOCAPS, @@ -292,6 +294,8 @@ mo_forcepart(struct Client *client_p, struct Client *source_p, target_p->host, chptr->chname, target_p->name); remove_user_from_channel(member); + + return 0; } static struct Message forcejoin_msgtab = { -- cgit