"Fossies" - the Fresh Open Source Software Archive  

Source code changes of the file "modules/m_knock.c" between
ircd-hybrid-8.2.27.tgz and ircd-hybrid-8.2.28.tgz

About: IRCD-Hybrid is a Internet Relay Chat server.

m_knock.c  (ircd-hybrid-8.2.27.tgz):m_knock.c  (ircd-hybrid-8.2.28.tgz)
skipping to change at line 24 skipping to change at line 24
* GNU General Public License for more details. * GNU General Public License for more details.
* *
* You should have received a copy of the GNU General Public License * You should have received a copy of the GNU General Public License
* along with this program; if not, write to the Free Software * along with this program; if not, write to the Free Software
* Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301
* USA * USA
*/ */
/*! \file m_knock.c /*! \file m_knock.c
* \brief Includes required functions for processing the KNOCK command. * \brief Includes required functions for processing the KNOCK command.
* \version $Id: m_knock.c 9102 2020-01-01 09:58:57Z michael $ * \version $Id: m_knock.c 9199 2020-01-23 17:49:06Z michael $
*/ */
#include "stdinc.h" #include "stdinc.h"
#include "list.h" #include "list.h"
#include "channel.h" #include "channel.h"
#include "channel_mode.h" #include "channel_mode.h"
#include "client.h" #include "client.h"
#include "hash.h" #include "hash.h"
#include "irc_string.h" #include "irc_string.h"
#include "ircd.h" #include "ircd.h"
skipping to change at line 66 skipping to change at line 66
m_knock(struct Client *source_p, int parc, char *parv[]) m_knock(struct Client *source_p, int parc, char *parv[])
{ {
const char *const name = parv[1]; const char *const name = parv[1];
if (EmptyString(name)) if (EmptyString(name))
{ {
sendto_one_numeric(source_p, &me, ERR_NEEDMOREPARAMS, "KNOCK"); sendto_one_numeric(source_p, &me, ERR_NEEDMOREPARAMS, "KNOCK");
return; return;
} }
struct Channel *channel; struct Channel *channel = hash_find_channel(name);
if ((channel = hash_find_channel(name)) == NULL) if (channel == NULL)
{ {
sendto_one_numeric(source_p, &me, ERR_NOSUCHCHANNEL, name); sendto_one_numeric(source_p, &me, ERR_NOSUCHCHANNEL, name);
return; return;
} }
/* Normal channel, just be sure they aren't on it. */ /* Normal channel, just be sure they aren't on it. */
if (IsMember(source_p, channel)) if (IsMember(source_p, channel))
{ {
sendto_one_numeric(source_p, &me, ERR_KNOCKONCHAN, channel->name); sendto_one_numeric(source_p, &me, ERR_KNOCKONCHAN, channel->name);
return; return;
skipping to change at line 162 skipping to change at line 162
static void static void
module_exit(void) module_exit(void)
{ {
mod_del_cmd(&knock_msgtab); mod_del_cmd(&knock_msgtab);
capab_del("KNOCK"); capab_del("KNOCK");
isupport_delete("KNOCK"); isupport_delete("KNOCK");
} }
struct module module_entry = struct module module_entry =
{ {
.version = "$Revision: 9102 $", .version = "$Revision: 9199 $",
.modinit = module_init, .modinit = module_init,
.modexit = module_exit, .modexit = module_exit,
}; };
 End of changes. 3 change blocks. 
4 lines changed or deleted 4 lines changed or added

Home  |  About  |  Features  |  All  |  Newest  |  Dox  |  Diffs  |  RSS Feeds  |  Screenshots  |  Comments  |  Imprint  |  Privacy  |  HTTP(S)