unrealircd

- supernets unrealircd source & configuration
git clone git://git.acid.vegas/unrealircd.git
Log | Files | Refs | Archive | README | LICENSE

unsqline.c (1920B)

      1 /*
      2  *   Unreal Internet Relay Chat Daemon, src/modules/unsqline.c
      3  *   (C) 2000-2001 Carsten V. Munk and the UnrealIRCd Team
      4  *   Moved to modules by Fish (Justin Hammond)
      5  *
      6  *   This program is free software; you can redistribute it and/or modify
      7  *   it under the terms of the GNU General Public License as published by
      8  *   the Free Software Foundation; either version 1, or (at your option)
      9  *   any later version.
     10  *
     11  *   This program is distributed in the hope that it will be useful,
     12  *   but WITHOUT ANY WARRANTY; without even the implied warranty of
     13  *   MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
     14  *   GNU General Public License for more details.
     15  *
     16  *   You should have received a copy of the GNU General Public License
     17  *   along with this program; if not, write to the Free Software
     18  *   Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA.
     19  */
     20 
     21 #include "unrealircd.h"
     22 
     23 CMD_FUNC(cmd_unsqline);
     24 
     25 #define MSG_UNSQLINE    "UNSQLINE"      /* UNSQLINE */
     26 
     27 ModuleHeader MOD_HEADER
     28   = {
     29 	"unsqline",	/* Name of module */
     30 	"5.0", /* Version */
     31 	"command /unsqline", /* Short description of module */
     32 	"UnrealIRCd Team",
     33 	"unrealircd-6",
     34     };
     35 
     36 /* This is called on module init, before Server Ready */
     37 MOD_INIT()
     38 {
     39 	CommandAdd(modinfo->handle, MSG_UNSQLINE, cmd_unsqline, MAXPARA, CMD_SERVER);
     40 	MARK_AS_OFFICIAL_MODULE(modinfo);
     41 	return MOD_SUCCESS;
     42 }
     43 
     44 /* Is first run when server is 100% ready */
     45 MOD_LOAD()
     46 {
     47 	return MOD_SUCCESS;
     48 }
     49 
     50 /* Called when module is unloaded */
     51 MOD_UNLOAD()
     52 {
     53 	return MOD_SUCCESS;
     54 }
     55 
     56 /* cmd_unsqline
     57 **	parv[1] = nickmask
     58 */
     59 CMD_FUNC(cmd_unsqline)
     60 {
     61 	const char *tkllayer[6] = {
     62 		me.name,           /*0  server.name */
     63 		"-",               /*1  - */
     64 		"Q",               /*2  Q   */
     65 		"*",               /*3  unused */
     66 		parv[1],           /*4  host */
     67 		client->name       /*5  whoremoved */
     68 	};
     69 
     70 	if (parc < 2)
     71 		return;
     72 
     73 	cmd_tkl(&me, NULL, 6, tkllayer);
     74 }