summaryrefslogtreecommitdiff
path: root/contrib/m_clearchan.c
diff options
context:
space:
mode:
Diffstat (limited to 'contrib/m_clearchan.c')
-rw-r--r--contrib/m_clearchan.c13
1 files changed, 7 insertions, 6 deletions
diff --git a/contrib/m_clearchan.c b/contrib/m_clearchan.c
index e818fa3..ce7fad2 100644
--- a/contrib/m_clearchan.c
+++ b/contrib/m_clearchan.c
@@ -33,7 +33,6 @@
#include "s_serv.h"
#include "send.h"
#include "irc_string.h"
-#include "sprintf_irc.h"
#include "hash.h"
#include "parse.h"
#include "modules.h"
@@ -50,7 +49,7 @@ static void remove_a_mode(struct Channel *, int, char);
** parv[0] = sender prefix
** parv[1] = channel
*/
-static void
+static int
mo_clearchan(struct Client *client_p, struct Client *source_p,
int parc, char *parv[])
{
@@ -61,21 +60,21 @@ mo_clearchan(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 ((chptr = hash_find_channel(parv[1])) == NULL)
{
sendto_one(source_p, form_str(ERR_NOSUCHCHANNEL),
me.name, source_p->name, parv[1]);
- return;
+ return 0;
}
if (IsMember(source_p, chptr))
{
sendto_one(source_p, ":%s NOTICE %s :*** Please part %s before using CLEARCHAN",
me.name, source_p->name, chptr->chname);
- return;
+ return 0;
}
sendto_wallops_flags(UMODE_WALLOP, &me, "CLEARCHAN called for [%s] by %s!%s@%s",
@@ -119,11 +118,13 @@ mo_clearchan(struct Client *client_p, struct Client *source_p,
chptr->mode.mode = MODE_SECRET | MODE_TOPICLIMIT |
MODE_INVITEONLY | MODE_NOPRIVMSGS;
- set_channel_topic(chptr, "", "", 0);
+ set_channel_topic(chptr, "", "", 0, 0);
chptr->mode.key[0] = '\0';
/* Kick the users out and join the oper */
kick_list(source_p, chptr);
+
+ return 0;
}
static void