1
0
mirror of https://github.com/unrealircd/unrealircd.git synced 2026-07-05 07:13:14 +02:00

+- Added in Fish's patches

+- Added bitching when you lack needed IRC commands
+- Removed REMGLINE
This commit is contained in:
stskeeps
2001-10-07 20:28:15 +00:00
parent a05ec38409
commit 79b4805745
6 changed files with 24 additions and 108 deletions
+3
View File
@@ -859,3 +859,6 @@ seen. gmtime warning still there
- Made makeconf load scan_http.so
- Fixed a /who bug, found by IXpfah
- Updated makefile.win32 for all the new modules
- Added in Fish's patches
- Added bitching when you lack needed IRC commands
- Removed REMGLINE
+1
View File
@@ -142,6 +142,7 @@ extern int R_do_dns, R_fin_dns, R_fin_dnsc, R_fail_dns,
#endif
extern inline aCommand *find_Command(char *cmd, short token, int flags);
extern aCommand *find_Command_simple(char *cmd);
extern aChannel *find_channel(char *, aChannel *);
extern Member *find_member_link(Member *, aClient *);
extern void remove_user_from_channel(aClient *, aChannel *);
+2 -6
View File
@@ -30,7 +30,7 @@ R_MODULES=m_sethost.so m_chghost.so m_chgident.so m_setname.so \
m_away.so m_svsnoop.so m_svso.so m_svsnick.so \
m_adminchat.so m_akill.so m_chgname.so m_guest.so m_htm.so m_kill.so \
m_kline.so m_lag.so m_message.so m_nachat.so m_oper.so m_pingpong.so \
m_quit.so m_rakill.so m_remgline.so m_rping.so m_sendumode.so m_sqline.so \
m_quit.so m_rakill.so m_rping.so m_sendumode.so m_sqline.so \
m_techat.so m_tsctl.so m_unkline.so m_unsqline.so m_unzline.so m_whois.so \
m_zline.so \
scan.so scan_socks.so scan_http.so web/httpd.so
@@ -40,7 +40,7 @@ COMMANDS=m_sethost.c m_chghost.c m_chgident.c m_setname.c m_setident.c \
m_who.c m_mkpasswd.c m_away.c m_svsnoop.c m_svso.c m_svsnick.c \
m_adminchat.c m_akill.c m_chgname.c m_guest.c m_htm.c m_kill.c \
m_kline.c m_lag.c m_message.c m_nachat.c m_oper.c m_pingpong.c \
m_quit.c m_rakill.c m_remgline.c m_rping.c m_sendumode.c m_sqline.c \
m_quit.c m_rakill.c m_rping.c m_sendumode.c m_sqline.c \
m_techat.c m_tsctl.c m_unkline.c m_unsqline.c m_unzline.c m_whois.c \
m_zline.c
@@ -112,10 +112,6 @@ m_rakill.so: m_rakill.c $(INCLUDES)
$(CC) $(CFLAGS) $(MODULEFLAGS) -DDYNAMIC_LINKING \
-o m_rakill.so m_rakill.c
m_remgline.so: m_remgline.c $(INCLUDES)
$(CC) $(CFLAGS) $(MODULEFLAGS) -DDYNAMIC_LINKING \
-o m_remgline.so m_remgline.c
m_rping.so: m_rping.c $(INCLUDES)
$(CC) $(CFLAGS) $(MODULEFLAGS) -DDYNAMIC_LINKING \
-o m_rping.so m_rping.c
-102
View File
@@ -1,102 +0,0 @@
/*
* Module skeleton, by Carsten V. Munk 2001 <stskeeps@tspre.org>
* May be used, modified, or changed by anyone, no license applies.
* You may relicense this, to any license
*/
#include "config.h"
#include "struct.h"
#include "common.h"
#include "sys.h"
#include "numeric.h"
#include "msg.h"
#include "channel.h"
#include <time.h>
#include <sys/stat.h>
#include <stdio.h>
#include <stdlib.h>
#include <string.h>
#ifdef _WIN32
#include <io.h>
#endif
#include <fcntl.h>
#include "h.h"
#ifdef STRIPBADWORDS
#include "badwords.h"
#endif
#ifdef _WIN32
#include "version.h"
#endif
DLLFUNC int m_remgline(aClient *cptr, aClient *sptr, int parc, char *parv[]);
/* Place includes here */
#define MSG_REMGLINE "REMGLINE" /* remove g-line */
#define TOK_REMGLINE "BG"
#ifndef DYNAMIC_LINKING
ModuleInfo m_remgline_info
#else
#define m_remgline_info mod_header
ModuleInfo mod_header
#endif
= {
2,
"remgline", /* Name of module */
"$Id$", /* Version */
"command /remgline", /* Short description of module */
NULL, /* Pointer to our dlopen() return value */
NULL
};
/* 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)
#else
int m_remgline_init(int module_load)
#endif
{
/*
* We call our add_Command crap here
*/
add_Command(MSG_REMGLINE, TOK_REMGLINE, m_remgline, MAXPARA);
}
/* Is first run when server is 100% ready */
#ifdef DYNAMIC_LINKING
DLLFUNC int mod_load(int module_load)
#else
int m_remgline_load(int module_load)
#endif
{
}
/* Called when module is unloaded */
#ifdef DYNAMIC_LINKING
DLLFUNC void mod_unload(void)
#else
void m_remgline_unload(void)
#endif
{
if (del_Command(MSG_REMGLINE, TOK_REMGLINE, m_remgline) < 0)
{
sendto_realops("Failed to delete commands when unloading %s",
m_remgline_info.name);
}
}
DLLFUNC int m_remgline(aClient *cptr, aClient *sptr, int parc, char *parv[])
{
if (!IsOper(sptr))
return 0;
sendto_one(sptr,
":%s %s %s :*** Please use /gline -mask instead of /Remgline",
me.name, IsWebTV(sptr) ? "PRIVMSG" : "NOTICE", sptr->name);
}
+13
View File
@@ -355,3 +355,16 @@ inline aCommand *find_Command(char *cmd, short token, int flags)
}
return NULL;
}
aCommand *find_Command_simple(char *cmd)
{
aCommand *p;
for (p = CommandHash[toupper(*cmd)]; p; p = p->next) {
if (!stricmp(p->cmd, cmd))
return (p);
}
return NULL;
}
+5
View File
@@ -3433,6 +3433,11 @@ void validate_configuration(void)
add_CommandX("StatServ", NULL, m_alias, 1, M_USER|M_ALIAS);
Warning("No alias{}'s found, using default of NickServ, ChanServ, MemoServ, OperServ, HelpServ, StatServ");
}
if (!find_Command_simple("AWAY") || !find_Command_simple("KILL") ||
!find_Command_simple("OPER") || !find_Command_simple("PING"))
{
Error("Someone forgot to load modules with proper commands in them. Read the documentation");
}
#ifdef _WIN32
if (config_error_flag)
win_log("Errors in configuration, terminating program.");