Author: Kev <klmitch@mit.edu>
[ircu2.10.12-pk.git] / ircd / m_mode.c
index 474f39b3f3f9fd1b8ae5840b49cb3c1d72263fbc..fb957a4bbd3c89fc3cd53e5ce5fd92fe841d581b 100644 (file)
@@ -86,6 +86,7 @@
 #include "client.h"
 #include "hash.h"
 #include "ircd.h"
+#include "ircd_log.h"
 #include "ircd_reply.h"
 #include "ircd_string.h"
 #include "msg.h"
@@ -96,7 +97,7 @@
 #include "s_user.h"
 #include "send.h"
 
-#include <assert.h>
+/* #include <assert.h> -- Now using assert in ircd_log.h */
 #include <stdlib.h>
 #include <string.h>
 
@@ -112,11 +113,10 @@ m_mode(struct Client *cptr, struct Client *sptr, int parc, char *parv[])
 
   clean_channelname(parv[1]);
 
-  if (('#' != *parv[1] && '&' != *parv[1] && '+' != *parv[1]) || 
-      !(chptr = FindChannel(parv[1])))
+  if (!IsChannelName(parv[1]) || !(chptr = FindChannel(parv[1])))
     return set_user_mode(cptr, sptr, parc, parv);
 
-  cli_flags(sptr) &= ~FLAGS_TS8;
+  ClrFlag(sptr, FLAG_TS8);
 
   member = find_member_link(chptr, sptr);
 
@@ -168,10 +168,10 @@ ms_mode(struct Client *cptr, struct Client *sptr, int parc, char *parv[])
   if (IsLocalChannel(parv[1]))
     return 0;
 
-  if (('#' != *parv[1] && '+' != *parv[1])|| !(chptr = FindChannel(parv[1])))
+  if (!(chptr = FindChannel(parv[1])))
     return set_user_mode(cptr, sptr, parc, parv);
 
-  cli_flags(sptr) &= ~FLAGS_TS8;
+  ClrFlag(sptr, FLAG_TS8);
 
   if (IsServer(sptr)) {
     if (find_conf_byhost(cli_confs(cptr), cli_name(sptr), CONF_UWORLD))