Ultimate a28 Smode added, but what did I break?
This commit is contained in:
parent
5f139e5eac
commit
70d6578f11
13 changed files with 228 additions and 79 deletions
|
@ -18,6 +18,7 @@ NeoStats ChangeLog - Anything we add/remove/fix/change is in here (even our rant
|
|||
- Ultimate3 now uses SJOIN to join channels
|
||||
- Fixed a bug with RELOAD
|
||||
- StatServ updates
|
||||
- Ultimate Smode (a28) added, but what did I break?
|
||||
|
||||
* NeoStats * Shmad & Fish * Version 2.5.0-Release Candidate 2
|
||||
- Misc. Updates (S)
|
||||
|
|
|
@ -1,6 +1,6 @@
|
|||
# Makefile for GeoStats
|
||||
# GeoStats CVS Identification
|
||||
# $Id: Makefile.in,v 1.29 2002/12/14 09:14:21 fishwaldo Exp $
|
||||
# $Id: Makefile.in,v 1.30 2003/01/06 12:07:25 fishwaldo Exp $
|
||||
# makefile originally created by Andy Church.
|
||||
include Makefile.inc
|
||||
|
||||
|
@ -73,5 +73,5 @@ server.o: server.c stats.h hash.h hash.c config.h Makefile.inc
|
|||
Ultimate.o: Ultimate.c stats.h Ultimate.h Makefile.inc
|
||||
Unreal.o: Unreal.c stats.h Unreal.h Makefile.inc
|
||||
chans.o: hash.c stats.h Makefile.inc
|
||||
hybrid7.c: hybrid7.c stats.h hybrid7.h Makefile.inc
|
||||
hybrid7.o: hybrid7.c stats.h hybrid7.h Makefile.inc
|
||||
neoircd.o: neoircd.c stats.h neoircd.h Makefile.inc
|
||||
|
|
|
@ -3,11 +3,11 @@ CFLAGS=@CFLAGS@ -fPIC -DPIC
|
|||
LD=ld
|
||||
LDFLAGS= -rdynamic @LIBS@
|
||||
MODLDFLAGS = -shared
|
||||
INSTALL = @INSTALL@
|
||||
INSTALL_PROGRAM = @INSTALL_PROGRAM@
|
||||
INSTALL = @INSTALL@
|
||||
NEOINCLUDES=-Iadns
|
||||
INSTALL_PROGRAM = @INSTALL_PROGRAM@
|
||||
INSTALL_DATA = @INSTALL_DATA@
|
||||
MODULES=@MODULES@
|
||||
DIRECTORY=@prefix@
|
||||
extauth_src=@EXTAUTH_SRC@
|
||||
extauth_objs=@EXTAUTH_OBJS@
|
||||
NEOINCLUDES=-Iadns
|
71
Ultimate.c
71
Ultimate.c
|
@ -20,7 +20,7 @@
|
|||
** USA
|
||||
**
|
||||
** NeoStats CVS Identification
|
||||
** $Id: Ultimate.c,v 1.33 2003/01/04 04:46:58 fishwaldo Exp $
|
||||
** $Id: Ultimate.c,v 1.34 2003/01/06 12:07:25 fishwaldo Exp $
|
||||
*/
|
||||
|
||||
#include "stats.h"
|
||||
|
@ -59,34 +59,49 @@ aCtab cFlagTab[] = {
|
|||
|
||||
#ifdef ULTIMATE3
|
||||
Oper_Modes usr_mds[] = {
|
||||
{UMODE_OPER, 'o', 50},
|
||||
{UMODE_LOCOP, 'O', 40},
|
||||
{UMODE_OPER, 'O', 50},
|
||||
{UMODE_LOCOP, 'o', 40},
|
||||
{UMODE_INVISIBLE, 'i', 0},
|
||||
{UMODE_WALLOP, 'w', 0},
|
||||
{UMODE_SERVNOTICE, 's', 0},
|
||||
{UMODE_CLIENT, 'c', 0},
|
||||
{UMODE_REGNICK, 'r',10},
|
||||
{UMODE_KILLS, 'k',0},
|
||||
{UMODE_FAILOP, 'g', 0},
|
||||
{UMODE_HELPOP, 'h', 30},
|
||||
{UMODE_SERVNOTICE, 's',0},
|
||||
{UMODE_KILLS, 'k',0},
|
||||
{UMODE_SERVICES, 'S',200},
|
||||
{UMODE_SERVICESADMIN, 'P',200},
|
||||
{UMODE_SERVADMIN, 'A', 100},
|
||||
{UMODE_RBOT, 'B',0},
|
||||
{UMODE_SBOT, 'b', 0},
|
||||
{UMODE_DEAF, 'd',0},
|
||||
{UMODE_ADMIN, 'z',70},
|
||||
{UMODE_NETADMIN, 't',185},
|
||||
{UMODE_TECHADMIN, 'T',190},
|
||||
{UMODE_CLIENT, 'c',0},
|
||||
{UMODE_FLOOD, 'f',0},
|
||||
{UMODE_REGNICK, 'r',0},
|
||||
{UMODE_HIDE, 'x',0},
|
||||
{UMODE_WATCHER, 'W',0},
|
||||
{UMODE_FLOOD, 'f', 0},
|
||||
{UMODE_SPY, 'y', 0},
|
||||
{UMODE_DCC, 'D', 0},
|
||||
{UMODE_GLOBOPS, 'g', 0},
|
||||
{UMODE_CHATOP, 'c', 0},
|
||||
{UMODE_SERVICESOPER, 'a', 100},
|
||||
{UMODE_SUPER, 'p', 40},
|
||||
{UMODE_IRCADMIN, 'Z', 100},
|
||||
{UMODE_DEAF, 'd', 0},
|
||||
{0, 0, 0 }
|
||||
{UMODE_REJ, 'j', 0},
|
||||
{UMODE_ROUTE, 'n', 0},
|
||||
{UMODE_SPAM, 'm', 0},
|
||||
{UMODE_HIDE, 'x',0},
|
||||
{UMODE_IRCADMIN, 'Z', 200},
|
||||
{UMODE_SERVICESADMIN, 'P',200},
|
||||
{UMODE_SERVICES, 'S',200},
|
||||
{UMODE_PROT, 'p', 0},
|
||||
{UMODE_GLOBCON, 'F', 0},
|
||||
{UMODE_DEBUG, 'd',0},
|
||||
{UMODE_DCCWARN, 'd', 0},
|
||||
{UMODE_WHOIS, 'W', 0},
|
||||
{0, 0, 0}
|
||||
};
|
||||
|
||||
Oper_Modes susr_mds[] = {
|
||||
{SMODE_SSL, 's', 0},
|
||||
{SMODE_COADMIN, 'a', 75},
|
||||
{SMODE_SERVADMIN, 'A', 100},
|
||||
{SMODE_COTECH, 't', 125},
|
||||
{SMODE_TECHADMIN, 'T', 150},
|
||||
{SMODE_CONET, 'n', 175},
|
||||
{SMODE_NETADMIN, 'N', 190},
|
||||
{SMODE_GUEST, 'G', 100},
|
||||
{0, 0, 0}
|
||||
};
|
||||
|
||||
#elif ULTIMATE
|
||||
Oper_Modes usr_mds[] = {
|
||||
{UMODE_OPER, 'o', 50},
|
||||
|
@ -139,7 +154,7 @@ int slogin_cmd(const char *name, const int numeric, const char *infoline, const
|
|||
sts("%s %s", (me.token ? TOK_PASS : MSG_PASS), pass);
|
||||
#else
|
||||
sts("%s %s :TS", (me.token ? TOK_PASS : MSG_PASS), pass);
|
||||
sts("CAPAB TS5 BURST SSJ5 NICKIP");
|
||||
sts("CAPAB TS5 BURST SSJ5 NICKIP CLIENT");
|
||||
#endif
|
||||
sts("%s %s %d :%s", (me.token ? TOK_SERVER : MSG_SERVER), name, numeric, infoline);
|
||||
return 1;
|
||||
|
@ -235,7 +250,11 @@ int snewnick_cmd(const char *nick, const char *ident, const char *host, const ch
|
|||
}
|
||||
sts("%s %s 1 %lu %s %s %s %s 0 %lu :%s", (me.token ? TOK_NICK : MSG_NICK), nick, time(NULL), newmode, ident, host, me.name, time(NULL), realname);
|
||||
AddUser(nick,ident, host, me.name, 0, time(NULL));
|
||||
#ifdef ULTIMATE3
|
||||
UserMode(nick, newmode, 0);
|
||||
#else
|
||||
UserMode(nick, newmode);
|
||||
#endif
|
||||
#endif
|
||||
return 1;
|
||||
}
|
||||
|
@ -256,7 +275,11 @@ int sumode_cmd(const char *who, const char *target, long mode) {
|
|||
}
|
||||
}
|
||||
sts(":%s %s %s :%s", who, (me.token ? TOK_MODE : MSG_MODE), target, newmode);
|
||||
#ifdef ULTIMATE3
|
||||
UserMode(target, newmode, 0);
|
||||
#else
|
||||
UserMode(target, newmode);
|
||||
#endif
|
||||
return 1;
|
||||
}
|
||||
|
||||
|
|
60
Ultimate.h
60
Ultimate.h
|
@ -20,7 +20,7 @@
|
|||
** USA
|
||||
**
|
||||
** NeoStats CVS Identification
|
||||
** $Id: Ultimate.h,v 1.13 2002/12/30 12:09:38 fishwaldo Exp $
|
||||
** $Id: Ultimate.h,v 1.14 2003/01/06 12:07:25 fishwaldo Exp $
|
||||
*/
|
||||
#ifndef ULTIMATE_H
|
||||
#define ULTIMATE_H
|
||||
|
@ -313,6 +313,7 @@
|
|||
#define MSG_CAPAB "CAPAB"
|
||||
#define MSG_BURST "BURST"
|
||||
#define MSG_SJOIN "SJOIN"
|
||||
#define MSG_CLIENT "CLIENT"
|
||||
|
||||
|
||||
|
||||
|
@ -323,7 +324,32 @@
|
|||
#define UMODE_HELPOP 0x0010 /* Help system operator */
|
||||
#define UMODE_REGNICK 0x0020 /* Nick set by services as registered */
|
||||
#define UMODE_SERVICESOPER 0x0040 /* Services Oper */
|
||||
#ifndef ULTIMATE3
|
||||
#define UMODE_ADMIN 0x0080 /* Admin */
|
||||
#define UMODE_NETADMIN 0x10000 /* Network Admin */
|
||||
#define UMODE_SUPER 0x20000 /* Oper Is Protected from Kick's and Kill's */
|
||||
#define UMODE_RBOT 0x40000 /* Marks the client as a Registered Bot */
|
||||
#define UMODE_SBOT 0x80000 /* Marks the client as a Server Bot */
|
||||
#define UMODE_NGLOBAL 0x100000 /* See Network Globals */
|
||||
#define UMODE_NETINFO 0x400000 /* Server link, Delink Notces etc. */
|
||||
#define UMODE_MAGICK 0x800000 /* Allows Opers To See +s and +p Channels */
|
||||
#define UMODE_WATCHER 0x4000000 /* Recive Monitor Globals */
|
||||
#define UMODE_NETMON 0x8000000 /* Marks the client as an Network Monitor */
|
||||
#define UMODE_SERVADMIN 0x40000000 /* Marks the client as a Server Admin */
|
||||
#define UMODE_TECHADMIN 0x80000000 /* Marks the client as a Technical Admin */
|
||||
#define UMODE_DEAF 0x100000000 /* client is deaf on channels */
|
||||
#else
|
||||
#define UMODE_SPY 0x0080 /* Oper Spy */
|
||||
#define UMODE_DCC 0x10000 /* Oper DCC Notices */
|
||||
#define UMODE_GLOBOPS 0x20000 /* send/recv global notices */
|
||||
#define UMODE_REJ 0x40000 /* see DCC reject notices */
|
||||
#define UMODE_ROUTE 0x80000 /* see Routing Notices */
|
||||
#define UMODE_SPAM 0x100000 /* see spambot warnings */
|
||||
#define UMODE_PROT 0x400000 /* protected IRC op */
|
||||
#define UMODE_GLOBCON 0x800000 /* Global Connect notices */
|
||||
#define UMODE_DEBUG 0x4000000 /* see debug notices */
|
||||
#define UMODE_DCCWARN 0x8000000 /* see DCC warnings */
|
||||
#endif
|
||||
|
||||
#define UMODE_SERVNOTICE 0x0100 /* server notices such as kill */
|
||||
#define UMODE_LOCOP 0x0200 /* Local operator -- SRB */
|
||||
|
@ -333,23 +359,23 @@
|
|||
#define UMODE_CHATOP 0x2000 /* can receive chatops */
|
||||
#define UMODE_SERVICES 0x4000 /* services */
|
||||
#define UMODE_HIDE 0x8000 /* Hide from Nukes */
|
||||
#define UMODE_NETADMIN 0x10000 /* Network Admin */
|
||||
#define UMODE_SUPER 0x20000 /* Oper Is Protected from Kick's and Kill's */
|
||||
#define UMODE_RBOT 0x40000 /* Marks the client as a Registered Bot */
|
||||
#define UMODE_SBOT 0x80000 /* Marks the client as a Server Bot */
|
||||
#define UMODE_NGLOBAL 0x100000 /* See Network Globals */
|
||||
#define UMODE_WHOIS 0x200000 /* Lets Opers see when people do a /WhoIs on them */
|
||||
#define UMODE_NETINFO 0x400000 /* Server link, Delink Notces etc. */
|
||||
#define UMODE_MAGICK 0x800000 /* Allows Opers To See +s and +p Channels */
|
||||
#define UMODE_IRCADMIN 0x1000000 /* Marks the client as an IRC Administrator */
|
||||
#define UMODE_SERVICESADMIN 0x2000000 /* Marks the client as a Services Administrator */
|
||||
#define UMODE_WATCHER 0x4000000 /* Recive Monitor Globals */
|
||||
#define UMODE_NETMON 0x8000000 /* Marks the client as an Network Monitor */
|
||||
#define UMODE_SERVADMIN 0x10000000 /* Marks the client as a Server Admin */
|
||||
#define UMODE_TECHADMIN 0x20000000 /* Marks the client as a Technical Admin */
|
||||
#define UMODE_DEAF 0x40000000 /* client is deaf on channels */
|
||||
|
||||
#define MODE_CHANOP 0x0001
|
||||
|
||||
|
||||
#define SMODE_SSL 0x1 /* ssl client */
|
||||
#define SMODE_COADMIN 0x2 /* co admin on a server */
|
||||
#define SMODE_SERVADMIN 0x4 /* server admin */
|
||||
#define SMODE_COTECH 0x8 /* co-tech admin */
|
||||
#define SMODE_TECHADMIN 0x10 /* tech administrator */
|
||||
#define SMODE_CONET 0x20 /* Co-Network Admin */
|
||||
#define SMODE_NETADMIN 0x40 /* Network Admin */
|
||||
#define SMODE_GUEST 0x80 /* Guest Admin */
|
||||
|
||||
|
||||
#define MODE_CHANOP 0x0001
|
||||
#define MODE_HALFOP 0x0002
|
||||
#define MODE_VOICE 0x0004
|
||||
#define MODE_PRIVATE 0x0008
|
||||
|
@ -407,8 +433,12 @@ typedef struct {
|
|||
|
||||
|
||||
aCtab cFlagTab[33];
|
||||
#ifdef ULTIMATE3
|
||||
Oper_Modes usr_mds[29];
|
||||
Oper_Modes susr_mds[9];
|
||||
#else
|
||||
Oper_Modes usr_mds[27];
|
||||
|
||||
#endif
|
||||
|
||||
|
||||
|
||||
|
|
|
@ -6,20 +6,20 @@ SOURCES= $(extauth_src)
|
|||
OBJECTS= $(extauth_objs)
|
||||
TARGET= extauth.so
|
||||
|
||||
all: statserv
|
||||
all: extauth
|
||||
|
||||
.c.o:
|
||||
$(CC) $(CFLAGS) $(INCLUDES) -c $<
|
||||
|
||||
statserv: $(OBJECTS)
|
||||
$(LD) $(MODLDFLAGS) -o $(TARGET) $(LIBS) $(OBJECTS)
|
||||
extauth: $(SOURCES)
|
||||
$(CC) $(MODLDFLAGS) $(INCLUDES) $(CFLAGS) -o $(TARGET) $(LIBS) $(SOURCES)
|
||||
/bin/cp $(TARGET) ../
|
||||
|
||||
clean:
|
||||
/bin/rm -rf ../$(TARGET)
|
||||
/bin/rm -rf *.o *.lo *.so
|
||||
|
||||
install: statserv
|
||||
install: extauth
|
||||
$(INSTALL) -m 644 $(TARGET) $(DIRECTORY)/dl
|
||||
|
||||
|
||||
|
|
|
@ -20,7 +20,7 @@
|
|||
** USA
|
||||
**
|
||||
** NeoStats CVS Identification
|
||||
** $Id: serviceroots.c,v 1.7 2002/12/13 11:19:48 fishwaldo Exp $
|
||||
** $Id: serviceroots.c,v 1.8 2003/01/06 12:07:26 fishwaldo Exp $
|
||||
*/
|
||||
|
||||
#include <stdio.h>
|
||||
|
@ -76,7 +76,7 @@ int new_m_version(char *origin, char **av, int ac) {
|
|||
return 0;
|
||||
}
|
||||
|
||||
void _init() {
|
||||
static void _init() {
|
||||
srconf.auth=0;
|
||||
/* only a max of 10 serviceroots */
|
||||
srconf.ul = list_create(10);
|
||||
|
@ -85,7 +85,7 @@ void _init() {
|
|||
}
|
||||
}
|
||||
|
||||
void _fini() {
|
||||
static void _fini() {
|
||||
lnode_t *un;
|
||||
un = list_first(srconf.ul);
|
||||
while (un) {
|
||||
|
|
|
@ -20,7 +20,7 @@
|
|||
** USA
|
||||
**
|
||||
** NeoStats CVS Identification
|
||||
** $Id: stats.c,v 1.30 2002/12/30 12:09:38 fishwaldo Exp $
|
||||
** $Id: stats.c,v 1.31 2003/01/06 12:07:27 fishwaldo Exp $
|
||||
*/
|
||||
|
||||
#include "statserv.h"
|
||||
|
@ -37,7 +37,7 @@ int ok_to_wallop() {
|
|||
return -1;
|
||||
} else {
|
||||
lasttime = time(NULL);
|
||||
count = -1;
|
||||
count = 0;
|
||||
}
|
||||
return 1;
|
||||
|
||||
|
|
|
@ -20,7 +20,7 @@
|
|||
** USA
|
||||
**
|
||||
** NeoStats CVS Identification
|
||||
** $Id: statserv.c,v 1.57 2002/12/30 12:12:24 fishwaldo Exp $
|
||||
** $Id: statserv.c,v 1.58 2003/01/06 12:07:27 fishwaldo Exp $
|
||||
*/
|
||||
|
||||
#include <stdio.h>
|
||||
|
@ -173,7 +173,8 @@ void _init() {
|
|||
chanalert(s_Services, "Error, Statserv could not be configured");
|
||||
return;
|
||||
}
|
||||
if (StatServ.html) {
|
||||
|
||||
if (StatServ.html) {
|
||||
if (strlen(StatServ.htmlpath) < 1) {
|
||||
log("StatServ HTML stats is disabled, as HTML_PATH is not set in the config file");
|
||||
StatServ.html = 0;
|
||||
|
|
52
ircd.c
52
ircd.c
|
@ -22,7 +22,7 @@
|
|||
** USA
|
||||
**
|
||||
** NeoStats CVS Identification
|
||||
** $Id: ircd.c,v 1.103 2002/12/30 12:09:38 fishwaldo Exp $
|
||||
** $Id: ircd.c,v 1.104 2003/01/06 12:07:25 fishwaldo Exp $
|
||||
*/
|
||||
|
||||
#include <setjmp.h>
|
||||
|
@ -71,7 +71,9 @@ void Srv_Vctrl(char *, char **, int argc);
|
|||
#ifdef NEOIRCD
|
||||
void Srv_Tburst(char *origin, char **argv, int argc);
|
||||
#endif
|
||||
|
||||
#ifdef ULTIMATE3
|
||||
void Srv_Client(char *, char **, int argc);
|
||||
#endif
|
||||
|
||||
static void ShowMOTD(char *);
|
||||
static void ShowADMIN(char *);
|
||||
|
@ -241,12 +243,14 @@ IntCommands cmd_list[] = {
|
|||
#ifndef ULTIMATE3
|
||||
{MSG_SNETINFO, Srv_Netinfo, 0, 0},
|
||||
{TOK_SNETINFO, Srv_Netinfo, 0, 0},
|
||||
|
||||
#endif
|
||||
#ifdef ULTIMATE3
|
||||
{MSG_SVINFO, Srv_Svinfo, 0, 0},
|
||||
{MSG_CAPAB, Srv_Connect, 0, 0},
|
||||
{MSG_BURST, Srv_Burst, 0, 0},
|
||||
{MSG_SJOIN, Srv_Sjoin, 1, 0},
|
||||
{MSG_CLIENT, Srv_Client, 0, 0},
|
||||
#endif
|
||||
{MSG_VCTRL, Srv_Vctrl, 0, 0},
|
||||
{TOK_VCTRL, Srv_Vctrl, 0, 0},
|
||||
|
@ -289,7 +293,7 @@ int init_bot(char *nick, char *user, char *host, char *rname, char *modes, char
|
|||
|
||||
|
||||
#ifdef ULTIMATE3
|
||||
snewnick_cmd(nick, user, host, rname, UMODE_SERVICES | UMODE_DEAF | UMODE_SBOT);
|
||||
snewnick_cmd(nick, user, host, rname, UMODE_SERVICES);
|
||||
#elif defined(HYBRID7)
|
||||
snewnick_cmd(nick, user, host, rname, UMODE_ADMIN);
|
||||
#elif defined(NEOIRCD)
|
||||
|
@ -640,7 +644,7 @@ void init_ServBot()
|
|||
|
||||
#ifdef ULTIMATE3
|
||||
sburst_cmd(1);
|
||||
snewnick_cmd(s_Services, Servbot.user, Servbot.host, rname, UMODE_SERVICES | UMODE_DEAF | UMODE_SBOT);
|
||||
snewnick_cmd(s_Services, Servbot.user, Servbot.host, rname, UMODE_SERVICES);
|
||||
#elif defined(HYBRID7) || defined(NEOIRCD)
|
||||
snewnick_cmd(s_Services, Servbot.user, Servbot.host, rname, UMODE_ADMIN | UMODE_SERVICES);
|
||||
#else
|
||||
|
@ -811,6 +815,11 @@ void Srv_Connect(char *origin, char **argv, int argc) {
|
|||
if (!strcasecmp("TOKEN", argv[i])) {
|
||||
me.token = 1;
|
||||
}
|
||||
#ifdef ULTIMATE3
|
||||
if (!strcasecmp("CLIENT", argv[i])) {
|
||||
me.client = 1;
|
||||
}
|
||||
#endif
|
||||
}
|
||||
}
|
||||
|
||||
|
@ -909,7 +918,7 @@ void Usr_Smode(char *origin, char **argv, int argc) {
|
|||
/* its user svsmode change */
|
||||
#ifdef ULTIMATE3
|
||||
AddStringToList(&av, argv[2], &ac);
|
||||
UserMode(argv[0], argv[2]);
|
||||
UserMode(argv[0], argv[2], 0);
|
||||
#else
|
||||
AddStringToList(&av, argv[1], &ac);
|
||||
UserMode(argv[0], argv[1]);
|
||||
|
@ -928,7 +937,7 @@ void Usr_Mode(char *origin, char **argv, int argc) {
|
|||
#ifdef DEBUG
|
||||
log("Mode: UserMode: %s",argv[0]);
|
||||
#endif
|
||||
UserMode(argv[0], argv[1]);
|
||||
UserMode(argv[0], argv[1], 0);
|
||||
AddStringToList(&av, argv[0], &ac);
|
||||
AddStringToList(&av, argv[1], &ac);
|
||||
Module_Event("UMODE", av, ac);
|
||||
|
@ -1160,7 +1169,7 @@ void Srv_Nick(char *origin, char **argv, int argc) {
|
|||
#ifdef DEBUG
|
||||
log("Mode: UserMode: %s",argv[3]);
|
||||
#endif
|
||||
UserMode(argv[0], argv[3]);
|
||||
UserMode(argv[0], argv[3], 0);
|
||||
AddStringToList(&av, argv[3], &ac);
|
||||
Module_Event("UMODE", av, ac);
|
||||
#elif ULTIMATE
|
||||
|
@ -1191,6 +1200,35 @@ void Srv_Nick(char *origin, char **argv, int argc) {
|
|||
#endif
|
||||
FreeList(av, ac);
|
||||
}
|
||||
|
||||
/* Ultimate3 Client Support */
|
||||
#ifdef ULTIMATE3
|
||||
void Srv_Client(char *origin, char **argv, int argc) {
|
||||
char **av;
|
||||
int ac = 0;
|
||||
AddStringToList(&av, argv[0], &ac);
|
||||
AddUser(argv[0], argv[5], argv[6], argv[8], strtoul(argv[10], NULL, 10), strtoul(argv[2], NULL, 10));
|
||||
Module_Event("SIGNON", av, ac);
|
||||
#ifdef DEBUG
|
||||
log("Mode: UserMode: %s",argv[3]);
|
||||
#endif
|
||||
UserMode(argv[0], argv[3], 0);
|
||||
AddStringToList(&av, argv[3], &ac);
|
||||
Module_Event("UMODE", av, ac);
|
||||
FreeList(av, ac);
|
||||
#ifdef ULTIMATE3
|
||||
AddStringToList(&av, argv[0], &ac);
|
||||
#ifdef DEBUG
|
||||
log("Smode: SMode: %s", argv[4]);
|
||||
#endif
|
||||
UserMode(argv[0], argv[4], 1);
|
||||
AddStringToList(&av, argv[4], &ac);
|
||||
Module_Event("UMODE", av, ac);
|
||||
FreeList(av, ac);
|
||||
#endif
|
||||
|
||||
}
|
||||
#endif
|
||||
void Srv_Svsnick(char *origin, char **argv, int argc) {
|
||||
User *u;
|
||||
char **av;
|
||||
|
|
7
main.c
7
main.c
|
@ -22,7 +22,7 @@
|
|||
** USA
|
||||
**
|
||||
** NeoStats CVS Identification
|
||||
** $Id: main.c,v 1.76 2002/12/26 14:15:07 fishwaldo Exp $
|
||||
** $Id: main.c,v 1.77 2003/01/06 12:07:25 fishwaldo Exp $
|
||||
*/
|
||||
|
||||
#include <setjmp.h>
|
||||
|
@ -106,6 +106,9 @@ int main()
|
|||
me.synced = 0;
|
||||
me.onchan = 0;
|
||||
me.maxsocks = getmaxsock();
|
||||
#ifdef ULTIMATE3
|
||||
me.client = 0;
|
||||
#endif
|
||||
strcpy(me.modpath,"dl");
|
||||
#ifdef RECVLOG
|
||||
remove("logs/recv.log");
|
||||
|
@ -377,7 +380,7 @@ void login()
|
|||
{
|
||||
strcpy(segv_location, "login");
|
||||
slogin_cmd(me.name, 1, me.infoline, me.pass);
|
||||
sprotocol_cmd("TOKEN");
|
||||
sprotocol_cmd("TOKEN CLIENT");
|
||||
}
|
||||
|
||||
/** @brief Our Own implementation of Malloc.
|
||||
|
|
12
stats.h
12
stats.h
|
@ -20,7 +20,7 @@
|
|||
** USA
|
||||
**
|
||||
** NeoStats CVS Identification
|
||||
** $Id: stats.h,v 1.63 2002/12/14 10:23:28 fishwaldo Exp $
|
||||
** $Id: stats.h,v 1.64 2003/01/06 12:07:25 fishwaldo Exp $
|
||||
*/
|
||||
|
||||
#ifndef STATS_H
|
||||
|
@ -160,6 +160,9 @@ struct me {
|
|||
unsigned int coder_debug : 1;
|
||||
unsigned int noticelag : 1;
|
||||
unsigned int token : 1;
|
||||
#ifdef ULTIMATE3
|
||||
unsigned int client : 1;
|
||||
#endif
|
||||
int action;
|
||||
char message[BUFSIZE];
|
||||
char chan[BUFSIZE];
|
||||
|
@ -210,6 +213,9 @@ struct user_ {
|
|||
list_t *chans;
|
||||
struct in_addr ipaddr;
|
||||
time_t TS;
|
||||
#ifdef ULTIMATE3
|
||||
long Smode;
|
||||
#endif
|
||||
};
|
||||
|
||||
struct chans_ {
|
||||
|
@ -303,7 +309,11 @@ extern void Change_User(User *, const char *);
|
|||
extern void sendcoders(char *message,...);
|
||||
extern User *finduser(const char *);
|
||||
extern void UserDump(char *);
|
||||
#ifdef ULTIMATE3
|
||||
extern void UserMode(const char *, const char *, int);
|
||||
#else
|
||||
extern void UserMode(const char *, const char *);
|
||||
#endif
|
||||
extern void init_user_hash();
|
||||
extern void init_chan_hash();
|
||||
extern void AddServer(char *, char *,int);
|
||||
|
|
71
users.c
71
users.c
|
@ -22,7 +22,7 @@
|
|||
** USA
|
||||
**
|
||||
** NeoStats CVS Identification
|
||||
** $Id: users.c,v 1.40 2002/12/13 09:23:55 fishwaldo Exp $
|
||||
** $Id: users.c,v 1.41 2003/01/06 12:07:25 fishwaldo Exp $
|
||||
*/
|
||||
|
||||
#include <fnmatch.h>
|
||||
|
@ -237,9 +237,23 @@ int UserLevel(User *u) {
|
|||
strcpy(segv_location, "UserLevel");
|
||||
for (i=0; i < ((sizeof(usr_mds) / sizeof(usr_mds[0])) -1);i++) {
|
||||
if (u->Umode & usr_mds[i].umodes) {
|
||||
if (usr_mds[i].level > tmplvl) tmplvl = usr_mds[i].level;
|
||||
if (usr_mds[i].level > tmplvl) tmplvl = usr_mds[i].level;
|
||||
}
|
||||
}
|
||||
#ifdef DEBUG
|
||||
log("Umode Level for %s is %d", u->nick, tmplvl);
|
||||
#endif
|
||||
/* I hate SMODEs damn it */
|
||||
#ifdef ULTIMATE3
|
||||
for (i=0; i < ((sizeof(susr_mds) / sizeof(susr_mds[0])) -1); i++) {
|
||||
if (u->Smode & susr_mds[i].umodes) {
|
||||
if (susr_mds[i].level > tmplvl) tmplvl = susr_mds[i].level;
|
||||
}
|
||||
}
|
||||
#endif
|
||||
#ifdef DEBUG
|
||||
log("Smode Level for %s is %d", u->nick, tmplvl);
|
||||
#endif
|
||||
#ifdef DEBUG
|
||||
#ifdef CODERHACK
|
||||
/* this is only cause I dun have the right O lines on some of my "Beta" Networks, so I need to hack this in :) */
|
||||
|
@ -269,8 +283,11 @@ int UserLevel(User *u) {
|
|||
}
|
||||
|
||||
|
||||
|
||||
#ifdef ULTIMATE3
|
||||
void UserMode(const char *nick, const char *modes, int smode)
|
||||
#else
|
||||
void UserMode(const char *nick, const char *modes)
|
||||
#endif
|
||||
{
|
||||
/* I don't know why, but I spent like 3 hours trying to make this function work and
|
||||
I finally got it... what a waste of time... gah, oh well... basically, it sets both the User Flags, and also the User Levels..
|
||||
|
@ -289,6 +306,11 @@ void UserMode(const char *nick, const char *modes)
|
|||
return;
|
||||
}
|
||||
#ifdef DEBUG
|
||||
#ifdef ULTIMATE3
|
||||
if (smode)
|
||||
log("Smodes: %s", modes);
|
||||
else
|
||||
#endif
|
||||
log("Modes: %s", modes);
|
||||
#endif
|
||||
strcpy(u->modes, modes);
|
||||
|
@ -297,21 +319,42 @@ void UserMode(const char *nick, const char *modes)
|
|||
switch(tmpmode) {
|
||||
case '+' : add = 1; break;
|
||||
case '-' : add = 0; break;
|
||||
default : for (i=0; i < ((sizeof(usr_mds) / sizeof(usr_mds[0])) -1);i++) {
|
||||
if (usr_mds[i].mode == tmpmode) {
|
||||
if (add) {
|
||||
u->Umode |= usr_mds[i].umodes;
|
||||
break;
|
||||
} else {
|
||||
u->Umode &= ~usr_mds[i].umodes;
|
||||
break;
|
||||
}
|
||||
}
|
||||
}
|
||||
default :
|
||||
#ifdef ULTIMATE3
|
||||
if (smode) {
|
||||
for (i=0; i < ((sizeof(susr_mds) / sizeof(susr_mds[0])) -1);i++) {
|
||||
if (susr_mds[i].mode == tmpmode) {
|
||||
if (add) {
|
||||
u->Smode |= susr_mds[i].umodes;
|
||||
break;
|
||||
} else {
|
||||
u->Smode &= ~susr_mds[i].umodes;
|
||||
break;
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
#endif
|
||||
for (i=0; i < ((sizeof(usr_mds) / sizeof(usr_mds[0])) -1);i++) {
|
||||
if (usr_mds[i].mode == tmpmode) {
|
||||
if (add) {
|
||||
u->Umode |= usr_mds[i].umodes;
|
||||
break;
|
||||
} else {
|
||||
u->Umode &= ~usr_mds[i].umodes;
|
||||
break;
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
tmpmode = *modes++;
|
||||
}
|
||||
#ifdef DEBUG
|
||||
#ifdef ULTIMATE3
|
||||
if (smode)
|
||||
log("SMODE for %s is are now %p", u->nick, u->Smode);
|
||||
else
|
||||
#endif
|
||||
log("Modes for %s are now %p", u->nick, u->Umode);
|
||||
#endif
|
||||
}
|
||||
|
|
Reference in a new issue