static const char omode_desc[] = "Allow admins to forcibly change modes on channels with the OMODE command";
-static int mo_omode(struct MsgBuf *, struct Client *, struct Client *, int, const char **);
+static void mo_omode(struct MsgBuf *, struct Client *, struct Client *, int, const char **);
struct Message omode_msgtab = {
"OMODE", 0, 0, 0, 0,
* mo_omode - MODE command handler
* parv[1] - channel
*/
-static int
+static void
mo_omode(struct MsgBuf *msgbuf_p, struct Client *client_p, struct Client *source_p, int parc, const char *parv[])
{
struct Channel *chptr = NULL;
if(!IsOperAdmin(source_p))
{
sendto_one(source_p, form_str(ERR_NOPRIVS), me.name, source_p->name, "admin");
- return 0;
+ return;
}
/* Now, try to find the channel in question */
{
sendto_one_numeric(source_p, ERR_BADCHANNAME,
form_str(ERR_BADCHANNAME), parv[1]);
- return 0;
+ return;
}
chptr = find_channel(parv[1]);
{
sendto_one_numeric(source_p, ERR_NOSUCHCHANNEL,
form_str(ERR_NOSUCHCHANNEL), parv[1]);
- return 0;
+ return;
}
/* Now know the channel exists */
if (is_chanop(msptr))
{
sendto_one_notice(source_p, ":Use a normal MODE you idiot");
- return 0;
+ return;
}
params[0] = '\0';
{
sendto_one_numeric(source_p, ERR_USERNOTINCHANNEL,
form_str(ERR_USERNOTINCHANNEL), parv[3], chptr->chname);
- return 0;
+ return;
}
- sendto_channel_local(ALL_MEMBERS, chptr, ":%s MODE %s +o %s",
+ sendto_channel_local(&me, ALL_MEMBERS, chptr, ":%s MODE %s +o %s",
me.name, parv[1], source_p->name);
sendto_server(NULL, chptr, CAP_TS6, NOCAPS,
":%s TMODE %ld %s +o %s",
remove_user_from_channel(msptr);
}
#endif
- return 0;
}