diff options
author | Russell King <rmk+kernel@armlinux.org.uk> | 2016-06-05 16:33:27 +0100 |
---|---|---|
committer | Russell King <rmk+kernel@armlinux.org.uk> | 2019-07-21 20:59:35 +0100 |
commit | 35736254aaf68620da3b3e85c3a959cfaa85b543 (patch) | |
tree | 04d9187054661f5a9b47cfd2c5fcd0b0399dde28 /contrib/m_force.c | |
parent | af95777e04af7f73e565a7a47e37d95c2f7de031 (diff) |
update contrib modules
Diffstat (limited to 'contrib/m_force.c')
-rw-r--r-- | contrib/m_force.c | 28 |
1 files changed, 16 insertions, 12 deletions
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 = { |