- Fixed -Wall warnings for TStime
- Compile fix for TS2ts
- Small release tricks
+*** beta7 released ***
+- Fixed a win32 editor bug where the line count didn't display right away (reported by
+ iDW-badSol)
+- Module Insanity Recode (part 1) if the module version is 3.2-b8* we now pass a ModuleInfo struct
+ to Mod_Init which contains extended information. This replaces the Mod_Handle method in beta7
+- Module Insanity prototype fix
+- Fixed a listen::options::serversonly bug reported by swissSolaris (#0000084)
+- Fixed leftovers of non- char *configfile compliance. Thanks to ace and
+ various other people ..
+- Fixed a /mkpasswd typo and added the updated /mkpasswd syntax to doc/unrealircd.doc, both
+ reported by peck
+- Made the command system use module objects (haven't yet converted modules to use it)
+- Fix with DEBUGMODE
+- Fixed a Chinese nick bug found and fixed by Xuefer
+- Fix with status needed for remote clients too. Found by
+ Craig/FrostyCoolSlug <Craig@e-tidalwave.org>
+- Fixed m_oper setting +O on globops
+- Fixed bug with mode buffer overflow .. I'm not 100% positive it works..
+ Thanks to larne, Luke, SciFi, panda, ^Tux^.. Syzop .. and the countless
+ people bitching about their servers going down.
+*** beta8 released ***
*** MKPASSWD Command ***
This command will encrypt the string it has been given
- So u can add it directly to the ircd.conf if you use
- Encrypted passwords.
+ So u can add it directly to the unrealircd.conf if you use
+ Encrypted passwords. Type can be crypt, sha1, or md5. Sha1
+ and md5 are only available when compiled with SSL support.
- Syntax : MKPASSWD <string to be encrypted>
+ Syntax : MKPASSWD <method> <password>
*** TSCTL Command ***
help Mkpasswd {
" This command will Encrypt the string it has been given";
- " So you can add it directly to the ircd.conf if you use";
- " Encrypted passwords.";
+ " So you can add it directly to the unrealircd.conf if you use";
+ " Encrypted passwords. Type can be crypt, sha1, or md5. Sha1";
+ " and md5 are only available when compiled with SSL support.";
" -";
" Syntax: MKPASSWD <method> <password>";
" Example: MKPASSWD crypt mpsare";
#ifndef USE_LOCALE
#undef tolower
-#define tolower(c) (tolowertab[(int)(c)])
+#define tolower(c) (tolowertab[(u_char)(c)])
#undef toupper
-#define toupper(c) (touppertab[(int)(c)])
+#define toupper(c) (touppertab[(u_char)(c)])
#undef isalpha
#undef isdigit
*/
extern aCommand *CommandHash[256];
extern void init_CommandHash(void);
-extern void add_Command_backend(char *cmd, int (*func)(), unsigned char parameters, unsigned char token, int flags);
+extern aCommand *add_Command_backend(char *cmd, int (*func)(), unsigned char parameters, unsigned char token, int flags);
extern void add_Command(char *cmd, char *token, int (*func)(), unsigned char parameters);
extern void add_Command_to_list(aCommand *item, aCommand **list);
extern aCommand *del_Command_from_list(aCommand *item, aCommand **list);
Module *child; /* Aww. aint it cute? */
} ModuleChild;
+typedef struct {
+ int size;
+ int module_load;
+ Module *handle;
+} ModuleInfo;
+
+
#define MOBJ_EVENT 0x0001
#define MOBJ_HOOK 0x0002
#define MOBJ_COMMAND 0x0004
+typedef struct _command {
+ struct _command *prev, *next;
+ aCommand *cmd, *tok;
+} Command;
+
typedef struct _ModuleObject {
struct _ModuleObject *prev, *next;
short type;
union {
Event *event;
Hook *hook;
- aCommand *command;
+ Command *command;
} object;
} ModuleObject;
#define RunHook2(hooktype,x,y) for (global_i = Hooks[hooktype]; global_i; global_i = global_i->next) (*(global_i->func.intfunc))(x,y)
+Command *CommandAdd(Module *module, char *cmd, char *tok, int (*func)(), unsigned char params, int flags);
+void CommandDel(Command *command);
+
/* Hook types */
#define HOOKTYPE_LOCAL_QUIT 1
#define HOOKTYPE_LOCAL_NICKCHANGE 2
#define M_ALIAS 0x0020
#define M_RESETIDLE 0x0040
-struct Command {
- aCommand *prev, *next;
- char *cmd;
- int (*func) ();
- int flags;
- unsigned int count;
- unsigned parameters : 5;
- unsigned token : 1;
- unsigned long bytes;
-#ifdef DEBUGMODE
- unsigned long lticks;
- unsigned long rticks;
-#endif
-};
/* tkl:
char username[USERLEN + 1]; /* username here now for auth stuff */
char info[REALLEN + 1]; /* Free form additional client information */
aClient *srvptr; /* Server introducing this. May be &me */
+ short status; /* client type */
/*
** The following fields are allocated only for local clients
** (directly connected to *this* server with a socket.
int count; /* Amount of data in buffer */
#if 1
int oflag; /* oper access flags (removed from anUser for mem considerations) */
- short status; /* client type */
TS since; /* time they will next be allowed to send something */
TS firsttime; /* Time it was created */
TS lasttime; /* last time any message was received */
#define EVENT_HASHES EVENT_DRUGS
#include "modules.h"
#include "events.h"
+struct Command {
+ aCommand *prev, *next;
+ char *cmd;
+ int (*func) ();
+ int flags;
+ unsigned int count;
+ unsigned parameters : 5;
+ unsigned token : 1;
+ unsigned long bytes;
+ Module *owner;
+#ifdef DEBUGMODE
+ unsigned long lticks;
+ unsigned long rticks;
+#endif
+};
#endif /* __struct_include__ */
#define PATCH1 "3"
#define PATCH2 ".2"
#define PATCH3 "-Selene"
-#define PATCH4 "[beta7]"
+#define PATCH4 "[beta8]"
#define PATCH5 ""
#define PATCH6 ""
#define PATCH7 ""
me.name, cptr->name, *curchr);
break;
}
+ if (paracount > parc)
+ break;
+
if (parv[paracount] && ((strlen(parv[paracount]) >= MODEBUFLEN)))
parv[paracount][MODEBUFLEN - 1] = '\0';
paracount +=
#endif
init_dynconf();
#ifdef STATIC_LINKING
- l_commands_Init();
+ {
+ ModuleInfo ModCoreInfo;
+ ModCoreInfo.size = sizeof(ModuleInfo);
+ ModCoreInfo.module_load = 0;
+ ModCoreInfo.handle = NULL;
+ l_commands_Init(&ModCoreInfo);
+ }
#endif
/* Add default class */
default_class = (ConfigItem_class *) MyMallocEx(sizeof(ConfigItem_class));
void *mod
#endif
);
-
#ifdef UNDERSCORE
void *obsd_dlsym(void *handle, char *symbol) {
char *obsdsymbol = (char*)malloc(strlen(symbol) + 2);
ModuleHeader *mod_header;
int ret = 0;
Module *mod = NULL, **Mod_Handle = NULL;
+ int betaversion,tag;
+ ModuleInfo modinfo;
Debug((DEBUG_DEBUG, "Attempting to load module from %s",
path_));
path = path_;
irc_dlclose(Mod);
return ("Lacking mod_header->modversion");
}
- if (match(MOD_WE_SUPPORT, mod_header->modversion))
- {
- ircsprintf(errorbuf, "Unsupported version, we support %s, %s is %s",
- MOD_WE_SUPPORT, path, mod_header->modversion);
- irc_dlclose(Mod);
- return(errorbuf);
+ if (sscanf(mod_header->modversion, "3.2-b%d-%d", &betaversion, &tag)) {
+ if (betaversion < 5 || betaversion >8) {
+ ircsprintf(errorbuf, "Unsupported version, we support %s, %s is %s",
+ MOD_WE_SUPPORT, path, mod_header->modversion);
+ irc_dlclose(Mod);
+ return(errorbuf);
+ }
}
if (!mod_header->name || !mod_header->version ||
!mod_header->description)
irc_dlsym(Mod, "Mod_Handle", Mod_Handle);
if (Mod_Handle)
*Mod_Handle = mod;
- if ((ret = (*Mod_Init)(load)) < MOD_SUCCESS)
- {
- ircsprintf(errorbuf, "Mod_Init returned %i",
- ret);
- /* We EXPECT the module to have cleaned up it's mess */
- Module_free(mod);
- return (errorbuf);
+ if (betaversion >= 8) {
+ modinfo.size = sizeof(ModuleInfo);
+ modinfo.module_load = load;
+ modinfo.handle = mod;
+ if ((ret = (*Mod_Init)(&modinfo)) < MOD_SUCCESS) {
+ ircsprintf(errorbuf, "Mod_Init returned %i",
+ ret);
+ /* We EXPECT the module to have cleaned up it's mess */
+ Module_free(mod);
+ return (errorbuf);
+ }
+ }
+ else {
+ if ((ret = (*Mod_Init)(load)) < MOD_SUCCESS)
+ {
+ ircsprintf(errorbuf, "Mod_Init returned %i",
+ ret);
+ /* We EXPECT the module to have cleaned up it's mess */
+ Module_free(mod);
+ return (errorbuf);
+ }
}
if (load)
else if (objs->type == MOBJ_HOOK) {
HookDel(objs->object.hook);
}
+ else if (objs->type == MOBJ_COMMAND) {
+ CommandDel(objs->object.command);
+ }
}
for (p = Modules; p; p = p->next)
{
extern ModuleHeader scan_http_Header;
#endif
extern ModuleHeader m_svsnoop_Header;
-
+ModuleInfo ModCmdsInfo;
/* Place includes here */
/* replace this with a common name of your module */
#ifdef DYNAMIC_LINKING
"commands", /* Name of module */
"$Id$", /* Version */
"Wrapper library for m_ commands", /* Short description of module */
- "3.2-b5",
+ "3.2-b8-1",
NULL
};
extern int m_unzline_Init(int module_load), m_kline_Init(int module_load), m_unkline_Init(int module_load);
extern int m_sqline_Init(int module_load), m_unsqline_Init(int module_load), m_tkl_Init(int module_load);
#ifdef GUEST
-extern int m_guest_Init(int module_load);
+extern int m_guest_Init(ModuleInfo *modinfo);
#endif
#ifdef SCAN_API
-extern int m_scan_Init(int module_load), scan_socks_Init(int module_load), scan_http_Init(int module_load);
+extern int m_scan_Init(ModuleInfo *modinfo), scan_socks_Init(ModuleInfo *modinfo), scan_http_Init(ModuleInfo *modinfo);
#endif
extern int m_sethost_Load(int module_load), m_setname_Load(int module_load), m_chghost_Load(int module_load);
#endif
#ifdef DYNAMIC_LINKING
-DLLFUNC int Mod_Init(int module_load)
+DLLFUNC int Mod_Init(ModuleInfo *modinfo)
#else
-int l_commands_Init(int module_load)
+int l_commands_Init(ModuleInfo *modinfo)
#endif
{
+ int module_load;
#ifdef SCAN_API
Module p;
#endif
/*
* We call our add_Command crap here
*/
+ bcopy(modinfo,&ModCmdsInfo,modinfo->size);
+ module_load = ModCmdsInfo.module_load;
m_sethost_Init(module_load);
m_setname_Init(module_load);
m_chghost_Init(module_load);
Module_Depend_Resolve(&p);
p.header = &scan_http_Header;
Module_Depend_Resolve(&p);
- m_scan_Init(module_load);
- scan_socks_Init(module_load);
- scan_http_Init(module_load);
+ m_scan_Init(&ModCmdsInfo);
+ scan_socks_Init(&ModCmdsInfo);
+ scan_http_Init(&ModCmdsInfo);
#endif
return MOD_SUCCESS;
}
static Hook *GuestHook = NULL;
#endif
/* Place includes here */
-#ifdef DYNAMIC_LINKING
-Module *Mod_Handle = NULL;
-#else
-#define Mod_Handle NULL
-#endif
#ifndef DYNAMIC_LINKING
ModuleHeader m_guest_Header
#else
"guest", /* Name of module */
"$Id$", /* Version */
"command /guest", /* Short description of module */
- "3.2-b5",
+ "3.2-b8-1",
NULL
};
-
+ModuleInfo ModGuestInfo;
/* The purpose of these ifdefs, are that we can "static" link the ircd if we
* want to
*/
/* This is called on module init, before Server Ready */
#ifdef DYNAMIC_LINKING
-DLLFUNC int Mod_Init(int module_load)
+DLLFUNC int Mod_Init(ModuleInfo *modinfo)
#else
-int m_guest_Init(int module_load)
+int m_guest_Init(ModuleInfo *modinfo)
#endif
{
/*
* We call our add_Command crap here
*/
#ifdef GUEST
- GuestHook = HookAddEx(Mod_Handle, HOOKTYPE_GUEST, m_guest);
+ bcopy(modinfo,&ModGuestInfo,modinfo.size);
+ GuestHook = HookAddEx(ModGuestInfo.handle, HOOKTYPE_GUEST, m_guest);
#endif
return MOD_SUCCESS;
if ((type = Auth_FindType(parv[1])) == -1)
{
sendto_one(sptr,
- ":%s NOTICE %s :*** %s is not a enabled authentication method",
+ ":%s NOTICE %s :*** %s is not an enabled authentication method",
me.name, sptr->name, parv[1]);
return 0;
}
"is now a co administrator (C)" },
{ OFLAG_ISGLOBAL, &UMODE_OPER, &oper_host,
"is now an operator (O)" },
- { 0xFFFFFFFF, &UMODE_LOCOP, &locop_host,
- "is now a local operator (o)" },
+/* { 0xFFFFFFFF, &UMODE_LOCOP, &locop_host,
+ "is now a local operator (o)" }, */
{ OFLAG_HELPOP, &UMODE_HELPOP, 0 ,
0 },
{ OFLAG_GLOBOP, &UMODE_FAILOP, 0 ,
iNAH_host(sptr, host);
}
- if (announce != NULL) {
+ if (!IsOper(sptr))
+ {
+ sptr->umodes |= UMODE_LOCOP;
+ sendto_ops("%s (%s@%s) is now a local operator (o)",
+ parv[0], sptr->user->username,
+ IsHidden(sptr) ? sptr->user->virthost : sptr->user->realhost);
+
+ }
+
+ if (announce != NULL) {
sendto_ops
("%s (%s@%s) %s",
parv[0], sptr->user->username,
IsHidden(sptr) ? sptr->user->virthost : sptr->
user->realhost, announce);
- if (aconf->oflags & (OFLAG_SADMIN | OFLAG_NETADMIN)) {
sendto_serv_butone(&me,
":%s GLOBOPS :%s (%s@%s) %s",
me.name, parv[0], sptr->user->username,
IsHidden(sptr) ? sptr->
user->virthost : sptr->user->realhost, announce);
- }
- } else {
- sendto_ops
- ("%s (%s@%s) opered but announce is NULL!",
- parv[0], sptr->user->username,
- IsHidden(sptr) ? sptr->user->virthost : sptr->
- user->realhost, announce);
- }
+ }
#endif
#endif
#include "modules/scan.h"
/* IRCd will fill with a pointer to this module */
-#ifdef DYNAMIC_LINKING
-Module *Mod_Handle = NULL;
-#else
-#define Mod_Handle NULL
-#endif
struct SOCKADDR_IN Scan_endpoint;
int Scan_BanTime = 0, Scan_TimeOut = 0;
static Scan_AddrStruct *Scannings = NULL;
"scan", /* Name of module */
"$Id$", /* Version */
"Scanning API", /* Short description of module */
- "3.2-b5",
+ "3.2-b8-1",
NULL
};
static Event *Scannings_clean = NULL;
static Hook *LocConnect = NULL, *ConfUnknown = NULL, *ServerStats = NULL;
-
+ModuleInfo ScanModInfo;
/* This is called on module init, before Server Ready */
#ifdef DYNAMIC_LINKING
-DLLFUNC int Mod_Init(int module_load)
+DLLFUNC int Mod_Init(ModuleInfo *modinfo)
#else
-int m_scan_Init(int module_load)
+int m_scan_Init(ModuleInfo *modinfo)
#endif
{
- LocConnect = HookAddEx(Mod_Handle, HOOKTYPE_LOCAL_CONNECT, h_scan_connect);
- ConfUnknown = HookAddEx(Mod_Handle, HOOKTYPE_CONFIG_UNKNOWN, h_config_set_scan);
- ServerStats = HookAddEx(Mod_Handle, HOOKTYPE_STATS, h_stats_scan);
+ bcopy(modinfo,&ScanModInfo,modinfo->size);
+ LocConnect = HookAddEx(ScanModInfo.handle, HOOKTYPE_LOCAL_CONNECT, h_scan_connect);
+ ConfUnknown = HookAddEx(ScanModInfo.handle, HOOKTYPE_CONFIG_UNKNOWN, h_config_set_scan);
+ ServerStats = HookAddEx(ScanModInfo.handle, HOOKTYPE_STATS, h_stats_scan);
IRCCreateMutex(Scannings_lock);
return MOD_SUCCESS;
}
if (Scan_TimeOut == 0)
Scan_TimeOut = 20;
LockEventSystem();
- Scannings_clean = EventAddEx(Mod_Handle, "e_scannings_clean", 0, 0, e_scannings_clean, NULL);
+ Scannings_clean = EventAddEx(ScanModInfo.handle, "e_scannings_clean", 0, 0, e_scannings_clean,
+NULL);
UnlockEventSystem();
return MOD_SUCCESS;
}
if (Scannings)
{
LockEventSystem();
- EventAddEx(Mod_Handle, "scan_unload",
+ EventAddEx(ScanModInfo.handle, "scan_unload",
2, /* Should be enough */
1,
e_unload_module_delayed,
sr->in = *in;
strcpy(sr->reason, reason);
LockEventSystem();
- EventAddEx(Mod_Handle, "scan_ban", 0, 1, e_scan_ban, (void *)sr);
+ EventAddEx(ScanModInfo.handle, "scan_ban", 0, 1, e_scan_ban, (void *)sr);
UnlockEventSystem();
return;
}
extern struct SOCKADDR_IN Scan_endpoint;
extern int Scan_TimeOut;
#endif
-#ifdef DYNAMIC_LINKING
-Module *Mod_Handle = NULL;
-#else
-#define Mod_Handle NULL
-#endif
static Mod_SymbolDepTable modsymdep[] =
{
MOD_Dep(Eadd_scan, xEadd_scan, "src/modules/scan.so"),
MOD_Dep(Scan_TimeOut, xScan_TimeOut, "src/modules/scan.so"),
{NULL, NULL}
};
-
+ModuleInfo ScanHttpModInfo;
#ifndef DYNAMIC_LINKING
ModuleHeader scan_http_Header
"scan_http", /* Name of module */
"$Id$", /* Version */
"scanning API: http proxies", /* Short description of module */
- "3.2-b5",
+ "3.2-b8-1",
modsymdep
};
/* This is called on module init, before Server Ready */
#ifdef DYNAMIC_LINKING
-DLLFUNC int Mod_Init(int module_load)
+DLLFUNC int Mod_Init(ModuleInfo *modinfo)
#else
-int scan_http_Init(int module_load)
+int scan_http_Init(ModuleInfo *modinfo)
#endif
{
/*
* Add scanning hooks
*/
- HttpScanHost = HookAddVoidEx(Mod_Handle, HOOKTYPE_SCAN_HOST, scan_http_scan);
+ bcopy(modinfo, &ScanHttpModInfo, modinfo->size);
+ HttpScanHost = HookAddVoidEx(ScanHttpModInfo.handle, HOOKTYPE_SCAN_HOST, scan_http_scan);
return MOD_SUCCESS;
}
void scan_socks_scan(Scan_AddrStruct *sr);
void scan_socks4_scan(Scan_AddrStruct *sr);
void scan_socks5_scan(Scan_AddrStruct *sr);
-#ifdef DYNAMIC_LINKING
-Module *Mod_Handle = NULL;
-#else
-#define Mod_Handle NULL
-#endif
static Mod_SymbolDepTable modsymdep[] =
{
MOD_Dep(Eadd_scan, xEadd_scan, "src/modules/scan.so"),
MOD_Dep(Scan_TimeOut, xScan_TimeOut, "src/modules/scan.so"),
{NULL, NULL}
};
-
+ModuleInfo ScanSocksModInfo;
#ifndef DYNAMIC_LINKING
ModuleHeader scan_socks_Header
"scan_socks", /* Name of module */
"$Id$", /* Version */
"scanning API: socks", /* Short description of module */
- "3.2-b5",
+ "3.2-b8-1",
modsymdep
};
/* This is called on module init, before Server Ready */
#ifdef DYNAMIC_LINKING
-DLLFUNC int Mod_Init(int module_load)
+DLLFUNC int Mod_Init(ModuleInfo *modinfo)
#else
-int scan_socks_Init(int module_load)
+int scan_socks_Init(ModuleInfo *modinfo)
#endif
{
/*
* Add scanning hooks
*/
- SocksScanHost = HookAddVoidEx(Mod_Handle, HOOKTYPE_SCAN_HOST, scan_socks_scan);
+ bcopy(modinfo,&ScanSocksModInfo,modinfo->size);
+ SocksScanHost = HookAddVoidEx(ScanSocksModInfo.handle, HOOKTYPE_SCAN_HOST, scan_socks_scan);
return MOD_SUCCESS;
}
void httpd_badrequest(HTTPd_Request *request, char *reason);
void httpd_parse_final(HTTPd_Request *request);
void httpd_404_header(HTTPd_Request *request, char *path);
-Module *Mod_Handle = NULL;
static Hook *HttpdStats = NULL, *HttpdVfs = NULL, *HttpdPhtml = NULL;
-
+ModuleInfo HttpdModInfo;
#ifndef DYNAMIC_LINKING
ModuleHeader httpd_Header
#ifdef DYNAMIC_LINKING
-DLLFUNC int Mod_Init(int module_load)
+DLLFUNC int Mod_Init(ModuleInfo *modinfo)
#else
-int httpd_Init(int module_load)
+int httpd_Init(ModuleInfo *modinfo)
#endif
{
- HttpdStats = HookAddEx(Mod_Handle, HOOKTYPE_HTTPD_URL, h_u_stats);
- HttpdVfs = HookAddEx(Mod_Handle, HOOKTYPE_HTTPD_URL, h_u_vfs);
- HttpdPhtml = HookAddEx(Mod_Handle, HOOKTYPE_HTTPD_URL, h_u_phtml);
+ bcopy(modinfo,&HttpdModInfo,modinfo->size);
+ HttpdStats = HookAddEx(HttpdModInfo.handle, HOOKTYPE_HTTPD_URL, h_u_stats);
+ HttpdVfs = HookAddEx(HttpdModInfo.handle, HOOKTYPE_HTTPD_URL, h_u_vfs);
+ HttpdPhtml = HookAddEx(HttpdModInfo.handle, HOOKTYPE_HTTPD_URL, h_u_phtml);
return MOD_SUCCESS;
}
#endif
}
-void add_Command_backend(char *cmd, int (*func)(), unsigned char parameters, unsigned char token, int flags)
+aCommand *add_Command_backend(char *cmd, int (*func)(), unsigned char parameters, unsigned char token, int flags)
{
aCommand *newcmd = (aCommand *) MyMalloc(sizeof(aCommand));
/* Add in hash with hash value = first byte */
AddListItem(newcmd, CommandHash[toupper(*cmd)]);
+ return newcmd;
+}
+
+Command *CommandAdd(Module *module, char *cmd, char *tok, int (*func)(), unsigned char params, int flags) {
+ Command *command = MyMallocEx(sizeof(Command));
+ command->cmd = add_Command_backend(cmd,func,params, 0, flags);
+ command->tok = NULL;
+ command->cmd->owner = module;
+ if (tok) {
+ command->tok = add_Command_backend(tok,func,params,1,flags);
+ command->tok->owner = module;
+ }
+ if (module) {
+ ModuleObject *cmdobj = (ModuleObject *)MyMallocEx(sizeof(ModuleObject));
+ cmdobj->object.command = command;
+ cmdobj->type = MOBJ_COMMAND;
+ AddListItem(cmdobj, module->objects);
+ }
+ return command;
+}
+
+
+void CommandDel(Command *command) {
+ DelListItem(command->cmd, CommandHash[toupper(*command->cmd->cmd)]);
+ if (command->tok)
+ DelListItem(command->tok, CommandHash[toupper(*command->tok->cmd)]);
+ if (command->cmd->owner) {
+ ModuleObject *cmdobj;
+ for (cmdobj = command->cmd->owner->objects; cmdobj; cmdobj = (ModuleObject *)cmdobj->next) {
+ if (cmdobj->type == MOBJ_COMMAND && cmdobj->object.command == command) {
+ DelListItem(cmdobj,command->cmd->owner->objects);
+ MyFree(cmdobj);
+ break;
+ }
+ }
+ }
+ MyFree(command->cmd->cmd);
+ MyFree(command->cmd);
+ if (command->tok) {
+ MyFree(command->tok->cmd);
+ MyFree(command->tok);
+ }
+ MyFree(command);
}
void add_Command(char *cmd, char *token, int (*func)(), unsigned char parameters)
{
Debug((DEBUG_DNS, "Sending to nameserver %i",
i));
- Debug((DEBUG_DNS, "IP: %s",
- inet_ntoa(ircd_res.nsaddr_list[0].s_addr)));
#ifdef INET6
/* still IPv4 */
ircd_res.nsaddr_list[i].sin_family = AF_INET;
flush_connections(&me);
if (sig == 1)
{
- sendto_ops("Got signal SIGHUP, reloading ircd conf. file");
+ sendto_ops("Got signal SIGHUP, reloading %s file", configfile);
#ifdef ULTRIX
if (fork() > 0)
exit(0);
if (IsClient(acptr) && (acptr->srvptr == sptr))
exit_one_client(NULL, acptr,
&me, comment1, 1);
-#ifdef DEBUGMODE
- else if (IsClient(acptr) &&
- (find_server(acptr->user->server, NULL) == sptr))
- {
- sendto_ops("WARNING, srvptr!=sptr but "
- "find_server did! User %s on %s "
- "thought it was on %s while "
- "loosing %s. Tell coding team.",
- acptr->name, acptr->user->server,
- acptr->srvptr ? acptr->
- srvptr->name : "<noserver>", sptr->name);
- exit_one_client_in_split(NULL, acptr, &me,
- comment1);
- }
-#endif
}
/*
*/
/*
** Note: The info is reported in the order the server uses
-** it--not reversed as in ircd.conf!
+** it--not reversed as in unrealircd.conf!
*/
CMD_FUNC(m_stats)
}
/*
-** m_addline (write a line to ircd.conf)
+** m_addline (write a line to unrealircd.conf)
**
** De-Potvinized by codemastr
*/
return 0;
}
/* Display what they wrote too */
- sendto_one(sptr, ":%s %s %s :*** Wrote (%s) to ircd.conf",
- me.name, IsWebTV(sptr) ? "PRIVMSG" : "NOTICE", parv[0], text);
+ sendto_one(sptr, ":%s %s %s :*** Wrote (%s) to %s",
+ me.name, IsWebTV(sptr) ? "PRIVMSG" : "NOTICE", parv[0], text, configfile);
fprintf(conf, "// Added by %s\n", make_nick_user_host(sptr->name,
sptr->user->username, sptr->user->realhost));
/* for (i=1 ; i<parc ; i++)
if (IsServer(cptr) && !IsUnknown(sptr))
return 0;
- if (MyClient(sptr) && (sptr->listener->umodes & LISTENER_SERVERSONLY))
+ if (MyConnect(sptr) && (sptr->listener->umodes & LISTENER_SERVERSONLY))
{
return exit_client(cptr, sptr, sptr,
"This port is for servers only");
else
SendMessage(hTool, TB_ENABLEBUTTON, (WPARAM)IDM_PASTE, (LPARAM)MAKELONG(FALSE,0));
SendMessage(hTool, TB_ENABLEBUTTON, (WPARAM)IDM_UNDO, (LPARAM)MAKELONG(FALSE,0));
+ wsprintf(szText, "Line: 1");
+ SetWindowText(hStatus, szText);
}
return (TRUE);
}