Fixed some chan bugs (hopefully all. Was some stupid bugs in there) and
also imported ^Enigma^'s module updates (finally, I hear him say!)
This commit is contained in:
parent
c24242ee63
commit
512aeb3058
13 changed files with 827 additions and 872 deletions
17
chans.c
17
chans.c
|
@ -5,7 +5,7 @@
|
|||
** Based from GeoStats 1.1.0 by Johnathan George net@lite.net
|
||||
*
|
||||
** NetStats CVS Identification
|
||||
** $Id: chans.c,v 1.8 2002/03/11 08:02:40 fishwaldo Exp $
|
||||
** $Id: chans.c,v 1.9 2002/03/12 07:56:02 fishwaldo Exp $
|
||||
*/
|
||||
|
||||
#include <fnmatch.h>
|
||||
|
@ -182,6 +182,7 @@ void part_chan(User *u, char *chan) {
|
|||
|
||||
void change_user_nick(Chans *c, char *newnick, char *oldnick) {
|
||||
lnode_t *cm;
|
||||
Chanmem *cml;
|
||||
strcpy(segv_location, "change_user_nick");
|
||||
cm = list_find(c->chanmembers, oldnick, comparef);
|
||||
if (!cm) {
|
||||
|
@ -193,8 +194,12 @@ void change_user_nick(Chans *c, char *newnick, char *oldnick) {
|
|||
}
|
||||
return;
|
||||
} else {
|
||||
lnode_destroy(list_delete(c->chanmembers, cm));
|
||||
list_append(c->chanmembers, lnode_create(newnick));
|
||||
#ifdef DEBUG
|
||||
log("Change_User_Nick(): NewNick %s, OldNick %s", newnick, oldnick);
|
||||
#endif
|
||||
cml = lnode_get(cm);
|
||||
strcpy(cml->nick, newnick);
|
||||
chandump(c->name);
|
||||
}
|
||||
}
|
||||
|
||||
|
@ -203,7 +208,7 @@ void change_user_nick(Chans *c, char *newnick, char *oldnick) {
|
|||
|
||||
void join_chan(User *u, char *chan) {
|
||||
Chans *c;
|
||||
lnode_t *un;
|
||||
lnode_t *un, *cn;
|
||||
Chanmem *cm;
|
||||
strcpy(segv_location, "join_chan");
|
||||
if (!u) {
|
||||
|
@ -225,7 +230,7 @@ void join_chan(User *u, char *chan) {
|
|||
strcpy(cm->nick, u->nick);
|
||||
cm->joint = time(NULL);
|
||||
cm->flags = 0;
|
||||
un = lnode_create(cm);
|
||||
cn = lnode_create(cm);
|
||||
#ifdef DEBUG
|
||||
log("adding usernode %s to Channel %s", u->nick, chan);
|
||||
#endif
|
||||
|
@ -241,7 +246,7 @@ void join_chan(User *u, char *chan) {
|
|||
if (list_isfull(c->chanmembers)) {
|
||||
log("ekk, Channel %s Members list is full", c->name);
|
||||
} else {
|
||||
list_append(c->chanmembers, un);
|
||||
list_append(c->chanmembers, cn);
|
||||
}
|
||||
c->cur_users++;
|
||||
un = lnode_create(c->name);
|
||||
|
|
|
@ -1,5 +1,7 @@
|
|||
MoraleServ ChangeLog - Anything we add/remove/fix/change is in here (even our rants)
|
||||
|
||||
* MoraleServ * ^Enigma^ * Version Increment -> 2.17
|
||||
- Code overhaul for NeoStats-2.5 core.
|
||||
|
||||
* MoraleServ * Shmad * Version Increment -> 2.16
|
||||
- Fixed retarded crash..
|
||||
|
|
|
@ -9,11 +9,6 @@ CC=gcc
|
|||
CFLAGS= -O2 -Wall -fPIC
|
||||
LINKER=ld
|
||||
|
||||
$(warning *** NOTE:)
|
||||
$(warning If you receive a "`../ms.so': Permission denied" message, UNLOAD the module)
|
||||
$(warning from NeoStats and then compile the module & the 'make' will function properly)
|
||||
$(warning )
|
||||
|
||||
all:
|
||||
$(CC) $(CFLAGS) $(INCLUDES) -o $(OBJECTS) -c $(SOURCES)
|
||||
$(LINKER) -shared -o $(TARGET) $(LIBS) $(OBJECTS)
|
||||
|
|
1265
dl/ms/ms.c
1265
dl/ms/ms.c
File diff suppressed because it is too large
Load diff
|
@ -1,8 +1,8 @@
|
|||
/* NeoStats - IRC Statistical Services Copryight (c) 1999-2001 NeoStats Group.
|
||||
/* NeoStats - IRC Statistical Services Copryight (c) 1999-2002 NeoStats Group.
|
||||
*
|
||||
** Module: MoraleServ
|
||||
** Description: Network Morale Service
|
||||
** Version: 2.1
|
||||
** Version: 2.17
|
||||
** Author: ^Enigma^
|
||||
*/
|
||||
|
||||
|
|
|
@ -1,6 +1,9 @@
|
|||
Program: NeoServ Module for NeoStats 2.x ChangeLog
|
||||
Author: ^Enigma^ <enigma@neostats.net>
|
||||
|
||||
* Version 1.3 * February 8th, 2002
|
||||
- Code overhaul for NeoStats-2.5 core.
|
||||
|
||||
* Version 1.2 * December 22nd, 2001
|
||||
- More topics Added (now 22 topics)
|
||||
- Logging Function added to monitor usage
|
||||
|
|
|
@ -9,11 +9,6 @@ CC=gcc
|
|||
CFLAGS= -O2 -Wall -fPIC
|
||||
LINKER=ld
|
||||
|
||||
$(warning *** NOTE:)
|
||||
$(warning If you receive a "`../neoserv.so': Permission denied" message, UNLOAD the module)
|
||||
$(warning from NeoStats and then compile the module & the 'make' will function properly)
|
||||
$(warning )
|
||||
|
||||
all:
|
||||
$(CC) $(CFLAGS) $(INCLUDES) -o $(OBJECTS) -c $(SOURCES)
|
||||
$(LINKER) -shared -o $(TARGET) $(LIBS) $(OBJECTS)
|
||||
|
|
|
@ -1,9 +1,9 @@
|
|||
/* NeoStats - IRC Statistical Services Copryight (c) 1999-2001 NeoStats Group.
|
||||
/* NeoStats - IRC Statistical Services Copryight (c) 1999-2002 NeoStats Group.
|
||||
*
|
||||
** Module: NeoServ
|
||||
** Description: Network Village Idiot Help System
|
||||
** Version: 1.2
|
||||
** Date: 28/12/2001
|
||||
** Version: 1.3
|
||||
** Date: 08/03/2002
|
||||
** Author: ^Enigma^
|
||||
*/
|
||||
|
||||
|
@ -25,211 +25,196 @@ static void neoserv_logbackup(User *u);
|
|||
Module_Info my_info[] = { {
|
||||
"NeoServ",
|
||||
"Network NeoStats Help Service",
|
||||
"1.2"
|
||||
"1.3"
|
||||
} };
|
||||
|
||||
|
||||
int new_m_version(char *av, char *tmp) {
|
||||
sts(":%s 351 %s :Module NeoServ Loaded, Version %s %s %s",me.name, av,my_info[0].module_version,neoservversion_date,neoservversion_time);
|
||||
snumeric_cmd(351, av, "Module NeoServ Loaded, Version: %s %s %s",my_info[0].module_version,neoservversion_date,neoservversion_time);
|
||||
return 0;
|
||||
}
|
||||
|
||||
|
||||
Functions my_fn_list[] = {
|
||||
{ "VERSION", new_m_version, 1 },
|
||||
{ NULL, NULL, 0 }
|
||||
};
|
||||
|
||||
|
||||
int __Bot_Message(char *origin, char *coreLine, int type)
|
||||
int __Bot_Message(char *origin, char **av, int ac)
|
||||
{
|
||||
User *u;
|
||||
char *cmd;
|
||||
/* char *tmp; */
|
||||
u = finduser(origin);
|
||||
|
||||
u = finduser(origin);
|
||||
|
||||
if (coreLine == NULL) return -1;
|
||||
cmd = strtok(coreLine, " ");
|
||||
/* strcpy(cmd, tmp); */
|
||||
/* neoservlog("%s %s", cmd, tmp); */
|
||||
|
||||
if (!strcasecmp(cmd, "HELP")) {
|
||||
coreLine = strtok(NULL, " ");
|
||||
|
||||
if (coreLine) {
|
||||
neoservlog("%s requested: %s", u->nick, coreLine);
|
||||
}
|
||||
|
||||
if (!coreLine) {
|
||||
if (!strcasecmp(av[1], "HELP")) {
|
||||
if (ac <= 2) {
|
||||
privmsg_list(u->nick, s_NeoServ, neoserv_help);
|
||||
return 1;
|
||||
} else if (!strcasecmp(coreLine, "TOPIC1")) {
|
||||
} else if (!strcasecmp(av[2], "TOPIC1")) {
|
||||
privmsg_list(u->nick, s_NeoServ, neoserv_help_topic1);
|
||||
return 1;
|
||||
} else if (!strcasecmp(coreLine, "TOPIC2")) {
|
||||
} else if (!strcasecmp(av[2], "TOPIC2")) {
|
||||
privmsg_list(u->nick, s_NeoServ, neoserv_help_topic2);
|
||||
return 1;
|
||||
} else if (!strcasecmp(coreLine, "TOPIC3")) {
|
||||
} else if (!strcasecmp(av[2], "TOPIC3")) {
|
||||
privmsg_list(u->nick, s_NeoServ, neoserv_help_topic3);
|
||||
return 1;
|
||||
} else if (!strcasecmp(coreLine, "TOPIC4")) {
|
||||
} else if (!strcasecmp(av[2], "TOPIC4")) {
|
||||
privmsg_list(u->nick, s_NeoServ, neoserv_help_topic4);
|
||||
return 1;
|
||||
} else if (!strcasecmp(coreLine, "TOPIC5")) {
|
||||
} else if (!strcasecmp(av[2], "TOPIC5")) {
|
||||
privmsg_list(u->nick, s_NeoServ, neoserv_help_topic5);
|
||||
return 1;
|
||||
} else if (!strcasecmp(coreLine, "TOPIC6")) {
|
||||
} else if (!strcasecmp(av[2], "TOPIC6")) {
|
||||
privmsg_list(u->nick, s_NeoServ, neoserv_help_topic6);
|
||||
return 1;
|
||||
} else if (!strcasecmp(coreLine, "TOPIC7")) {
|
||||
} else if (!strcasecmp(av[2], "TOPIC7")) {
|
||||
privmsg_list(u->nick, s_NeoServ, neoserv_help_topic7);
|
||||
return 1;
|
||||
} else if (!strcasecmp(coreLine, "TOPIC8")) {
|
||||
} else if (!strcasecmp(av[2], "TOPIC8")) {
|
||||
privmsg_list(u->nick, s_NeoServ, neoserv_help_topic8);
|
||||
return 1;
|
||||
} else if (!strcasecmp(coreLine, "TOPIC9")) {
|
||||
} else if (!strcasecmp(av[2], "TOPIC9")) {
|
||||
privmsg_list(u->nick, s_NeoServ, neoserv_help_topic9);
|
||||
return 1;
|
||||
} else if (!strcasecmp(coreLine, "TOPIC10")) {
|
||||
} else if (!strcasecmp(av[2], "TOPIC10")) {
|
||||
privmsg_list(u->nick, s_NeoServ, neoserv_help_topic10);
|
||||
return 1;
|
||||
} else if (!strcasecmp(coreLine, "TOPIC11")) {
|
||||
} else if (!strcasecmp(av[2], "TOPIC11")) {
|
||||
privmsg_list(u->nick, s_NeoServ, neoserv_help_topic11);
|
||||
return 1;
|
||||
} else if (!strcasecmp(coreLine, "TOPIC12")) {
|
||||
} else if (!strcasecmp(av[2], "TOPIC12")) {
|
||||
privmsg_list(u->nick, s_NeoServ, neoserv_help_topic12);
|
||||
return 1;
|
||||
} else if (!strcasecmp(coreLine, "TOPIC13")) {
|
||||
} else if (!strcasecmp(av[2], "TOPIC13")) {
|
||||
privmsg_list(u->nick, s_NeoServ, neoserv_help_topic13);
|
||||
return 1;
|
||||
} else if (!strcasecmp(coreLine, "TOPIC14")) {
|
||||
} else if (!strcasecmp(av[2], "TOPIC14")) {
|
||||
privmsg_list(u->nick, s_NeoServ, neoserv_help_topic14);
|
||||
return 1;
|
||||
} else if (!strcasecmp(coreLine, "TOPIC15")) {
|
||||
} else if (!strcasecmp(av[2], "TOPIC15")) {
|
||||
privmsg_list(u->nick, s_NeoServ, neoserv_help_topic15);
|
||||
return 1;
|
||||
} else if (!strcasecmp(coreLine, "TOPIC16")) {
|
||||
} else if (!strcasecmp(av[2], "TOPIC16")) {
|
||||
privmsg_list(u->nick, s_NeoServ, neoserv_help_topic16);
|
||||
return 1;
|
||||
} else if (!strcasecmp(coreLine, "TOPIC17")) {
|
||||
} else if (!strcasecmp(av[2], "TOPIC17")) {
|
||||
privmsg_list(u->nick, s_NeoServ, neoserv_help_topic17);
|
||||
return 1;
|
||||
} else if (!strcasecmp(coreLine, "TOPIC18")) {
|
||||
} else if (!strcasecmp(av[2], "TOPIC18")) {
|
||||
privmsg_list(u->nick, s_NeoServ, neoserv_help_topic18);
|
||||
return 1;
|
||||
} else if (!strcasecmp(coreLine, "TOPIC19")) {
|
||||
} else if (!strcasecmp(av[2], "TOPIC19")) {
|
||||
privmsg_list(u->nick, s_NeoServ, neoserv_help_topic19);
|
||||
return 1;
|
||||
} else if (!strcasecmp(coreLine, "TOPIC20")) {
|
||||
} else if (!strcasecmp(av[2], "TOPIC20")) {
|
||||
privmsg_list(u->nick, s_NeoServ, neoserv_help_topic20);
|
||||
return 1;
|
||||
} else if (!strcasecmp(coreLine, "TOPIC21")) {
|
||||
} else if (!strcasecmp(av[2], "TOPIC21")) {
|
||||
privmsg_list(u->nick, s_NeoServ, neoserv_help_topic21);
|
||||
return 1;
|
||||
} else if (!strcasecmp(coreLine, "TOPIC22")) {
|
||||
} else if (!strcasecmp(av[2], "TOPIC22")) {
|
||||
privmsg_list(u->nick, s_NeoServ, neoserv_help_topic22);
|
||||
return 1;
|
||||
} else if (!strcasecmp(coreLine, "TOPIC23")) {
|
||||
} else if (!strcasecmp(av[2], "TOPIC23")) {
|
||||
privmsg_list(u->nick, s_NeoServ, neoserv_help_topic23);
|
||||
return 1;
|
||||
} else if (!strcasecmp(coreLine, "TOPIC24")) {
|
||||
} else if (!strcasecmp(av[2], "TOPIC24")) {
|
||||
privmsg_list(u->nick, s_NeoServ, neoserv_help_topic24);
|
||||
return 1;
|
||||
} else
|
||||
privmsg(u->nick, s_NeoServ, "\2%s\2 is An Unknown Help Topic. Please /msg %s HELP", coreLine, s_NeoServ);
|
||||
} else
|
||||
privmsg(u->nick, s_NeoServ, "Unknown Help Topic: \2%s\2", av[2]);
|
||||
}
|
||||
|
||||
/* if ((strlower(tmp) != strlower("VIEWLOG")) || (strlower(tmp) != strlower("SEND")) || (strlower(tmp) != strlower("LOGBACKUP"))) { */
|
||||
/* if ((strlower(cmd) != strlower("VIEWLOG")) || (strlower(cmd) != strlower("SEND")) || (strlower(cmd) != strlower("LOGBACKUP"))) { */
|
||||
/* if ((strcasecmp(cmd, "VIEWLOG")) || (strcasecmp(cmd, "SEND")) || (strcasecmp(cmd, "LOGBACKUP"))) { */
|
||||
if ((fnmatch(strlower(cmd), "viewlog", 0) != 0) || (fnmatch(strlower(cmd), "send", 0) != 0) || (fnmatch(strlower(cmd), "logbackup", 0) != 0)) {
|
||||
neoservlog("%s requested: %s", u->nick, cmd);
|
||||
if ((fnmatch(strlower(av[2]), "viewlog", 0) != 0) || (fnmatch(strlower(av[2]), "send", 0) != 0) || (fnmatch(strlower(av[2]), "logbackup", 0) != 0)) {
|
||||
neoservlog("%s requested: %s", u->nick, av[2]);
|
||||
}
|
||||
|
||||
|
||||
if (!strcasecmp(cmd, "TOPIC1")) {
|
||||
if (!strcasecmp(av[2], "TOPIC1")) {
|
||||
privmsg_list(u->nick, s_NeoServ, neoserv_help_topic1);
|
||||
return 1;
|
||||
} else if (!strcasecmp(cmd, "TOPIC2")) {
|
||||
} else if (!strcasecmp(av[2], "TOPIC2")) {
|
||||
privmsg_list(u->nick, s_NeoServ, neoserv_help_topic2);
|
||||
return 1;
|
||||
} else if (!strcasecmp(cmd, "TOPIC3")) {
|
||||
} else if (!strcasecmp(av[2], "TOPIC3")) {
|
||||
privmsg_list(u->nick, s_NeoServ, neoserv_help_topic3);
|
||||
return 1;
|
||||
} else if (!strcasecmp(cmd, "TOPIC4")) {
|
||||
} else if (!strcasecmp(av[2], "TOPIC4")) {
|
||||
privmsg_list(u->nick, s_NeoServ, neoserv_help_topic4);
|
||||
return 1;
|
||||
} else if (!strcasecmp(cmd, "TOPIC5")) {
|
||||
} else if (!strcasecmp(av[2], "TOPIC5")) {
|
||||
privmsg_list(u->nick, s_NeoServ, neoserv_help_topic5);
|
||||
return 1;
|
||||
} else if (!strcasecmp(cmd, "TOPIC6")) {
|
||||
} else if (!strcasecmp(av[2], "TOPIC6")) {
|
||||
privmsg_list(u->nick, s_NeoServ, neoserv_help_topic6);
|
||||
return 1;
|
||||
} else if (!strcasecmp(cmd, "TOPIC7")) {
|
||||
} else if (!strcasecmp(av[2], "TOPIC7")) {
|
||||
privmsg_list(u->nick, s_NeoServ, neoserv_help_topic7);
|
||||
return 1;
|
||||
} else if (!strcasecmp(cmd, "TOPIC8")) {
|
||||
} else if (!strcasecmp(av[2], "TOPIC8")) {
|
||||
privmsg_list(u->nick, s_NeoServ, neoserv_help_topic8);
|
||||
return 1;
|
||||
} else if (!strcasecmp(cmd, "TOPIC9")) {
|
||||
} else if (!strcasecmp(av[2], "TOPIC9")) {
|
||||
privmsg_list(u->nick, s_NeoServ, neoserv_help_topic9);
|
||||
return 1;
|
||||
} else if (!strcasecmp(cmd, "TOPIC10")) {
|
||||
} else if (!strcasecmp(av[2], "TOPIC10")) {
|
||||
privmsg_list(u->nick, s_NeoServ, neoserv_help_topic10);
|
||||
return 1;
|
||||
} else if (!strcasecmp(cmd, "TOPIC11")) {
|
||||
} else if (!strcasecmp(av[2], "TOPIC11")) {
|
||||
privmsg_list(u->nick, s_NeoServ, neoserv_help_topic11);
|
||||
return 1;
|
||||
} else if (!strcasecmp(cmd, "TOPIC12")) {
|
||||
} else if (!strcasecmp(av[2], "TOPIC12")) {
|
||||
privmsg_list(u->nick, s_NeoServ, neoserv_help_topic12);
|
||||
return 1;
|
||||
} else if (!strcasecmp(cmd, "TOPIC13")) {
|
||||
} else if (!strcasecmp(av[2], "TOPIC13")) {
|
||||
privmsg_list(u->nick, s_NeoServ, neoserv_help_topic13);
|
||||
return 1;
|
||||
} else if (!strcasecmp(cmd, "TOPIC14")) {
|
||||
} else if (!strcasecmp(av[2], "TOPIC14")) {
|
||||
privmsg_list(u->nick, s_NeoServ, neoserv_help_topic14);
|
||||
return 1;
|
||||
} else if (!strcasecmp(cmd, "TOPIC15")) {
|
||||
} else if (!strcasecmp(av[2], "TOPIC15")) {
|
||||
privmsg_list(u->nick, s_NeoServ, neoserv_help_topic15);
|
||||
return 1;
|
||||
} else if (!strcasecmp(cmd, "TOPIC16")) {
|
||||
} else if (!strcasecmp(av[2], "TOPIC16")) {
|
||||
privmsg_list(u->nick, s_NeoServ, neoserv_help_topic16);
|
||||
return 1;
|
||||
} else if (!strcasecmp(cmd, "TOPIC17")) {
|
||||
} else if (!strcasecmp(av[2], "TOPIC17")) {
|
||||
privmsg_list(u->nick, s_NeoServ, neoserv_help_topic17);
|
||||
return 1;
|
||||
} else if (!strcasecmp(cmd, "TOPIC18")) {
|
||||
} else if (!strcasecmp(av[2], "TOPIC18")) {
|
||||
privmsg_list(u->nick, s_NeoServ, neoserv_help_topic18);
|
||||
return 1;
|
||||
} else if (!strcasecmp(cmd, "TOPIC19")) {
|
||||
} else if (!strcasecmp(av[2], "TOPIC19")) {
|
||||
privmsg_list(u->nick, s_NeoServ, neoserv_help_topic19);
|
||||
return 1;
|
||||
} else if (!strcasecmp(cmd, "TOPIC20")) {
|
||||
} else if (!strcasecmp(av[2], "TOPIC20")) {
|
||||
privmsg_list(u->nick, s_NeoServ, neoserv_help_topic20);
|
||||
return 1;
|
||||
} else if (!strcasecmp(cmd, "TOPIC21")) {
|
||||
} else if (!strcasecmp(av[2], "TOPIC21")) {
|
||||
privmsg_list(u->nick, s_NeoServ, neoserv_help_topic21);
|
||||
return 1;
|
||||
} else if (!strcasecmp(cmd, "TOPIC22")) {
|
||||
} else if (!strcasecmp(av[2], "TOPIC22")) {
|
||||
privmsg_list(u->nick, s_NeoServ, neoserv_help_topic22);
|
||||
return 1;
|
||||
} else if (!strcasecmp(cmd, "TOPIC23")) {
|
||||
} else if (!strcasecmp(av[2], "TOPIC23")) {
|
||||
privmsg_list(u->nick, s_NeoServ, neoserv_help_topic23);
|
||||
return 1;
|
||||
} else if (!strcasecmp(cmd, "TOPIC24")) {
|
||||
} else if (!strcasecmp(av[2], "TOPIC24")) {
|
||||
privmsg_list(u->nick, s_NeoServ, neoserv_help_topic24);
|
||||
return 1;
|
||||
} else if (!strcasecmp(cmd, "VIEWLOG") && (UserLevel(u) >= 185)) {
|
||||
} else if (!strcasecmp(av[2], "VIEWLOG") && (UserLevel(u) >= 185)) {
|
||||
neoserv_viewlog(u);
|
||||
} else if (!strcasecmp(cmd, "LOGBACKUP") && (UserLevel(u) >= 185)) {
|
||||
} else if (!strcasecmp(av[2], "LOGBACKUP") && (UserLevel(u) >= 185)) {
|
||||
neoserv_logbackup(u);
|
||||
} else if (!strcasecmp(cmd, "SEND") && (UserLevel(u) >= 185)) {
|
||||
char *m;
|
||||
cmd = strtok(NULL, " ");
|
||||
m = strtok(NULL, " ");
|
||||
neoserv_send(u, cmd, m);
|
||||
} else if (!strcasecmp(av[2], "SEND") && (UserLevel(u) >= 185)) {
|
||||
if (ac < 4) {
|
||||
privmsg(u->nick, s_NeoServ, "Syntax: /msg %s SEND <NICK> <TOPIC#>", s_NeoServ);
|
||||
privmsg(u->nick, s_NeoServ, "For addtional help: /msg %s HELP", s_NeoServ);
|
||||
return -1;
|
||||
}
|
||||
neoserv_send(u, av[2], av[3]);
|
||||
} else {
|
||||
privmsg(u->nick, s_NeoServ, "%s Unknown To The NeoStats Help System... please /msg %s HELP", cmd, s_NeoServ);
|
||||
privmsg(u->nick, s_NeoServ, "%s Unknown To The NeoStats Help System... please /msg %s HELP", av[1], s_NeoServ);
|
||||
}
|
||||
return 1;
|
||||
}
|
||||
|
@ -243,8 +228,7 @@ int Online(Server *data) {
|
|||
init_bot(s_NeoServ,"NeoServ",me.name,"Network NeoStats Help Service", "+Sqd-x", my_info[0].module_name);
|
||||
}
|
||||
|
||||
sts(":%s JOIN #NeoStats",s_NeoServ);
|
||||
sts(":%s MODE #NeoStats +o %s",me.name, s_NeoServ);
|
||||
sjoin_cmd(s_NeoServ, "#NeoStats");
|
||||
return 1;
|
||||
};
|
||||
|
||||
|
@ -269,16 +253,14 @@ EventFnList *__module_get_events() {
|
|||
return my_event_list;
|
||||
};
|
||||
|
||||
|
||||
void _init() {
|
||||
s_NeoServ = "NeoServ";
|
||||
sts(":%s GLOBOPS :NeoServ Help System Module Loaded", me.name);
|
||||
globops(me.name, "NeoServ Help System Module Loaded",me.name);
|
||||
}
|
||||
|
||||
|
||||
void _fini() {
|
||||
sts(":%sGLOBOPS :NeoServ Help System Module Unloaded", me.name);
|
||||
|
||||
globops(me.name, "NeoServ Help System Module Unloaded",me.name);
|
||||
};
|
||||
|
||||
|
||||
|
@ -309,20 +291,7 @@ void neoservlog(char *fmt, ...)
|
|||
|
||||
/* Routine for SEND */
|
||||
static void neoserv_send(User *u, char *cmd, char *m) {
|
||||
|
||||
if (!cmd) {
|
||||
privmsg(u->nick, s_NeoServ, "Syntax: /msg %s SEND <NICK> <TOPIC#>", s_NeoServ);
|
||||
privmsg(u->nick, s_NeoServ, "For addtional help: /msg %s HELP", s_NeoServ);
|
||||
return;
|
||||
}
|
||||
if (!m) {
|
||||
privmsg(u->nick, s_NeoServ, "Syntax: Syntax: /msg %s SEND <NICK> <TOPIC#>", s_NeoServ);
|
||||
privmsg(u->nick, s_NeoServ, "For addtional help: /msg %s HELP", s_NeoServ);
|
||||
return;
|
||||
}
|
||||
/* The user has passed the minimum requirements for input */
|
||||
|
||||
segv_location = sstrdup("neoserv_send");
|
||||
strcpy(segv_location, "neoserv_send");
|
||||
|
||||
/* If The User Is Online Send The Correct Topic*/
|
||||
if (finduser(cmd)) {
|
||||
|
@ -419,7 +388,7 @@ static void neoserv_viewlog(User *u)
|
|||
FILE *fp;
|
||||
char buf[512];
|
||||
|
||||
segv_location = sstrdup("neoserv_viewlog");
|
||||
strcpy(segv_location, "neoserv_viewlog");
|
||||
if (!(UserLevel(u) >= 185)) {
|
||||
neoservlog("Access Denied (VIEWLOG) to %s", u->nick);
|
||||
privmsg(u->nick, s_NeoServ, "Access Denied.");
|
||||
|
@ -448,7 +417,7 @@ static void neoserv_logbackup(User *u)
|
|||
char tmp[27];
|
||||
time_t t = time(NULL);
|
||||
|
||||
segv_location = sstrdup("neoserv_logbackup");
|
||||
strcpy(segv_location, "neoserv_logbackup");
|
||||
if (!(UserLevel(u) >= 185)) {
|
||||
neoservlog("Access Denied (LOGBACKUP) from %s", u->nick);
|
||||
privmsg(u->nick, s_NeoServ, "Access Denied.");
|
||||
|
|
|
@ -1,9 +1,9 @@
|
|||
/* NeoStats - IRC Statistical Services Copryight (c) 1999-2001 NeoStats Group.
|
||||
/* NeoStats - IRC Statistical Services Copryight (c) 1999-2002 NeoStats Group.
|
||||
*
|
||||
** Module: NeoServ
|
||||
** Description: Network Village Idiot Help System
|
||||
** Version: 1.2
|
||||
** Date: 23/12/2001
|
||||
** Version: 1.3
|
||||
** Date: 08/03/2002
|
||||
** Author: ^Enigma^
|
||||
*/
|
||||
|
||||
|
@ -131,7 +131,8 @@ const char *neoserv_help_topic7[] = {
|
|||
"",
|
||||
"Personally, we use the Unreal IRCD and Epona Services.",
|
||||
"NeoStats will work on some other IRCDs and will get on well",
|
||||
"with other services such as DaylightII.",
|
||||
"with other services such as DaylightII. NeoStats-2.5 is",
|
||||
"planned to support the Ultimate, Hybrid and Bahmut IRCDs.",
|
||||
"",
|
||||
NULL
|
||||
};
|
||||
|
@ -140,11 +141,12 @@ const char *neoserv_help_topic8[] = {
|
|||
"\2TOPIC8\2 - What OS Will NeoStats Run on?",
|
||||
"",
|
||||
"NeoStats runs best under any Linux/Unix Based Enivornment.",
|
||||
"NeoStats does not run under some BDS... email the NeoStats",
|
||||
"team for more information if you fall into this category.",
|
||||
"Our email address is: support@neostats.net",
|
||||
"NeoStats-2.0.13 does not run under some BSDs, however a patch",
|
||||
"for this was created and the NeoStats forums should be looked",
|
||||
"at for more information on this. NeoStats-2.5 will support",
|
||||
"BSDs.",
|
||||
"",
|
||||
"NeoStats will not run under the MAC environment",
|
||||
"NeoStats will not run under the MAC or Windows environment",
|
||||
"",
|
||||
NULL
|
||||
};
|
||||
|
@ -171,7 +173,7 @@ const char *neoserv_help_topic10[] = {
|
|||
"be op'ed in the Services channel to function properly.",
|
||||
"",
|
||||
"The second senario is a NeoStats/Services flood to a",
|
||||
"much greater extent than a simple op/deop 'war'."
|
||||
"much greater extent than a simple op/deop 'war'.",
|
||||
"If your conflict is more serious than this occurance,",
|
||||
"your problem is that you do not have U: lines in your",
|
||||
"network IRCDS. Please add U: lines for the stats servers",
|
||||
|
@ -185,14 +187,17 @@ const char *neoserv_help_topic11[] = {
|
|||
"\2TOPIC11\2 - Whats New in NeoStats?",
|
||||
"",
|
||||
"The current development version of NeoStats is",
|
||||
"NeoStats Version 2.1. The new version which is currently",
|
||||
"NeoStats Version 2.5. The new version which is currently",
|
||||
"in beta development fixes a number of issues that have",
|
||||
"come to our attention such as statserv crashing NeoStats",
|
||||
"when NeoStats is loaded. The new code has undergone some",
|
||||
"major developments such as the complete re-coding of some",
|
||||
"'questionable' routines in terms of stability. The team is",
|
||||
"also proud to announce the releasing of a number of new",
|
||||
"modules as well as updates to some of our older ones",
|
||||
"modules as well as updates to some of our older ones.",
|
||||
"One of the noteable differences is a new core in the",
|
||||
"NeoStats-2.5. Older modules will not work for the new",
|
||||
"version of NeoStats.",
|
||||
"",
|
||||
"An improved StatServ is now avaliable which combines all",
|
||||
"the requests that users have given us for feautres. We are",
|
||||
|
@ -203,19 +208,26 @@ const char *neoserv_help_topic11[] = {
|
|||
"MoraleServ and greater accuracy and stability in terms of",
|
||||
"Statserv.",
|
||||
"",
|
||||
"The Team's main target at the moment is monitoring NeoStats'",
|
||||
"stability as well as doing the things on our 'TODO' list.",
|
||||
"These include things such as fixing RESTART and implementing",
|
||||
"RELOAD. We are busier than ever on version 2.1 and we are",
|
||||
"working hard at it... as well as maintaing some sort of a life",
|
||||
"The Team's main target at the moment is completeing many",
|
||||
"items on the 'TODO' list as well as 'overhauling' and",
|
||||
"cleaning up large amounts of code. The second target",
|
||||
"that we are working on at present is the stability",
|
||||
"issues to make the NeoStats-2.5 release the most stable",
|
||||
"release yet.",
|
||||
"",
|
||||
"Some things on our 'TODO' list. include trivial things such",
|
||||
"as fixing RESTART and implementing RELOAD. Other items include",
|
||||
"a new type of 'access' system similar to services 'operator' and",
|
||||
"and 'roots' lists. We are busier than ever on version 2.5 and we",
|
||||
"are working hard at it... as well as maintaing some sort of a life",
|
||||
"away from our crackhead code :P j/k.",
|
||||
"",
|
||||
"We anticipate version 2.1 to be our most stable and best in",
|
||||
"We anticipate version 2.5 to be our most stable and best in",
|
||||
"terms of features. We have no idea when it will be ready at",
|
||||
"this stage, but if your on our mailing list we'll let you know",
|
||||
":P",
|
||||
"",
|
||||
"The NeoStats Group Inc."
|
||||
"The NeoStats Group Inc.",
|
||||
"",
|
||||
"Don't smoke crack. We really mean it this time :P",
|
||||
"",
|
||||
|
@ -282,9 +294,9 @@ const char *neoserv_help_topic13[] = {
|
|||
"to replace the Epona services currently used and be fully",
|
||||
"intergrated with NeoStats. During this design a module with",
|
||||
"multiple nick's was deisgned and so was a patch to the API",
|
||||
"which enabled this feature. As of now, this patch has not",
|
||||
"been released... but the team is looking at releasing it",
|
||||
"once the Channel Services have been released.",
|
||||
"which enabled this feature. At this stage there are no plans",
|
||||
"to release the multiple nicks API, but rather intergate it",
|
||||
"into the NeoStats-2.5 release.",
|
||||
"",
|
||||
NULL
|
||||
};
|
||||
|
@ -348,6 +360,12 @@ const char *neoserv_help_topic17[] = {
|
|||
"irc-operator and the NeoStats were correct... but the network",
|
||||
"had recently upgraded from Unreal-3.1.1 to Unreal3.2",
|
||||
"",
|
||||
"The development of NeoStats-2.5 will fix this problem as we are",
|
||||
"now working on a new system independent of flags. The new system",
|
||||
"is based around the idea of services 'operator' and 'root' lists.",
|
||||
"We belive this will reduce the number of problems encountered",
|
||||
"when changes are made to the various ircds.",
|
||||
"",
|
||||
NULL
|
||||
};
|
||||
|
||||
|
@ -413,7 +431,7 @@ const char *neoserv_help_topic22[] = {
|
|||
"The NeoStats team has considered porting a windows platform",
|
||||
"of NeoStats on many occasions. At this stage we feel that",
|
||||
"we will create a windows version from the release that is",
|
||||
"due out shortly (NeoStats-2.1). We are currently in the",
|
||||
"due out shortly (NeoStats-2.5). We are currently in the",
|
||||
"process of fine-tuning and debugging the new and old code",
|
||||
"of NeoStats. However, don't be surprised if no windows",
|
||||
"version is available until a few releases later. Once we",
|
||||
|
@ -445,6 +463,16 @@ const char *neoserv_help_topic23[] = {
|
|||
"that you first upgrade to version 2.0.13 then install the new",
|
||||
"modules which you have downloaded.",
|
||||
"",
|
||||
"However, recently the team decided to make a large number of",
|
||||
"changes to NeoStats, causing the development version",
|
||||
"NeoStats-2.1 to be incremented to NeoStats-2.5. In doing this,",
|
||||
"code used for the modules was slightly modified and therefore",
|
||||
"the older modules will not work on the new version of NeoStats.",
|
||||
"A few of the modules on the web site at present are intended for",
|
||||
"use with the older development version NeoStats-2.1, but may",
|
||||
"work with NeoStats-2.0.13. If errors are incured with the new",
|
||||
"versions from the website it is probably due to this fact.",
|
||||
"",
|
||||
"If you get an '-LDL' error, see 'TOPIC1' for help on this matter.",
|
||||
"",
|
||||
NULL
|
||||
|
@ -453,15 +481,15 @@ NULL
|
|||
const char *neoserv_help_topic24[] = {
|
||||
"\2TOPIC24 - NeoStats Beta Testers Note",
|
||||
"",
|
||||
"Welcome to the Beta preview of NeoStats-2.1, the next",
|
||||
"Welcome to the Beta preview of NeoStats-2.5, the next",
|
||||
"generation of statistical software from the NeoStats Group Inc.",
|
||||
"",
|
||||
"Here's what you should expect when downloading this beta:",
|
||||
"",
|
||||
"NeoStats-2.1 is a beta which may contain bugs, we recommend",
|
||||
"that you install NeoStats-2.1 in it's own folder rather than",
|
||||
"NeoStats-2.5 is a beta which may contain bugs, we recommend",
|
||||
"that you install NeoStats-2.5 in it's own folder rather than",
|
||||
"overwrite the NeoStats 2.x installation that you currently",
|
||||
"have. If you have a previous version of NeoStats-2.1 you",
|
||||
"have. If you have a previous version of NeoStats-2.5 you",
|
||||
"should delete it and do a fresh install of the next Beta release.",
|
||||
"The software has several, major known issues, which prevent",
|
||||
"certain features from being fully usable by NeoStats users.",
|
||||
|
@ -480,7 +508,7 @@ const char *neoserv_help_topic24[] = {
|
|||
"by email in a report fashion:",
|
||||
"http://www.neostats.net/cgi-bin/Forum.cgi or support@neostats.net",
|
||||
"",
|
||||
"With that said, we hope you enjoy using NeoStats-2.1!",
|
||||
"With that said, we hope you enjoy using NeoStats-2.5!",
|
||||
"",
|
||||
NULL
|
||||
};
|
||||
|
|
|
@ -1,18 +1,18 @@
|
|||
INCLUDES = -I../..
|
||||
|
||||
SOURCES= statserv.c
|
||||
OBJECTS= statserv.lo
|
||||
TARGET= statserv.so
|
||||
|
||||
CC=@CC@
|
||||
CFLAGS=@CFLAGS@ -fPIC
|
||||
LINKER=ld
|
||||
|
||||
all:
|
||||
$(CC) $(CFLAGS) $(INCLUDES) -o $(OBJECTS) -c $(SOURCES)
|
||||
$(LINKER) -shared -o $(TARGET) $(LIBS) $(OBJECTS)
|
||||
/bin/cp $(TARGET) ../
|
||||
|
||||
clean:
|
||||
/bin/rm -rf ../$(TARGET) Makefile
|
||||
/bin/rm -rf *.o *.lo *.so
|
||||
INCLUDES = -I../..
|
||||
|
||||
SOURCES= statserv.c
|
||||
OBJECTS= statserv.lo
|
||||
TARGET= statserv.so
|
||||
|
||||
CC=@CC@
|
||||
CFLAGS=@CFLAGS@ -fPIC
|
||||
LINKER=ld
|
||||
|
||||
all:
|
||||
$(CC) $(CFLAGS) $(INCLUDES) -o $(OBJECTS) -c $(SOURCES)
|
||||
$(LINKER) -shared -o $(TARGET) $(LIBS) $(OBJECTS)
|
||||
/bin/cp $(TARGET) ../
|
||||
|
||||
clean:
|
||||
/bin/rm -rf ../$(TARGET) Makefile
|
||||
/bin/rm -rf *.o *.lo *.so
|
||||
|
|
|
@ -1,4 +1,4 @@
|
|||
/* NeoStats - IRC Statistical Services Copyright (c) 1999-2001 NeoStats Group Inc.
|
||||
/* NeoStats - IRC Statistical Services Copyright (c) 1999-2002 NeoStats Group Inc.
|
||||
** Adam Rutter, Justin Hammond & 'Niggles' http://www.neostats.net
|
||||
*
|
||||
** Based from GeoStats 1.1.0 by Johnathan George net@lite.net
|
||||
|
|
|
@ -1,12 +1,12 @@
|
|||
/* NeoStats - IRC Statistical Services Copyright (c) 1999-2001 NeoStats Group Inc.
|
||||
/* NeoStats - IRC Statistical Services Copyright (c) 1999-2002 NeoStats Group Inc.
|
||||
** Adam Rutter, Justin Hammond & 'Niggles' http://www.neostats.net
|
||||
*
|
||||
** Based from GeoStats 1.1.0 by Johnathan George net@lite.net
|
||||
*
|
||||
** NeoStats Identification:
|
||||
** ID: statserv.c,
|
||||
** Version: 3.0
|
||||
** Date: 21/12/2001
|
||||
** Version: 3.1
|
||||
** Date: 08/03/2002
|
||||
*/
|
||||
|
||||
#include <stdio.h>
|
||||
|
@ -103,7 +103,7 @@ static config_option options[] = {
|
|||
|
||||
|
||||
int new_m_version(char *av, char *tmp) {
|
||||
segv_location = sstrdup("StatServ-new_m_version");
|
||||
strcpy(segv_location, "StatServ-new_m_version");
|
||||
snumeric_cmd(351, av, "Module StatServ Loaded, Version: %s %s %s",Statserv_Info[0].module_version,version_date,version_time);
|
||||
return 0;
|
||||
}
|
||||
|
@ -113,7 +113,7 @@ void _init() {
|
|||
User *u;
|
||||
hnode_t *node;
|
||||
hscan_t scan;
|
||||
segv_location = sstrdup("StatServ-_init");
|
||||
strcpy(segv_location, "StatServ-_init");
|
||||
|
||||
synced = 0;
|
||||
globops(me.name, "StatServ Module Loaded");
|
||||
|
@ -146,7 +146,7 @@ void _fini() {
|
|||
}
|
||||
|
||||
int s_new_server(Server *s) {
|
||||
segv_location = sstrdup("StatServ-s_new_server");
|
||||
strcpy(segv_location, "StatServ-s_new_server");
|
||||
|
||||
AddStats(s);
|
||||
IncreaseServers();
|
||||
|
@ -167,7 +167,7 @@ int s_new_server(Server *s) {
|
|||
static int s_del_server(Server *s) {
|
||||
SStats *ss;
|
||||
|
||||
segv_location = sstrdup("StatServ-s_del_server");
|
||||
strcpy(segv_location, "StatServ-s_del_server");
|
||||
|
||||
DecreaseServers();
|
||||
if (synced) notice(s_StatServ, "\2SERVER\2 %s has left the Network at %s", s->name, s->uplink);
|
||||
|
@ -187,7 +187,7 @@ static int s_user_kill(User *u) {
|
|||
log(" Server %s", u->server->name);
|
||||
#endif
|
||||
|
||||
segv_location = sstrdup("StatServ-s_user_kill");
|
||||
strcpy(segv_location, "StatServ-s_user_kill");
|
||||
|
||||
s=findstats(u->server->name);
|
||||
if (UserLevel(u) >= 40) {
|
||||
|
@ -220,7 +220,7 @@ static int s_user_modes(User *u) {
|
|||
char *modes;
|
||||
SStats *s;
|
||||
|
||||
segv_location = sstrdup("StatServ-s_user_modes");
|
||||
strcpy(segv_location, "StatServ-s_user_modes");
|
||||
|
||||
|
||||
if (!u) {
|
||||
|
@ -298,7 +298,7 @@ static int s_user_modes(User *u) {
|
|||
}
|
||||
|
||||
void re_init_bot() {
|
||||
segv_location = sstrdup("StatServ-re_init_bot");
|
||||
strcpy(segv_location, "StatServ-re_init_bot");
|
||||
|
||||
notice(s_Services, "Re-Initilizing %s Bot", s_StatServ);
|
||||
init_bot(s_StatServ, StatServ.user,StatServ.host,"/msg Statserv HELP", "+oikSdwgle", Statserv_Info[0].module_name);
|
||||
|
@ -325,7 +325,7 @@ static int s_del_user(User *u) {
|
|||
|
||||
|
||||
static int s_user_away(User *u) {
|
||||
segv_location = sstrdup("StatServ-s_user_away");
|
||||
strcpy(segv_location, "StatServ-s_user_away");
|
||||
|
||||
|
||||
if (u->is_away) {
|
||||
|
@ -346,7 +346,7 @@ static int s_new_user(User *u) {
|
|||
|
||||
if (u->server->name == me.name) return 0;
|
||||
|
||||
segv_location = sstrdup("StatServ-s_new_user");
|
||||
strcpy(segv_location, "StatServ-s_new_user");
|
||||
|
||||
s = findstats(u->server->name);
|
||||
|
||||
|
@ -381,7 +381,7 @@ if (u->server->name == me.name) return 0;
|
|||
int pong(Server *s) {
|
||||
SStats *ss;
|
||||
|
||||
segv_location = sstrdup("StatServ-pong");
|
||||
strcpy(segv_location, "StatServ-pong");
|
||||
|
||||
|
||||
/* we don't want negative pings! */
|
||||
|
@ -418,7 +418,7 @@ int pong(Server *s) {
|
|||
|
||||
int Online(Server *s) {
|
||||
|
||||
segv_location = sstrdup("StatServ-Online");
|
||||
strcpy(segv_location, "StatServ-Online");
|
||||
|
||||
|
||||
memcpy(StatServ.user, Servbot.user, 8);
|
||||
|
@ -449,7 +449,7 @@ int Online(Server *s) {
|
|||
|
||||
void ss_cb_Config(char *arg, int configtype) {
|
||||
|
||||
segv_location = sstrdup("StatServ-ss_cb_Config");
|
||||
strcpy(segv_location, "StatServ-ss_cb_Config");
|
||||
|
||||
|
||||
if (configtype == 0) {
|
||||
|
@ -472,7 +472,7 @@ int __Bot_Message(char *origin, char **av, int ac)
|
|||
{
|
||||
User *u;
|
||||
|
||||
segv_location = sstrdup("StatServ-__Bot_Message");
|
||||
strcpy(segv_location, "StatServ-__Bot_Message");
|
||||
|
||||
|
||||
u = finduser(origin);
|
||||
|
@ -603,7 +603,7 @@ void Is_Midnight() {
|
|||
struct tm *ltm = localtime(¤t);
|
||||
TLD *t;
|
||||
|
||||
segv_location = sstrdup("StatServ-Is_Midnight");
|
||||
strcpy(segv_location, "StatServ-Is_Midnight");
|
||||
|
||||
|
||||
if (ltm->tm_hour == 0) {
|
||||
|
@ -626,7 +626,7 @@ void Is_Midnight() {
|
|||
static void ss_tld_map(User *u) {
|
||||
TLD *t;
|
||||
|
||||
segv_location = sstrdup("StatServ-ss_tld_map");
|
||||
strcpy(segv_location, "StatServ-ss_tld_map");
|
||||
|
||||
|
||||
privmsg(u->nick, s_StatServ, "Top Level Domain Statistics:");
|
||||
|
@ -639,7 +639,7 @@ static void ss_tld_map(User *u) {
|
|||
|
||||
static void ss_version(User *u)
|
||||
{
|
||||
segv_location = sstrdup("StatServ-ss_version");
|
||||
strcpy(segv_location, "StatServ-ss_version");
|
||||
|
||||
privmsg(u->nick, s_StatServ, "\2StatServ Version Information\2");
|
||||
privmsg(u->nick, s_StatServ, "-------------------------------------");
|
||||
|
@ -649,7 +649,7 @@ static void ss_version(User *u)
|
|||
}
|
||||
static void ss_netstats(User *u) {
|
||||
|
||||
segv_location = sstrdup("StatServ-ss_netstats");
|
||||
strcpy(segv_location, "StatServ-ss_netstats");
|
||||
|
||||
privmsg(u->nick, s_StatServ, "Network Statistics:-----");
|
||||
privmsg(u->nick, s_StatServ, "Current Users: %ld", stats_network.users);
|
||||
|
@ -663,7 +663,7 @@ static void ss_netstats(User *u) {
|
|||
}
|
||||
static void ss_daily(User *u) {
|
||||
|
||||
segv_location = sstrdup("StatServ-ss_daily");
|
||||
strcpy(segv_location, "StatServ-ss_daily");
|
||||
|
||||
privmsg(u->nick, s_StatServ, "Daily Network Statistics:");
|
||||
privmsg(u->nick, s_StatServ, "Maximum Servers: %-2d %s", daily.servers, sftime(daily.t_servers));
|
||||
|
@ -677,7 +677,7 @@ static void ss_map(User *u) {
|
|||
SStats *ss;
|
||||
Server *s;
|
||||
|
||||
segv_location = sstrdup("StatServ-ss_map");
|
||||
strcpy(segv_location, "StatServ-ss_map");
|
||||
|
||||
|
||||
privmsg(u->nick, s_StatServ, "%-23s %-10s %-10s %-10s", "\2[NAME]\2", "\2[USERS/MAX]\2", "\2[OPERS/MAX]\2", "\2[LAG/MAX]\2");
|
||||
|
@ -693,7 +693,7 @@ static void ss_server(User *u, char *server) {
|
|||
SStats *ss;
|
||||
Server *s;
|
||||
|
||||
segv_location = sstrdup("StatServ-ss_server");
|
||||
strcpy(segv_location, "StatServ-ss_server");
|
||||
|
||||
|
||||
if (!server) {
|
||||
|
@ -740,7 +740,7 @@ static void ss_tld(User *u, char *tld)
|
|||
{
|
||||
TLD *tmp;
|
||||
|
||||
segv_location = sstrdup("StatServ-ss_tld");
|
||||
strcpy(segv_location, "StatServ-ss_tld");
|
||||
|
||||
|
||||
if (!tld) {
|
||||
|
@ -773,7 +773,7 @@ static void ss_operlist(User *origuser, char *flags, char *server)
|
|||
hscan_t scan;
|
||||
hnode_t *node;
|
||||
|
||||
segv_location = sstrdup("StatServ-ss_operlist");
|
||||
strcpy(segv_location, "StatServ-ss_operlist");
|
||||
|
||||
|
||||
if (!flags) {
|
||||
|
@ -827,7 +827,7 @@ static void ss_botlist(User *origuser)
|
|||
register User *u;
|
||||
hscan_t scan;
|
||||
hnode_t *node;
|
||||
segv_location = sstrdup("StatServ-ss_botlist");
|
||||
strcpy(segv_location, "StatServ-ss_botlist");
|
||||
|
||||
|
||||
privmsg(origuser->nick, s_StatServ, "On-Line Bots:");
|
||||
|
@ -852,7 +852,7 @@ static void ss_stats(User *u, char *cmd, char *arg, char *arg2)
|
|||
{
|
||||
SStats *st;
|
||||
|
||||
segv_location = sstrdup("StatServ-ss_stats");
|
||||
strcpy(segv_location, "StatServ-ss_stats");
|
||||
|
||||
|
||||
if (UserLevel(u) < 190) {
|
||||
|
@ -941,7 +941,7 @@ static void ss_stats(User *u, char *cmd, char *arg, char *arg2)
|
|||
static void ss_reset(User *u)
|
||||
{
|
||||
|
||||
segv_location = sstrdup("StatServ-ss_reset");
|
||||
strcpy(segv_location, "StatServ-ss_reset");
|
||||
|
||||
|
||||
if (UserLevel(u) < 190) {
|
||||
|
@ -960,7 +960,7 @@ static void ss_reset(User *u)
|
|||
static void ss_JOIN(User *u, char *chan)
|
||||
{
|
||||
|
||||
segv_location = sstrdup("StatServ-ss_JOIN");
|
||||
strcpy(segv_location, "StatServ-ss_JOIN");
|
||||
|
||||
|
||||
if (UserLevel(u) < 190) {
|
||||
|
@ -985,7 +985,7 @@ void DelTLD(User *u) {
|
|||
TLD *t = NULL;
|
||||
char *m;
|
||||
|
||||
segv_location = sstrdup("StatServ-DelTLD");
|
||||
strcpy(segv_location, "StatServ-DelTLD");
|
||||
|
||||
|
||||
m = strrchr(u->hostname, '.');
|
||||
|
@ -1014,7 +1014,7 @@ TLD *findtld(char *tld)
|
|||
{
|
||||
TLD *t;
|
||||
|
||||
segv_location = sstrdup("StatServ-findtld");
|
||||
strcpy(segv_location, "StatServ-findtld");
|
||||
|
||||
|
||||
for (t = tldhead; t; t = t->next) {
|
||||
|
@ -1030,7 +1030,7 @@ TLD *AddTLD(User *u)
|
|||
TLD *t = NULL;
|
||||
char *m;
|
||||
|
||||
segv_location = sstrdup("StatServ-AddTLD");
|
||||
strcpy(segv_location, "StatServ-AddTLD");
|
||||
|
||||
m = strrchr(u->hostname, '.');
|
||||
|
||||
|
@ -1064,7 +1064,7 @@ void LoadTLD()
|
|||
char *tmp = NULL, *tmp2 = NULL;
|
||||
TLD *t;
|
||||
|
||||
segv_location = sstrdup("StatServ-LoadTLD");
|
||||
strcpy(segv_location, "StatServ-LoadTLD");
|
||||
|
||||
|
||||
if ((fp = fopen("data/tlds.nfo", "r")) == NULL) {
|
||||
|
@ -1103,7 +1103,7 @@ void init_tld()
|
|||
{
|
||||
TLD *t;
|
||||
|
||||
segv_location = sstrdup("StatServ-init_tld");
|
||||
strcpy(segv_location, "StatServ-init_tld");
|
||||
|
||||
|
||||
for (t = tldhead; t; t = t->next) {
|
||||
|
@ -1119,7 +1119,7 @@ static SStats *new_stats(const char *name)
|
|||
log("new_stats(%s)", name);
|
||||
#endif
|
||||
|
||||
segv_location = sstrdup("StatServ-SStats");
|
||||
strcpy(segv_location, "StatServ-SStats");
|
||||
|
||||
|
||||
if (!s) {
|
||||
|
@ -1163,7 +1163,7 @@ void AddStats(Server *s)
|
|||
{
|
||||
SStats *st = findstats(s->name);
|
||||
log("add stats 1");
|
||||
segv_location = sstrdup("StatServ-AddStats");
|
||||
strcpy(segv_location, "StatServ-AddStats");
|
||||
|
||||
|
||||
#ifdef DEBUG
|
||||
|
@ -1183,7 +1183,7 @@ SStats *findstats(char *name)
|
|||
#ifdef DEBUG
|
||||
log("findstats(%s)", name);
|
||||
#endif
|
||||
segv_location = sstrdup("StatServ-findstats");
|
||||
strcpy(segv_location, "StatServ-findstats");
|
||||
|
||||
for (t = Shead; t; t = t->next) {
|
||||
|
||||
|
@ -1201,7 +1201,7 @@ void SaveStats()
|
|||
FILE *fp = fopen("data/stats.db", "w");
|
||||
SStats *s;
|
||||
|
||||
segv_location = sstrdup("StatServ-SaveStats");
|
||||
strcpy(segv_location, "StatServ-SaveStats");
|
||||
|
||||
|
||||
if (!fp) {
|
||||
|
@ -1237,7 +1237,7 @@ void LoadStats()
|
|||
*maxopers, *t_maxopers, *lastseen, *starttime,
|
||||
*operkills, *serverkills, *totusers;
|
||||
|
||||
segv_location = sstrdup("StatServ-LoadStats");
|
||||
strcpy(segv_location, "StatServ-LoadStats");
|
||||
|
||||
|
||||
if (fp) {
|
||||
|
@ -1318,7 +1318,7 @@ static void ss_htmlsettings(User *u, char *cmd, char *m) {
|
|||
FILE *ht;
|
||||
|
||||
/* Approximate Segfault Location */
|
||||
segv_location = sstrdup("ss_htmlsettings");
|
||||
strcpy(segv_location, "ss_htmlsettings");
|
||||
|
||||
|
||||
if ((!strcasecmp(cmd, "ON")) && (m != NULL)) {
|
||||
|
@ -1361,7 +1361,7 @@ void ss_chkhtml()
|
|||
FILE *fp = fopen("data/html.conf", "r");
|
||||
char buf[BUFSIZE];
|
||||
char *tmp;
|
||||
segv_location = sstrdup("ss_html_conf");
|
||||
strcpy(segv_location, "ss_html_conf");
|
||||
|
||||
if (fp) {
|
||||
while (fgets(buf, BUFSIZE, fp)) {
|
||||
|
@ -1395,7 +1395,7 @@ void ss_html()
|
|||
FILE *op;
|
||||
|
||||
/* Approximate Segfault Location */
|
||||
segv_location = sstrdup("ss_html_output");
|
||||
strcpy(segv_location, "ss_html_output");
|
||||
|
||||
/* Save Path to HTML File into htmdat var */
|
||||
fp = fopen("data/html.path", "r");
|
||||
|
@ -1490,7 +1490,7 @@ void TimerWeb()
|
|||
{
|
||||
/* Run HTMLSTATS Routine */
|
||||
|
||||
segv_location = sstrdup("StatServ-TimerWeb");
|
||||
strcpy(segv_location, "StatServ-TimerWeb");
|
||||
|
||||
|
||||
ss_chkhtml();
|
||||
|
@ -1502,7 +1502,7 @@ return;
|
|||
static void ss_notices(User *u) {
|
||||
|
||||
/* Approximate Segfault Location */
|
||||
segv_location = sstrdup("ss_notices");
|
||||
strcpy(segv_location, "ss_notices");
|
||||
|
||||
if (!notify_msgs) {
|
||||
notify_msgs = 1;
|
||||
|
|
3
users.c
3
users.c
|
@ -5,7 +5,7 @@
|
|||
** Based from GeoStats 1.1.0 by Johnathan George net@lite.net
|
||||
*
|
||||
** NetStats CVS Identification
|
||||
** $Id: users.c,v 1.23 2002/03/11 08:02:40 fishwaldo Exp $
|
||||
** $Id: users.c,v 1.24 2002/03/12 07:56:02 fishwaldo Exp $
|
||||
*/
|
||||
|
||||
#include <fnmatch.h>
|
||||
|
@ -136,6 +136,7 @@ void Change_User(User *u, const char *newnick)
|
|||
hash_delete(uh, un);
|
||||
strcpy(u->nick, newnick);
|
||||
hash_insert(uh, un, u->nick);
|
||||
|
||||
}
|
||||
void sendcoders(char *message,...)
|
||||
{
|
||||
|
|
Reference in a new issue