Wahhhhhhhhhhhh bwahahaha. Mass commit to tidy up tons of messy include lists

git-svn-id: http://svn.inspircd.org/repository/trunk/inspircd@5080 e03df62e-2008-0410-955e-edbf42e46eb7
This commit is contained in:
brain 2006-08-30 09:03:03 +00:00
parent 88315e8f8f
commit d54fd9b1e6
102 changed files with 283 additions and 731 deletions

View File

@ -49,7 +49,6 @@ install: all
@-install -v -m 0700 src/libIRCDhash.so $(LIBPATH)
@-install -v -m 0700 src/libIRCDhelper.so $(LIBPATH)
@-install -v -m 0700 src/libIRCDinspsocket.so $(LIBPATH)
@-install -v -m 0700 src/libIRCDmessage.so $(LIBPATH)
@-install -v -m 0700 src/libIRCDmode.so $(LIBPATH)
@-install -v -m 0700 src/libIRCDmodules.so $(LIBPATH)
@-install -v -m 0700 src/libIRCDsocket.so $(LIBPATH)

21
configure vendored
View File

@ -1424,20 +1424,20 @@ elsif (($has_epoll) && ($config{USE_EPOLL} eq "y")) {
if ($config{OSNAME} =~ /CYGWIN/) {
print FH <<EOM;
all: timer.o aes.o command_parse.o cull_list.o userprocess.o socketengine.o socket.o hashcomp.o channels.o mode.o xline.o inspstring.o dns.o base.o configreader.o inspsocket.o message.o $cmdobjs commands.o dynamic.o users.o modules.o wildcard.o helperfuncs.o snomasks.o inspircd.exe
all: timer.o aes.o command_parse.o cull_list.o userprocess.o socketengine.o socket.o hashcomp.o channels.o mode.o xline.o inspstring.o dns.o base.o configreader.o inspsocket.o $cmdobjs commands.o dynamic.o users.o modules.o wildcard.o helperfuncs.o snomasks.o inspircd.exe
inspircd.exe: inspircd.dll.a
\$(CC) -o \$@ \$^
inspircd.dll inspircd.dll.a: inspircd.o channels.o mode.o xline.o inspstring.o dns.o base.o configreader.o inspsocket.o message.o $cmdobjs commands.o dynamic.o users.o modules.o wildcard.o helperfuncs.o hashcomp.o socket.o socketengine.o userprocess.o cull_list.o command_parse.o aes.o timer.o snomasks.o
inspircd.dll inspircd.dll.a: inspircd.o channels.o mode.o xline.o inspstring.o dns.o base.o configreader.o inspsocket.o $cmdobjs commands.o dynamic.o users.o modules.o wildcard.o helperfuncs.o hashcomp.o socket.o socketengine.o userprocess.o cull_list.o command_parse.o aes.o timer.o snomasks.o
\$(CC) -shared -Wl,--out-implib=inspircd.dll.a -o inspircd.dll \$^
EOM
} else {
print FH <<EOM;
all: timer.o aes.o command_parse.o cull_list.o userprocess.o socketengine.o socket.o hashcomp.o channels.o mode.o xline.o inspstring.o dns.o base.o configreader.o inspsocket.o message.o $cmdobjs commands.o dynamic.o users.o modules.o wildcard.o helperfuncs.o snomasks.o \$(MODULES) inspircd.exe
all: timer.o aes.o command_parse.o cull_list.o userprocess.o socketengine.o socket.o hashcomp.o channels.o mode.o xline.o inspstring.o dns.o base.o configreader.o inspsocket.o $cmdobjs commands.o dynamic.o users.o modules.o wildcard.o helperfuncs.o snomasks.o \$(MODULES) inspircd.exe
inspircd.exe: inspircd.cpp ../include/base.h ../include/channels.h ../include/inspircd.h ../include/channels.h ../include/globals.h ../include/inspircd_config.h ../include/base.h
\$(CC) -I../include \$(FLAGS) inspircd.cpp -o inspircd.exe \$(LDLIBS) channels.o mode.o xline.o inspstring.o dns.o base.o inspsocket.o configreader.o message.o $cmdobjs commands.o dynamic.o users.o modules.o wildcard.o helperfuncs.o hashcomp.o socket.o socketengine.o userprocess.o cull_list.o command_parse.o aes.o timer.o snomasks.o modes/modeclasses.a \$(MODULES)
\$(CC) -I../include \$(FLAGS) inspircd.cpp -o inspircd.exe \$(LDLIBS) channels.o mode.o xline.o inspstring.o dns.o base.o inspsocket.o configreader.o $cmdobjs commands.o dynamic.o users.o modules.o wildcard.o helperfuncs.o hashcomp.o socket.o socketengine.o userprocess.o cull_list.o command_parse.o aes.o timer.o snomasks.o modes/modeclasses.a \$(MODULES)
EOM
}
@ -1486,9 +1486,6 @@ base.o: base.cpp ../include/base.h ../include/globals.h ../include/inspircd_conf
configreader.o: configreader.cpp ../include/base.h ../include/configreader.h ../include/inspircd.h ../include/channels.h ../include/users.h ../include/globals.h ../include/inspircd_config.h
\$(CC) -pipe -I../include \$(FLAGS) -export-dynamic -c configreader.cpp
message.o: message.cpp ../include/base.h ../include/message.h ../include/inspircd.h ../include/channels.h ../include/users.h ../include/globals.h ../include/inspircd_config.h
\$(CC) -pipe -I../include \$(FLAGS) -export-dynamic -c message.cpp
commands.o: commands.cpp ../include/base.h ../include/commands.h ../include/inspircd.h ../include/channels.h ../include/users.h ../include/globals.h ../include/inspircd_config.h $srcobjs
\$(CC) -pipe -I../include \$(FLAGS) -export-dynamic -c commands.cpp $cmdobjs
@ -1574,10 +1571,10 @@ CXXFLAGS = -I../include \${FLAGS}
CPPFILES = \$(shell /bin/ls -l modes/ | grep '\\.cpp' | sed 's/^.* //' | grep -v svn)
RELCPPFILES = \$(shell /bin/ls -l modes/ | grep '\\.cpp' | sed 's/^.* /modes\\//' | grep -v svn)
all: libIRCDtimer.so libIRCDaes.so libIRCDcull_list.so libIRCDuserprocess.so libIRCDsocketengine.so libIRCDsocket.so libIRCDhash.so libIRCDchannels.so libIRCDmode.so libIRCDxline.so libIRCDstring.so libIRCDasyncdns.so libIRCDbase.so libIRCDconfigreader.so libIRCDinspsocket.so libIRCDmessage.so $cmdobjs libIRCDcommands.so libIRCDdynamic.so libIRCDusers.so libIRCDmodules.so libIRCDwildcard.so libIRCDhelper.so libIRCDcommand_parse.so libIRCDsnomasks.so inspircd
all: libIRCDtimer.so libIRCDaes.so libIRCDcull_list.so libIRCDuserprocess.so libIRCDsocketengine.so libIRCDsocket.so libIRCDhash.so libIRCDchannels.so libIRCDmode.so libIRCDxline.so libIRCDstring.so libIRCDasyncdns.so libIRCDbase.so libIRCDconfigreader.so libIRCDinspsocket.so $cmdobjs libIRCDcommands.so libIRCDdynamic.so libIRCDusers.so libIRCDmodules.so libIRCDwildcard.so libIRCDhelper.so libIRCDcommand_parse.so libIRCDsnomasks.so inspircd
inspircd: inspircd.cpp ../include/base.h ../include/channels.h ../include/inspircd.h ../include/channels.h ../include/globals.h ../include/inspircd_config.h ../include/socket.h libIRCDtimer.so libIRCDaes.so libIRCDcull_list.so libIRCDuserprocess.so libIRCDsocketengine.so libIRCDsocket.so libIRCDhash.so libIRCDchannels.so libIRCDmode.so libIRCDxline.so libIRCDstring.so libIRCDasyncdns.so libIRCDbase.so libIRCDconfigreader.so libIRCDinspsocket.so libIRCDmessage.so $cmdobjs libIRCDsnomasks.so libIRCDcommands.so libIRCDdynamic.so libIRCDusers.so libIRCDmodules.so libIRCDwildcard.so libIRCDhelper.so libIRCDcommand_parse.so
\$(CC) -I../include $extra -Wl,--rpath -Wl,/usr/local/lib -Wl,--rpath -Wl,$config{LIBRARY_DIR} \$(FLAGS) -rdynamic -L. inspircd.cpp -o inspircd \$(LDLIBS) libIRCDchannels.so libIRCDmode.so libIRCDxline.so libIRCDstring.so libIRCDasyncdns.so libIRCDbase.so libIRCDconfigreader.so libIRCDinspsocket.so libIRCDmessage.so libIRCDcommands.so libIRCDdynamic.so libIRCDusers.so libIRCDmodules.so libIRCDwildcard.so libIRCDhelper.so libIRCDhash.so libIRCDsocket.so libIRCDsocketengine.so libIRCDuserprocess.so libIRCDcull_list.so libIRCDcommand_parse.so libIRCDaes.so libIRCDtimer.so libIRCDsnomasks.so
inspircd: inspircd.cpp ../include/base.h ../include/channels.h ../include/inspircd.h ../include/channels.h ../include/globals.h ../include/inspircd_config.h ../include/socket.h libIRCDtimer.so libIRCDaes.so libIRCDcull_list.so libIRCDuserprocess.so libIRCDsocketengine.so libIRCDsocket.so libIRCDhash.so libIRCDchannels.so libIRCDmode.so libIRCDxline.so libIRCDstring.so libIRCDasyncdns.so libIRCDbase.so libIRCDconfigreader.so libIRCDinspsocket.so $cmdobjs libIRCDsnomasks.so libIRCDcommands.so libIRCDdynamic.so libIRCDusers.so libIRCDmodules.so libIRCDwildcard.so libIRCDhelper.so libIRCDcommand_parse.so
\$(CC) -I../include $extra -Wl,--rpath -Wl,/usr/local/lib -Wl,--rpath -Wl,$config{LIBRARY_DIR} \$(FLAGS) -rdynamic -L. inspircd.cpp -o inspircd \$(LDLIBS) libIRCDchannels.so libIRCDmode.so libIRCDxline.so libIRCDstring.so libIRCDasyncdns.so libIRCDbase.so libIRCDconfigreader.so libIRCDinspsocket.so libIRCDcommands.so libIRCDdynamic.so libIRCDusers.so libIRCDmodules.so libIRCDwildcard.so libIRCDhelper.so libIRCDhash.so libIRCDsocket.so libIRCDsocketengine.so libIRCDuserprocess.so libIRCDcull_list.so libIRCDcommand_parse.so libIRCDaes.so libIRCDtimer.so libIRCDsnomasks.so
libIRCDsocketengine.so: $se.cpp socketengine.cpp ../include/base.h ../include/hashcomp.h ../include/globals.h ../include/inspircd_config.h ../include/$se.h
\$(CC) -pipe -I../include \$(FLAGS) -export-dynamic -c socketengine.cpp $se.cpp
@ -1636,10 +1633,6 @@ libIRCDconfigreader.so: configreader.cpp ../include/base.h ../include/configread
\$(CC) -pipe -I../include \$(FLAGS) -export-dynamic -c configreader.cpp
\$(CC) -Wl,--rpath -Wl,$config{LIBRARY_DIR} -shared -o libIRCDconfigreader.so configreader.o
libIRCDmessage.so: message.cpp ../include/base.h ../include/message.h ../include/inspircd.h ../include/channels.h ../include/users.h ../include/globals.h ../include/inspircd_config.h
\$(CC) -pipe -I../include \$(FLAGS) -export-dynamic -c message.cpp
\$(CC) -Wl,--rpath -Wl,$config{LIBRARY_DIR} -shared -o libIRCDmessage.so message.o
libIRCDcommands.so: commands.cpp ../include/base.h ../include/commands.h ../include/inspircd.h ../include/channels.h ../include/users.h ../include/globals.h ../include/inspircd_config.h $srcobjs
\$(CC) -pipe -I../include \$(FLAGS) -export-dynamic -c commands.cpp
\$(CC) -Wl,--rpath -Wl,$config{LIBRARY_DIR} -shared -o libIRCDcommands.so commands.o $cmdobjs

View File

@ -14,81 +14,3 @@
* ---------------------------------------------------
*/
#ifndef __COMMANDS_H
#define __COMMANDS_H
// include the common header files
#include <typeinfo>
#include <iostream>
#include <string>
#include <deque>
#include <sstream>
#include <vector>
#include "users.h"
#include "channels.h"
#include "modules.h"
/* XXX Serious WTFness XXX
*
* Well, unless someone invents a wildcard or
* regexp #include, and makes it a standard,
* we're stuck with this way of including all
* the commands.
*/
#include "commands/cmd_admin.h"
#include "commands/cmd_away.h"
#include "commands/cmd_commands.h"
#include "commands/cmd_connect.h"
#include "commands/cmd_die.h"
#include "commands/cmd_eline.h"
#include "commands/cmd_gline.h"
#include "commands/cmd_info.h"
#include "commands/cmd_invite.h"
#include "commands/cmd_ison.h"
#include "commands/cmd_join.h"
#include "commands/cmd_kick.h"
#include "commands/cmd_kill.h"
#include "commands/cmd_kline.h"
#include "commands/cmd_links.h"
#include "commands/cmd_list.h"
#include "commands/cmd_loadmodule.h"
#include "commands/cmd_lusers.h"
#include "commands/cmd_map.h"
#include "commands/cmd_modules.h"
#include "commands/cmd_motd.h"
#include "commands/cmd_names.h"
#include "commands/cmd_nick.h"
#include "commands/cmd_notice.h"
#include "commands/cmd_oper.h"
#include "commands/cmd_part.h"
#include "commands/cmd_pass.h"
#include "commands/cmd_ping.h"
#include "commands/cmd_pong.h"
#include "commands/cmd_privmsg.h"
#include "commands/cmd_qline.h"
#include "commands/cmd_quit.h"
#include "commands/cmd_rehash.h"
#include "commands/cmd_restart.h"
#include "commands/cmd_rules.h"
#include "commands/cmd_server.h"
#include "commands/cmd_squit.h"
#include "commands/cmd_stats.h"
#include "commands/cmd_summon.h"
#include "commands/cmd_time.h"
#include "commands/cmd_topic.h"
#include "commands/cmd_trace.h"
#include "commands/cmd_unloadmodule.h"
#include "commands/cmd_user.h"
#include "commands/cmd_userhost.h"
#include "commands/cmd_users.h"
#include "commands/cmd_version.h"
#include "commands/cmd_wallops.h"
#include "commands/cmd_who.h"
#include "commands/cmd_whois.h"
#include "commands/cmd_whowas.h"
#include "commands/cmd_zline.h"
#endif

View File

@ -19,12 +19,9 @@
// include the common header files
#include <typeinfo>
#include <iostream>
#include <string>
#include <deque>
#include <sstream>
#include <vector>
#include "inspircd.h"
#include "users.h"
#include "channels.h"

View File

@ -19,12 +19,9 @@
// include the common header files
#include <typeinfo>
#include <iostream>
#include <string>
#include <deque>
#include <sstream>
#include <vector>
#include "inspircd.h"
#include "users.h"
#include "channels.h"

View File

@ -19,12 +19,9 @@
// include the common header files
#include <typeinfo>
#include <iostream>
#include <string>
#include <deque>
#include <sstream>
#include <vector>
#include "inspircd.h"
#include "users.h"
#include "channels.h"

View File

@ -19,12 +19,9 @@
// include the common header files
#include <typeinfo>
#include <iostream>
#include <string>
#include <deque>
#include <sstream>
#include <vector>
#include "inspircd.h"
#include "users.h"
#include "channels.h"

View File

@ -19,12 +19,9 @@
// include the common header files
#include <typeinfo>
#include <iostream>
#include <string>
#include <deque>
#include <sstream>
#include <vector>
#include "inspircd.h"
#include "users.h"
#include "channels.h"

View File

@ -19,12 +19,9 @@
// include the common header files
#include <typeinfo>
#include <iostream>
#include <string>
#include <deque>
#include <sstream>
#include <vector>
#include "inspircd.h"
#include "users.h"
#include "channels.h"

View File

@ -18,13 +18,10 @@
#define __CMD_USERS_H__
// include the common header files
#include <typeinfo>
#include <iostream>
//
#include <string>
#include <deque>
#include <sstream>
#include <vector>
#include "inspircd.h"
#include "users.h"
#include "channels.h"

View File

@ -17,12 +17,7 @@
#include "inspircd_config.h"
#include "base.h"
#include <time.h>
#include <map>
#include <deque>
#include <string>
#include "inspircd.h"
#include "modules.h"
const int bitfields[] = {1,2,4,8,16,32,64,128};
const int inverted_bitfields[] = {~1,~2,~4,~8,~16,~32,~64,~128};

View File

@ -16,27 +16,13 @@
using namespace std;
#include <string>
#include <map>
#include <sstream>
#include <vector>
#include <deque>
#include <stdarg.h>
#include "configreader.h"
#include "inspircd.h"
#include "hash_map.h"
#include "users.h"
#include "ctables.h"
#include "globals.h"
#include "modules.h"
#include "dynamic.h"
#include "commands.h"
#include "wildcard.h"
#include "mode.h"
#include "xline.h"
#include "inspstring.h"
#include "typedefs.h"
chanrec::chanrec(InspIRCd* Instance) : ServerInstance(Instance)
{

View File

@ -16,12 +16,8 @@
#include "configreader.h"
#include "users.h"
#include "commands.h"
#include "commands/cmd_admin.h"
void cmd_admin::Handle (const char** parameters, int pcnt, userrec *user)
{
user->WriteServ("256 %s :Administrative info for %s",user->nick,ServerInstance->Config->ServerName);

View File

@ -14,17 +14,11 @@
* ---------------------------------------------------
*/
#include <vector>
#include "inspircd_config.h"
#include "configreader.h"
#include "users.h"
#include "modules.h"
#include "commands.h"
#include "commands/cmd_away.h"
void cmd_away::Handle (const char** parameters, int pcnt, userrec *user)
{
if ((pcnt) && (*parameters[0]))

View File

@ -16,12 +16,8 @@
#include "inspircd.h"
#include "users.h"
#include "commands.h"
#include "commands/cmd_commands.h"
void cmd_commands::Handle (const char** parameters, int pcnt, userrec *user)
{
for (nspace::hash_map<std::string,command_t*>::iterator i = ServerInstance->Parser->cmdlist.begin(); i != ServerInstance->Parser->cmdlist.end(); i++)

View File

@ -15,8 +15,6 @@
*/
#include "users.h"
#include "commands.h"
#include "commands/cmd_connect.h"
/*

View File

@ -14,17 +14,10 @@
* ---------------------------------------------------
*/
#include <unistd.h>
#include <string>
#include <vector>
#include "configreader.h"
#include "users.h"
#include "commands.h"
#include "commands/cmd_die.h"
void cmd_die::Handle (const char** parameters, int pcnt, userrec *user)
{
if (!strcmp(parameters[0],ServerInstance->Config->diepass))

View File

@ -14,18 +14,12 @@
* ---------------------------------------------------
*/
#include <string>
#include <vector>
#include "configreader.h"
#include "users.h"
#include "modules.h"
#include "commands.h"
#include "xline.h"
#include "commands/cmd_eline.h"
void cmd_eline::Handle (const char** parameters, int pcnt, userrec *user)
{
if (pcnt >= 3)

View File

@ -14,17 +14,11 @@
* ---------------------------------------------------
*/
#include <string>
#include <vector>
#include "configreader.h"
#include "users.h"
#include "modules.h"
#include "commands.h"
#include "xline.h"
#include "commands/cmd_eline.h"
#include "commands/cmd_gline.h"
void cmd_gline::Handle (const char** parameters, int pcnt, userrec *user)
{

View File

@ -17,12 +17,8 @@
#include "configreader.h"
#include "users.h"
#include "modules.h"
#include "commands.h"
#include "commands/cmd_info.h"
void cmd_info::Handle (const char** parameters, int pcnt, userrec *user)
{
user->WriteServ( "371 %s :. o O (The Inspire Internet Relay Chat Server) O o .", user->nick);

View File

@ -14,16 +14,11 @@
* ---------------------------------------------------
*/
#include <vector>
#include "configreader.h"
#include "users.h"
#include "modules.h"
#include "commands.h"
#include "commands/cmd_invite.h"
void cmd_invite::Handle (const char** parameters, int pcnt, userrec *user)
{
int MOD_RESULT = 0;

View File

@ -14,16 +14,10 @@
* ---------------------------------------------------
*/
#include "inspircd_config.h"
#include "ctables.h"
#include "users.h"
#include "commands.h"
#include "inspircd.h"
#include "commands/cmd_ison.h"
void cmd_ison::Handle (const char** parameters, int pcnt, userrec *user)
{
char retbuf[MAXBUF];

View File

@ -16,12 +16,8 @@
#include "inspircd.h"
#include "users.h"
#include "commands.h"
#include "commands/cmd_join.h"
void cmd_join::Handle (const char** parameters, int pcnt, userrec *user)
{
if (pcnt > 1)

View File

@ -14,15 +14,10 @@
* ---------------------------------------------------
*/
#include "inspircd_config.h"
#include "users.h"
#include "commands.h"
#include "inspircd.h"
#include "commands/cmd_kick.h"
void cmd_kick::Handle (const char** parameters, int pcnt, userrec *user)
{
char reason[MAXKICK];

View File

@ -14,18 +14,11 @@
* ---------------------------------------------------
*/
#include <vector>
#include "inspircd_config.h"
#include "hash_map.h"
#include "configreader.h"
#include "users.h"
#include "modules.h"
#include "commands.h"
#include "commands/cmd_kill.h"
void cmd_kill::Handle (const char** parameters, int pcnt, userrec *user)
{
userrec *u = ServerInstance->FindNick(parameters[0]);

View File

@ -14,21 +14,10 @@
* ---------------------------------------------------
*/
#include <time.h>
#include <string>
#include <map>
#include <sstream>
#include <vector>
#include <deque>
#include "inspircd_config.h"
#include "configreader.h"
#include "hash_map.h"
#include "users.h"
#include "modules.h"
#include "commands.h"
#include "xline.h"
#include "commands/cmd_kline.h"
void cmd_kline::Handle (const char** parameters, int pcnt, userrec *user)

View File

@ -14,16 +14,11 @@
* ---------------------------------------------------
*/
#include "inspircd_config.h"
#include "configreader.h"
#include "users.h"
#include "modules.h"
#include "commands.h"
#include "commands/cmd_links.h"
void cmd_links::Handle (const char** parameters, int pcnt, userrec *user)
{
user->WriteServ("364 %s %s %s :0 %s",user->nick,ServerInstance->Config->ServerName,ServerInstance->Config->ServerName,ServerInstance->Config->ServerDesc);

View File

@ -15,8 +15,6 @@
*/
#include "users.h"
#include "ctables.h"
#include "commands.h"
#include "inspircd.h"
#include "commands/cmd_list.h"
#include "wildcard.h"

View File

@ -16,12 +16,8 @@
#include "inspircd.h"
#include "users.h"
#include "commands.h"
#include "commands/cmd_loadmodule.h"
void cmd_loadmodule::Handle (const char** parameters, int pcnt, userrec *user)
{
if (ServerInstance->LoadModule(parameters[0]))

View File

@ -15,13 +15,9 @@
*/
#include "users.h"
#include "commands.h"
#include "inspircd.h"
#include "commands/cmd_lusers.h"
void cmd_lusers::Handle (const char** parameters, int pcnt, userrec *user)
{
// this lusers command shows one server at all times because

View File

@ -14,15 +14,10 @@
* ---------------------------------------------------
*/
#include "inspircd_config.h"
#include "configreader.h"
#include "users.h"
#include "commands.h"
#include "commands/cmd_map.h"
void cmd_map::Handle (const char** parameters, int pcnt, userrec *user)
{
// as with /LUSERS this does nothing without a linking

View File

@ -14,25 +14,13 @@
* ---------------------------------------------------
*/
#include <time.h>
#include <string>
#include <map>
#include <sstream>
#include <vector>
#include <deque>
#include "inspircd_config.h"
#include "inspircd.h"
#include "configreader.h"
#include "hash_map.h"
#include "users.h"
#include "modules.h"
#include "commands.h"
#include "wildcard.h"
#include "commands/cmd_modules.h"
char* itab[] = {
"OnUserConnect", "OnUserQuit", "OnUserDisconnect", "OnUserJoin", "OnUserPart", "OnRehash", "OnServerRaw",
"OnExtendedMode", "OnUserPreJoin", "OnUserPreKick", "OnUserKick", "OnOper", "OnInfo", "OnWhois", "OnUserPreInvite",

View File

@ -15,8 +15,6 @@
*/
#include "users.h"
#include "commands.h"
#include "commands/cmd_motd.h"
void cmd_motd::Handle (const char** parameters, int pcnt, userrec *user)

View File

@ -16,12 +16,8 @@
#include "inspircd.h"
#include "users.h"
#include "commands.h"
#include "commands/cmd_names.h"
void cmd_names::Handle (const char** parameters, int pcnt, userrec *user)
{
chanrec* c;

View File

@ -14,19 +14,11 @@
* ---------------------------------------------------
*/
#include <string>
#include <vector>
#include "inspircd_config.h"
#include "configreader.h"
#include "hash_map.h"
#include "users.h"
#include "modules.h"
#include "commands.h"
#include "xline.h"
#include "dns.h"
#include "inspircd.h"
#include "hashcomp.h"
#include "xline.h"
#include "commands/cmd_nick.h"
void cmd_nick::Handle (const char** parameters, int pcnt, userrec *user)

View File

@ -14,18 +14,10 @@
* ---------------------------------------------------
*/
#include <map>
#include <sstream>
#include <vector>
#include <deque>
#include "configreader.h"
#include "hash_map.h"
#include "users.h"
#include "modules.h"
#include "wildcard.h"
#include "commands.h"
#include "hashcomp.h"
#include "commands/cmd_notice.h"
void cmd_notice::Handle (const char** parameters, int pcnt, userrec *user)

View File

@ -14,24 +14,11 @@
* ---------------------------------------------------
*/
#include <string>
#include <sstream>
#include <vector>
#include "inspircd_config.h"
#include "configreader.h"
#include "typedefs.h"
#include "users.h"
#include "globals.h"
#include "modules.h"
#include "dynamic.h"
#include "wildcard.h"
#include "commands.h"
#include "mode.h"
#include "xline.h"
#include "inspstring.h"
#include "hashcomp.h"
#include "socketengine.h"
#include "command_parse.h"
#include "commands/cmd_oper.h"
bool OneOfMatches(const char* host, const char* ip, const char* hostlist)

View File

@ -16,12 +16,8 @@
#include "inspircd.h"
#include "users.h"
#include "commands.h"
#include "commands/cmd_part.h"
void cmd_part::Handle (const char** parameters, int pcnt, userrec *user)
{
if (ServerInstance->Parser->LoopCall(user, this, parameters, pcnt, 0))

View File

@ -15,8 +15,6 @@
*/
#include "users.h"
#include "commands.h"
#include "commands/cmd_pass.h"
void cmd_pass::Handle (const char** parameters, int pcnt, userrec *user)

View File

@ -16,13 +16,8 @@
#include "configreader.h"
#include "users.h"
#include "commands.h"
#include "commands/cmd_ping.h"
void cmd_ping::Handle (const char** parameters, int pcnt, userrec *user)
{
user->WriteServ("PONG %s :%s",ServerInstance->Config->ServerName,parameters[0]);

View File

@ -15,10 +15,8 @@
*/
#include "users.h"
#include "commands.h"
#include "commands/cmd_pong.h"
void cmd_pong::Handle (const char** parameters, int pcnt, userrec *user)
{
// set the user as alive so they survive to next ping

View File

@ -14,15 +14,11 @@
* ---------------------------------------------------
*/
#include <string>
#include "inspircd_config.h"
#include "inspircd.h"
#include "configreader.h"
#include "users.h"
#include "modules.h"
#include "wildcard.h"
#include "commands.h"
#include "commands/cmd_privmsg.h"
void cmd_privmsg::Handle (const char** parameters, int pcnt, userrec *user)

View File

@ -14,13 +14,10 @@
* ---------------------------------------------------
*/
#include "inspircd_config.h"
#include "configreader.h"
#include "users.h"
#include "modules.h"
#include "commands.h"
#include "xline.h"
#include "commands/cmd_qline.h"
void cmd_qline::Handle (const char** parameters, int pcnt, userrec *user)

View File

@ -14,24 +14,10 @@
* ---------------------------------------------------
*/
#include "inspircd_config.h"
#include "inspircd.h"
#include "configreader.h"
#include <string>
#include <vector>
#include "users.h"
#include "ctables.h"
#include "globals.h"
#include "modules.h"
#include "dynamic.h"
#include "wildcard.h"
#include "commands.h"
#include "mode.h"
#include "xline.h"
#include "inspstring.h"
#include "hashcomp.h"
#include "socketengine.h"
#include "commands/cmd_quit.h"
void cmd_quit::Handle (const char** parameters, int pcnt, userrec *user)

View File

@ -14,15 +14,11 @@
* ---------------------------------------------------
*/
#include "inspircd_config.h"
#include "configreader.h"
#include "users.h"
#include "modules.h"
#include "commands.h"
#include "commands/cmd_rehash.h"
void cmd_rehash::Handle (const char** parameters, int pcnt, userrec *user)
{
user->WriteServ("382 %s %s :Rehashing",user->nick,ServerConfig::CleanFilename(CONFIG_FILE));

View File

@ -16,12 +16,8 @@
#include "configreader.h"
#include "users.h"
#include "commands.h"
#include "commands/cmd_restart.h"
void cmd_restart::Handle (const char** parameters, int pcnt, userrec *user)
{
char *argv[32];

View File

@ -15,8 +15,6 @@
*/
#include "users.h"
#include "commands.h"
#include "commands/cmd_rules.h"
void cmd_rules::Handle (const char** parameters, int pcnt, userrec *user)

View File

@ -15,13 +15,9 @@
*/
#include "users.h"
#include "commands.h"
#include "inspircd.h"
#include "commands/cmd_server.h"
void cmd_server::Handle (const char** parameters, int pcnt, userrec *user)
{
user->WriteServ("666 %s :You cannot identify as a server, you are a USER. IRC Operators informed.",user->nick);

View File

@ -15,8 +15,6 @@
*/
#include "users.h"
#include "commands.h"
#include "commands/cmd_squit.h"
/*

View File

@ -14,31 +14,12 @@
* ---------------------------------------------------
*/
#include "inspircd_config.h"
#include "inspircd.h"
#include "configreader.h"
#include "hash_map.h"
#include <sys/types.h>
#include <sys/time.h>
#include <sys/resource.h>
#ifndef RUSAGE_SELF
#define RUSAGE_SELF 0
#define RUSAGE_CHILDREN -1
#endif
#include "users.h"
#include "ctables.h"
#include "globals.h"
#include "modules.h"
#include "dynamic.h"
#include "wildcard.h"
#include "commands.h"
#include "mode.h"
#include "xline.h"
#include "inspstring.h"
#include "hashcomp.h"
#include "socketengine.h"
#include "command_parse.h"
#include "commands/cmd_stats.h"
void cmd_stats::Handle (const char** parameters, int pcnt, userrec *user)
@ -163,7 +144,7 @@ void DoStats(InspIRCd* ServerInstance, char statschar, userrec* user, string_lis
results.push_back(sn+" 249 "+user->nick+" :MOTD(VECTOR) "+ConvToStr(ServerInstance->Config->MOTD.size())+", RULES(VECTOR) "+ConvToStr(ServerInstance->Config->RULES.size()));
results.push_back(sn+" 249 "+user->nick+" :Modules(VECTOR) "+ConvToStr(ServerInstance->modules.size())+" ("+ConvToStr(ServerInstance->modules.size()*sizeof(Module))+")");
results.push_back(sn+" 249 "+user->nick+" :ClassFactories(VECTOR) "+ConvToStr(ServerInstance->factory.size())+" ("+ConvToStr(ServerInstance->factory.size()*sizeof(ircd_module))+")");
if (!getrusage(RUSAGE_SELF,&R))
if (!getrusage(0,&R)) /* RUSAGE_SELF */
{
results.push_back(sn+" 249 "+user->nick+" :Total allocation: "+ConvToStr(R.ru_maxrss)+"K");
results.push_back(sn+" 249 "+user->nick+" :Signals: "+ConvToStr(R.ru_nsignals));

View File

@ -15,8 +15,6 @@
*/
#include "users.h"
#include "commands.h"
#include "commands/cmd_summon.h"
void cmd_summon::Handle (const char** parameters, int pcnt, userrec *user)

View File

@ -14,11 +14,8 @@
* ---------------------------------------------------
*/
#include <time.h>
#include "configreader.h"
#include "users.h"
#include "commands.h"
#include "commands/cmd_time.h"
void cmd_time::Handle (const char** parameters, int pcnt, userrec *user)

View File

@ -14,14 +14,11 @@
* ---------------------------------------------------
*/
#include "inspircd_config.h"
#include "configreader.h"
#include "users.h"
#include "modules.h"
#include "commands.h"
#include "commands/cmd_topic.h"
void cmd_topic::Handle (const char** parameters, int pcnt, userrec *user)
{
chanrec* Ptr;

View File

@ -15,13 +15,9 @@
*/
#include "users.h"
#include "commands.h"
#include "inspircd.h"
#include "commands/cmd_trace.h"
void cmd_trace::Handle (const char** parameters, int pcnt, userrec *user)
{
for (user_hash::iterator i = ServerInstance->clientlist.begin(); i != ServerInstance->clientlist.end(); i++)

View File

@ -16,12 +16,8 @@
#include "inspircd.h"
#include "users.h"
#include "commands.h"
#include "commands/cmd_unloadmodule.h"
void cmd_unloadmodule::Handle (const char** parameters, int pcnt, userrec *user)
{
if (ServerInstance->UnloadModule(parameters[0]))

View File

@ -14,15 +14,10 @@
* ---------------------------------------------------
*/
#include "inspircd_config.h"
#include "configreader.h"
#include "users.h"
#include "commands.h"
#include "commands/cmd_user.h"
void cmd_user::Handle (const char** parameters, int pcnt, userrec *user)
{
if (user->registered < REG_NICKUSER)
@ -34,8 +29,9 @@ void cmd_user::Handle (const char** parameters, int pcnt, userrec *user)
}
else {
/* We're not checking ident, but I'm not sure I like the idea of '~' prefixing.. */
/* XXX - Should this IDENTMAX + 1 be IDENTMAX - 1? Ok, users.h has it defined as
* char ident[IDENTMAX+2]; - WTF?
/* XXX - The ident field is IDENTMAX+2 in size to account for +1 for the optional
* ~ character, and +1 for null termination, therefore we can safely use up to
* IDENTMAX here.
*/
strlcpy(user->ident, parameters[0], IDENTMAX);
strlcpy(user->fullname,parameters[3],MAXGECOS);

View File

@ -14,15 +14,10 @@
* ---------------------------------------------------
*/
#include "inspircd_config.h"
#include "users.h"
#include "commands.h"
#include "inspircd.h"
#include "commands/cmd_userhost.h"
void cmd_userhost::Handle (const char** parameters, int pcnt, userrec *user)
{
char Return[MAXBUF],junk[MAXBUF];

View File

@ -15,8 +15,6 @@
*/
#include "users.h"
#include "commands.h"
#include "commands/cmd_users.h"
void cmd_users::Handle (const char** parameters, int pcnt, userrec *user)

View File

@ -17,13 +17,8 @@
#include "inspircd.h"
#include "configreader.h"
#include "users.h"
#include "commands.h"
#include "commands/cmd_version.h"
void cmd_version::Handle (const char** parameters, int pcnt, userrec *user)
{
std::stringstream out(ServerInstance->Config->data005);

View File

@ -16,12 +16,8 @@
#include "configreader.h"
#include "modules.h"
#include "commands.h"
#include "commands/cmd_wallops.h"
void cmd_wallops::Handle (const char** parameters, int pcnt, userrec *user)
{
user->WriteWallOps(std::string(parameters[0]));

View File

@ -17,13 +17,9 @@
#include "configreader.h"
#include "users.h"
#include "modules.h"
#include "commands.h"
#include "wildcard.h"
#include "commands/cmd_who.h"
/* get the last 'visible' chan of a user */
static char *getlastchanname(userrec *u)
{

View File

@ -18,8 +18,6 @@
#include "configreader.h"
#include "users.h"
#include "modules.h"
#include "commands.h"
#include "commands/cmd_whois.h"
const char* Spacify(char* n)

View File

@ -14,11 +14,8 @@
* ---------------------------------------------------
*/
#include "inspircd_config.h"
#include "configreader.h"
#include "users.h"
#include "commands.h"
#include "commands/cmd_whowas.h"
void cmd_whowas::Handle (const char** parameters, int pcnt, userrec* user)

View File

@ -14,18 +14,13 @@
* ---------------------------------------------------
*/
#include "inspircd_config.h"
#include "inspircd.h"
#include "configreader.h"
#include "users.h"
#include "modules.h"
#include "commands.h"
#include "xline.h"
#include "commands/cmd_zline.h"
void cmd_zline::Handle (const char** parameters, int pcnt, userrec *user)
{
if (pcnt >= 3)

View File

@ -14,40 +14,249 @@
* ---------------------------------------------------
*/
#include "inspircd_config.h"
#include "inspircd.h"
#include "configreader.h"
#include <unistd.h>
#include <fcntl.h>
#include <sys/errno.h>
#include <sys/ioctl.h>
#include <sys/utsname.h>
#include <time.h>
#include <string>
#include <sstream>
#include <vector>
#include <algorithm>
#include "users.h"
#include "globals.h"
#include "modules.h"
#include "dynamic.h"
#include "wildcard.h"
#include "mode.h"
#include "commands.h"
#include "xline.h"
#include "inspstring.h"
#include "hashcomp.h"
#include "socketengine.h"
#include "userprocess.h"
#include "socket.h"
#include "dns.h"
#include "typedefs.h"
#include "command_parse.h"
#include "ctables.h"
#define nspace __gnu_cxx
/* XXX Serious WTFness XXX
*
* Well, unless someone invents a wildcard or
* regexp #include, and makes it a standard,
* we're stuck with this way of including all
* the commands.
*/
#include "commands/cmd_admin.h"
#include "commands/cmd_away.h"
#include "commands/cmd_commands.h"
#include "commands/cmd_connect.h"
#include "commands/cmd_die.h"
#include "commands/cmd_eline.h"
#include "commands/cmd_gline.h"
#include "commands/cmd_info.h"
#include "commands/cmd_invite.h"
#include "commands/cmd_ison.h"
#include "commands/cmd_join.h"
#include "commands/cmd_kick.h"
#include "commands/cmd_kill.h"
#include "commands/cmd_kline.h"
#include "commands/cmd_links.h"
#include "commands/cmd_list.h"
#include "commands/cmd_loadmodule.h"
#include "commands/cmd_lusers.h"
#include "commands/cmd_map.h"
#include "commands/cmd_modules.h"
#include "commands/cmd_motd.h"
#include "commands/cmd_names.h"
#include "commands/cmd_nick.h"
#include "commands/cmd_notice.h"
#include "commands/cmd_oper.h"
#include "commands/cmd_part.h"
#include "commands/cmd_pass.h"
#include "commands/cmd_ping.h"
#include "commands/cmd_pong.h"
#include "commands/cmd_privmsg.h"
#include "commands/cmd_qline.h"
#include "commands/cmd_quit.h"
#include "commands/cmd_rehash.h"
#include "commands/cmd_restart.h"
#include "commands/cmd_rules.h"
#include "commands/cmd_server.h"
#include "commands/cmd_squit.h"
#include "commands/cmd_stats.h"
#include "commands/cmd_summon.h"
#include "commands/cmd_time.h"
#include "commands/cmd_topic.h"
#include "commands/cmd_trace.h"
#include "commands/cmd_unloadmodule.h"
#include "commands/cmd_user.h"
#include "commands/cmd_userhost.h"
#include "commands/cmd_users.h"
#include "commands/cmd_version.h"
#include "commands/cmd_wallops.h"
#include "commands/cmd_who.h"
#include "commands/cmd_whois.h"
#include "commands/cmd_whowas.h"
#include "commands/cmd_zline.h"
bool InspIRCd::ULine(const char* server)
{
if (!server)
return false;
if (!*server)
return true;
return (find(Config->ulines.begin(),Config->ulines.end(),server) != Config->ulines.end());
}
int InspIRCd::OperPassCompare(const char* data,const char* input)
{
int MOD_RESULT = 0;
FOREACH_RESULT_I(this,I_OnOperCompare,OnOperCompare(data,input))
Log(DEBUG,"OperPassCompare: %d",MOD_RESULT);
if (MOD_RESULT == 1)
return 0;
if (MOD_RESULT == -1)
return 1;
Log(DEBUG,"strcmp fallback: '%s' '%s' %d",data,input,strcmp(data,input));
return strcmp(data,input);
}
long InspIRCd::Duration(const char* str)
{
char n_field[MAXBUF];
long total = 0;
n_field[0] = 0;
if ((!strchr(str,'s')) && (!strchr(str,'m')) && (!strchr(str,'h')) && (!strchr(str,'d')) && (!strchr(str,'w')) && (!strchr(str,'y')))
{
std::string n = str;
n += 's';
return Duration(n.c_str());
}
for (char* i = (char*)str; *i; i++)
{
// if we have digits, build up a string for the value in n_field,
// up to 10 digits in size.
if ((*i >= '0') && (*i <= '9'))
{
strlcat(n_field,i,10);
}
else
{
// we dont have a digit, check for numeric tokens
switch (tolower(*i))
{
case 's':
total += atoi(n_field);
break;
case 'm':
total += (atoi(n_field)*duration_m);
break;
case 'h':
total += (atoi(n_field)*duration_h);
break;
case 'd':
total += (atoi(n_field)*duration_d);
break;
case 'w':
total += (atoi(n_field)*duration_w);
break;
case 'y':
total += (atoi(n_field)*duration_y);
break;
}
n_field[0] = 0;
}
}
// add trailing seconds
total += atoi(n_field);
return total;
}
/* All other ircds when doing this check usually just look for a string of *@* or *. We're smarter than that, though. */
bool InspIRCd::HostMatchesEveryone(const std::string &mask, userrec* user)
{
char buffer[MAXBUF];
char itrigger[MAXBUF];
long matches = 0;
if (!Config->ConfValue(Config->config_data, "insane","trigger", 0, itrigger, MAXBUF))
strlcpy(itrigger,"95.5",MAXBUF);
if (Config->ConfValueBool(Config->config_data, "insane","hostmasks", 0))
return false;
for (user_hash::iterator u = clientlist.begin(); u != clientlist.end(); u++)
{
strlcpy(buffer,u->second->ident,MAXBUF);
charlcat(buffer,'@',MAXBUF);
strlcat(buffer,u->second->host,MAXBUF);
if (match(buffer,mask.c_str()))
matches++;
}
float percent = ((float)matches / (float)clientlist.size()) * 100;
if (percent > (float)atof(itrigger))
{
WriteOpers("*** \2WARNING\2: %s tried to set a G/K/E line mask of %s, which covers %.2f%% of the network!",user->nick,mask.c_str(),percent);
return true;
}
return false;
}
bool InspIRCd::IPMatchesEveryone(const std::string &ip, userrec* user)
{
char itrigger[MAXBUF];
long matches = 0;
if (!Config->ConfValue(Config->config_data, "insane","trigger",0,itrigger,MAXBUF))
strlcpy(itrigger,"95.5",MAXBUF);
if (Config->ConfValueBool(Config->config_data, "insane","ipmasks",0))
return false;
for (user_hash::iterator u = clientlist.begin(); u != clientlist.end(); u++)
{
if (match(u->second->GetIPString(),ip.c_str(),true))
matches++;
}
float percent = ((float)matches / (float)clientlist.size()) * 100;
if (percent > (float)atof(itrigger))
{
WriteOpers("*** \2WARNING\2: %s tried to set a Z line mask of %s, which covers %.2f%% of the network!",user->nick,ip.c_str(),percent);
return true;
}
return false;
}
bool InspIRCd::NickMatchesEveryone(const std::string &nick, userrec* user)
{
char itrigger[MAXBUF];
long matches = 0;
if (!Config->ConfValue(Config->config_data, "insane","trigger",0,itrigger,MAXBUF))
strlcpy(itrigger,"95.5",MAXBUF);
if (Config->ConfValueBool(Config->config_data, "insane","nickmasks",0))
return false;
for (user_hash::iterator u = clientlist.begin(); u != clientlist.end(); u++)
{
if (match(u->second->nick,nick.c_str()))
matches++;
}
float percent = ((float)matches / (float)clientlist.size()) * 100;
if (percent > (float)atof(itrigger))
{
WriteOpers("*** \2WARNING\2: %s tried to set a Q line mask of %s, which covers %.2f%% of the network!",user->nick,nick.c_str(),percent);
return true;
}
return false;
}
/* Special commands which may occur without registration of the user */
cmd_user* command_user;
cmd_nick* command_nick;
@ -293,9 +502,9 @@ void CommandParser::ProcessBuffer(std::string &buffer,userrec *user)
if (!user)
return;
while ((a = buffer.find("\n")) != std::string::npos)
while ((a = buffer.rfind("\n")) != std::string::npos)
buffer.erase(a);
while ((a = buffer.find("\r")) != std::string::npos)
while ((a = buffer.rfind("\r")) != std::string::npos)
buffer.erase(a);
if (buffer.length())

View File

@ -14,42 +14,14 @@
* ---------------------------------------------------
*/
#include "inspircd_config.h"
#include "inspircd.h"
#include "configreader.h"
#include <unistd.h>
#include <sys/errno.h>
#include <sys/ioctl.h>
#include <sys/utsname.h>
#include <cstdio>
#include <time.h>
#include <string>
#include <sstream>
#include <vector>
#include <sys/types.h>
#include <sys/time.h>
#include <sys/resource.h>
#ifndef RUSAGE_SELF
#define RUSAGE_SELF 0
#define RUSAGE_CHILDREN -1
#endif
#include "users.h"
#include "ctables.h"
#include "globals.h"
#include "modules.h"
#include "dynamic.h"
#include "wildcard.h"
#include "commands.h"
#include "mode.h"
#include "xline.h"
#include "inspstring.h"
#include "hashcomp.h"
#include "socketengine.h"
#include "typedefs.h"
#include "command_parse.h"
/* XXX - these really belong in helperfuncs perhaps -- w00t */
bool InspIRCd::ULine(const char* server)
{
if (!server)

View File

@ -14,16 +14,10 @@
* ---------------------------------------------------
*/
#include "inspircd_config.h"
#include "configreader.h"
#include <string>
#include <sstream>
#include <iostream>
#include <fstream>
#include "inspircd.h"
#include "inspstring.h"
#include "userprocess.h"
#include "xline.h"
std::vector<std::string> old_module_names, new_module_names, added_modules, removed_modules;

View File

@ -16,26 +16,8 @@
using namespace std;
#include "inspircd_config.h"
#include "inspircd.h"
#include <string>
#include <map>
#include <sstream>
#include <vector>
#include <deque>
#include "users.h"
#include "ctables.h"
#include "globals.h"
#include "modules.h"
#include "dynamic.h"
#include "wildcard.h"
#include "commands.h"
#include "xline.h"
#include "inspstring.h"
#include "inspircd.h"
#include "hashcomp.h"
#include "typedefs.h"
#include "cull_list.h"
/*

View File

@ -26,20 +26,13 @@ looks like this, walks like this or tastes like this.
using namespace std;
#include <string>
#include <time.h>
#include <sys/types.h>
#include <sys/socket.h>
#include <errno.h>
#include <sys/types.h>
#include <sys/socket.h>
#include <netinet/in.h>
#include <arpa/inet.h>
#include <map>
#include "dns.h"
#include "inspircd.h"
#include "inspircd_config.h"
#include "socketengine.h"
#include "configreader.h"
#include "socket.h"

View File

@ -16,9 +16,7 @@
using namespace std;
#include "inspircd_config.h"
#include "configreader.h"
#include "globals.h"
#include "dynamic.h"
#ifndef STATIC_LINK
@ -27,12 +25,7 @@ using namespace std;
#include "modlist.h"
#endif
#include "inspstring.h"
#include "inspircd.h"
#include <unistd.h>
#include <sys/types.h>
#include <stdio.h>
DLLManager::DLLManager(InspIRCd* ServerInstance, const char *fname)
{

View File

@ -16,13 +16,9 @@
using namespace std;
#include "inspircd_config.h"
#include "inspircd.h"
#include <string>
#include "hashcomp.h"
#include <ext/hash_map>
#define nspace __gnu_cxx
/******************************************************

View File

@ -15,32 +15,12 @@
*/
#include <stdarg.h>
#include "inspircd_config.h"
#include "configreader.h"
#include <unistd.h>
#include <fcntl.h>
#include <sys/errno.h>
#include <signal.h>
#include <time.h>
#include <string>
#include <sstream>
#ifdef HAS_EXECINFO
#include <execinfo.h>
#endif
#include "connection.h"
#include "users.h"
#include "ctables.h"
#include "globals.h"
#include "modules.h"
#include "dynamic.h"
#include "wildcard.h"
#include "mode.h"
#include "xline.h"
#include "commands.h"
#include "inspstring.h"
#include "hashcomp.h"
#include "typedefs.h"
#include "inspircd.h"
static char TIMESTR[26];

View File

@ -30,16 +30,8 @@
#include "inspircd.h"
#include "configreader.h"
#include <signal.h>
#include <time.h>
#include <string>
#include <exception>
#include <stdexcept>
#include <new>
#include <map>
#include <sstream>
#include <fstream>
#include <vector>
#include <deque>
#include "modules.h"
#include "mode.h"
#include "xline.h"

View File

@ -14,12 +14,6 @@
* ---------------------------------------------------
*/
#include <string>
#include <sstream>
#include <iostream>
#include <fstream>
#include <stdexcept>
#include "inspircd_config.h"
#include "socket.h"
#include "configreader.h"
#include "inspstring.h"

View File

@ -1,8 +1,5 @@
#include "inspircd_config.h"
#include "inspstring.h"
#include <cstddef>
#include <string.h>
#include <stdio.h>
/*
* Copyright (c) 1998 Todd C. Miller <Todd.Miller@courtesan.com>

View File

@ -1,15 +0,0 @@
/* +------------------------------------+
* | Inspire Internet Relay Chat Daemon |
* +------------------------------------+
*
* InspIRCd is copyright (C) 2002-2006 ChatSpike-Dev.
* E-mail:
* <brain@chatspike.net>
* <Craig@chatspike.net>
*
* Written by Craig Edwards, Craig McLure, and others.
* This program is free but copyrighted software; see
* the file COPYING for details.
*
* ---------------------------------------------------
*/

View File

@ -16,17 +16,10 @@
using namespace std;
#include "inspircd_config.h"
#include "inspircd.h"
#include "configreader.h"
#include <unistd.h>
#include "hash_map.h"
#include "connection.h"
#include "users.h"
#include "modules.h"
#include "inspstring.h"
#include "commands.h"
#include "mode.h"
/* +s (secret) */
@ -53,7 +46,6 @@ using namespace std;
#include "modes/cmode_h.h"
/* +v (channel voice) */
#include "modes/cmode_v.h"
/* +s (server notices) */
#include "modes/umode_s.h"
/* +w (see wallops) */

View File

@ -1,17 +1,9 @@
#include <string>
#include <vector>
#include "inspircd_config.h"
#include "configreader.h"
#include "hash_map.h"
#include "inspircd.h"
#include "mode.h"
#include "channels.h"
#include "users.h"
#include "commands.h"
#include "modules.h"
#include "inspstring.h"
#include "hashcomp.h"
#include "modes/cmode_h.h"
ModeChannelHalfOp::ModeChannelHalfOp(InspIRCd* Instance) : ModeHandler(Instance, 'h', 1, 1, true, MODETYPE_CHANNEL, false, '%')

View File

@ -1,17 +1,9 @@
#include <string>
#include <vector>
#include "inspircd_config.h"
#include "configreader.h"
#include "hash_map.h"
#include "inspircd.h"
#include "mode.h"
#include "channels.h"
#include "users.h"
#include "commands.h"
#include "modules.h"
#include "inspstring.h"
#include "hashcomp.h"
#include "modes/cmode_o.h"
ModeChannelOp::ModeChannelOp(InspIRCd* Instance) : ModeHandler(Instance, 'o', 1, 1, true, MODETYPE_CHANNEL, false, '@')

View File

@ -1,16 +1,9 @@
#include <string>
#include <vector>
#include "inspircd_config.h"
#include "configreader.h"
#include "hash_map.h"
#include "inspircd.h"
#include "mode.h"
#include "channels.h"
#include "users.h"
#include "commands.h"
#include "modules.h"
#include "inspstring.h"
#include "hashcomp.h"
#include "modes/cmode_v.h"
ModeChannelVoice::ModeChannelVoice(InspIRCd* Instance) : ModeHandler(Instance, 'v', 1, 1, true, MODETYPE_CHANNEL, false, '+')

View File

@ -14,39 +14,19 @@
* ---------------------------------------------------
*/
#include "inspircd_config.h"
//#include "inspircd.h"
#include "configreader.h"
#include <unistd.h>
#include <sys/errno.h>
#include <time.h>
#include <string>
#include <map>
#include <sstream>
#include <vector>
#include <deque>
#include "users.h"
#include "ctables.h"
#include "globals.h"
#include "modules.h"
#include "dynamic.h"
#include "wildcard.h"
#include "mode.h"
#include "xline.h"
#include "commands.h"
#include "inspstring.h"
#include "hashcomp.h"
#include "socket.h"
#include "socketengine.h"
#include "typedefs.h"
#include "modules.h"
#include "command_parse.h"
#include "dns.h"
#include "inspircd.h"
// version is a simple class for holding a modules version number
Version::Version(int major, int minor, int revision, int build, int flags)
: Major(major), Minor(minor), Revision(revision), Build(build), Flags(flags)
{

View File

@ -19,7 +19,6 @@ using namespace std;
#include "users.h"
#include "channels.h"
#include "modules.h"
#include "commands.h"
#include "inspircd.h"
#include <vector>

View File

@ -16,15 +16,9 @@
*/
#include <algorithm>
#include <vector>
#include <string>
#include <sstream>
#include "users.h"
#include "channels.h"
#include "modules.h"
#include "hashcomp.h"
#include "commands.h"
#include "configreader.h"
#include "inspircd.h"

View File

@ -18,7 +18,6 @@
#include "channels.h"
#include "modules.h"
#include "inspircd.h"
#include "commands.h"
/* $ModDesc: Provides channel modes +a and +q */

View File

@ -19,9 +19,7 @@ using namespace std;
#include "users.h"
#include "channels.h"
#include "modules.h"
#include "commands.h"
#include "inspircd.h"
#include "wildcard.h"
/* $ModDesc: Provides the /check command to retrieve information on a user, channel, or IP address */

View File

@ -19,9 +19,7 @@ using namespace std;
#include "users.h"
#include "channels.h"
#include "modules.h"
#include "commands.h"
#include "inspircd.h"
#include <vector>
static const char* dummy = "ON";

View File

@ -1,14 +1,27 @@
/* +------------------------------------+
* | Inspire Internet Relay Chat Daemon |
* +------------------------------------+
*
* InspIRCd is copyright (C) 2002-2006 ChatSpike-Dev.
* E-mail:
* <brain@chatspike.net>
* <Craig@chatspike.net>
*
* Written by Craig Edwards, Craig McLure, and others.
* This program is free but copyrighted software; see
* the file COPYING for details.
*
* ---------------------------------------------------
*/
/* Support for a dancer-style /remove command, an alternative to /kick to try and avoid auto-rejoin-on-kick scripts */
/* Written by Om, 25-03-05 */
#include <sstream>
#include <string>
#include "users.h"
#include "channels.h"
#include "modules.h"
#include "configreader.h"
#include "commands.h"
#include "inspircd.h"
/* $ModDesc: Provides a /remove command, this is mostly an alternative to /kick, except makes users appear to have parted the channel */

View File

@ -19,10 +19,9 @@ using namespace std;
#include "users.h"
#include "channels.h"
#include "modules.h"
#include <vector>
#include "configreader.h"
#include "inspircd.h"
#include "wildcard.h"
class ListData : public classbase
{
@ -30,9 +29,10 @@ class ListData : public classbase
long list_start;
long list_position;
bool list_ended;
const std::string glob;
ListData() : list_start(0), list_position(0), list_ended(false) {};
ListData(long pos, time_t t) : list_start(t), list_position(pos), list_ended(false) {};
ListData(long pos, time_t t, const std::string &pattern) : list_start(t), list_position(pos), list_ended(false), glob(pattern) {};
};
/* $ModDesc: A module overriding /list, and making it safe - stop those sendq problems. */
@ -52,6 +52,7 @@ class ListTimer : public InspTimer
char buffer[MAXBUF];
chanrec *chan;
InspIRCd* ServerInstance;
const std::string glob;
public:
@ -99,6 +100,8 @@ class ListTimer : public InspTimer
chan = ServerInstance->GetChannelIndex(ld->list_position);
/* spool details */
bool has_user = (chan && chan->HasUser(u));
if (!match(chan->name, ld->glob.c_str()))
continue;
if ((chan) && (((!(chan->modes[CM_PRIVATE])) && (!(chan->modes[CM_SECRET]))) || (has_user)))
{
long users = chan->GetUserCounter();
@ -210,7 +213,7 @@ class ModuleSafeList : public Module
/*
* start at channel 0! ;)
*/
ld = new ListData(0,ServerInstance->Time());
ld = new ListData(0,ServerInstance->Time(), pcnt ? parameters[0] : "*");
user->Extend("safelist_cache", ld);
listusers.push_back(user);
@ -263,11 +266,8 @@ class ModuleSafeList : public Module
}
};
/******************************************************************************************************/
class ModuleSafeListFactory : public ModuleFactory
{
public:

View File

@ -19,8 +19,6 @@ using namespace std;
#include "users.h"
#include "channels.h"
#include "modules.h"
#include "commands.h"
#include "hashcomp.h"
#include "inspircd.h"
static bool kludgeme = false;

View File

@ -18,27 +18,16 @@
using namespace std;
#include <stdio.h>
#include <vector>
#include <deque>
#include "globals.h"
#include "inspircd_config.h"
#include "hash_map.h"
#include "configreader.h"
#include "users.h"
#include "channels.h"
#include "modules.h"
#include "commands.h"
#include "commands/cmd_whois.h"
#include "commands/cmd_stats.h"
#include "socket.h"
#include "inspircd.h"
#include "wildcard.h"
#include "inspstring.h"
#include "hashcomp.h"
#include "xline.h"
#include "typedefs.h"
#include "cull_list.h"
#include "aes.h"

View File

@ -23,27 +23,12 @@ using namespace std;
/* $ModDesc: Provides SPYLIST and SPYNAMES capability, allowing opers to see who's in +s channels */
#include <stdio.h>
#include <vector>
#include <deque>
#include "globals.h"
#include "inspircd_config.h"
#include <ext/hash_map>
#include "users.h"
#include "channels.h"
#include "modules.h"
#include "commands.h"
#include "socket.h"
#include "inspircd.h"
#include "inspstring.h"
#include "hashcomp.h"
#include "xline.h"
#include "typedefs.h"
#include "cull_list.h"
#include "aes.h"
#define nspace __gnu_cxx
#include "wildcard.h"
void spy_userlist(userrec *user,chanrec *c)
{
@ -80,7 +65,7 @@ void spy_userlist(userrec *user,chanrec *c)
class cmd_spylist : public command_t
{
public:
cmd_spylist (InspIRCd* Instance) : command_t(Instance,"SPYLIST", 'o', 0)
cmd_spylist (InspIRCd* Instance) : command_t(Instance,"SPYLIST", 'o', 0)
{
this->source = "m_spy.so";
syntax = "";
@ -92,6 +77,8 @@ class cmd_spylist : public command_t
user->WriteServ("321 %s Channel :Users Name",user->nick);
for (chan_hash::const_iterator i = ServerInstance->chanlist.begin(); i != ServerInstance->chanlist.end(); i++)
{
if (pcnt && !match(i->second->name, parameters[0]))
continue;
user->WriteServ("322 %s %s %d :[+%s] %s",user->nick,i->second->name,i->second->GetUserCounter(),i->second->ChanModes(true),i->second->topic);
}
user->WriteServ("323 %s :End of channel list.",user->nick);
@ -101,7 +88,7 @@ class cmd_spylist : public command_t
class cmd_spynames : public command_t
{
public:
cmd_spynames (InspIRCd* Instance) : command_t(Instance,"SPYNAMES", 'o', 0)
cmd_spynames (InspIRCd* Instance) : command_t(Instance,"SPYNAMES", 'o', 0)
{
this->source = "m_spy.so";
syntax = "{<channel>{,<channel>}}";

View File

@ -14,14 +14,9 @@
* ---------------------------------------------------
*/
#include <string>
#include <vector>
#include <stdarg.h>
#include "configreader.h"
#include "users.h"
#include "modules.h"
#include "commands.h"
#include "xline.h"
#include "snomasks.h"
SnomaskManager::SnomaskManager(InspIRCd* Instance) : ServerInstance(Instance)

View File

@ -18,7 +18,6 @@
#include "configreader.h"
#include "socket.h"
#include "inspircd.h"
#include "inspstring.h"
#include "socketengine.h"
#include "wildcard.h"

View File

@ -14,10 +14,7 @@
* ---------------------------------------------------
*/
#include "inspircd_config.h"
#include "inspircd.h"
#include <vector>
#include <string>
#include "socketengine.h"
int EventHandler::GetFd()

View File

@ -14,11 +14,8 @@
* ---------------------------------------------------
*/
#include "inspircd_config.h"
#include "inspircd.h"
#include <sys/epoll.h>
#include <vector>
#include <string>
#include "socketengine_epoll.h"
EPollEngine::EPollEngine(InspIRCd* Instance) : SocketEngine(Instance)

View File

@ -14,14 +14,10 @@
* ---------------------------------------------------
*/
#include "inspircd_config.h"
#include "globals.h"
#include "inspircd.h"
#include <sys/types.h>
#include <sys/event.h>
#include <sys/time.h>
#include <vector>
#include <string>
#include "socketengine_kqueue.h"

View File

@ -14,11 +14,7 @@
* ---------------------------------------------------
*/
#include "inspircd_config.h"
#include "globals.h"
#include "inspircd.h"
#include <vector>
#include <string>
#include <sys/select.h>
#include "socketengine_select.h"

View File

@ -14,12 +14,7 @@
* ---------------------------------------------------
*/
#include <vector>
#include <map>
#include "inspircd_config.h"
#include "inspircd.h"
#include "typedefs.h"
#include "timer.h"
void TimerManager::TickTimers(time_t TIME)

View File

@ -18,36 +18,14 @@
using namespace std;
#include "inspircd_config.h"
#include "configreader.h"
#include <unistd.h>
#include <fcntl.h>
#include <sys/errno.h>
#include <sys/ioctl.h>
#include <sys/utsname.h>
#include <time.h>
#include <string>
#include <ext/hash_map>
#include <map>
#include <sstream>
#include <vector>
#include <deque>
#include "users.h"
#include "ctables.h"
#include "globals.h"
#include "modules.h"
#include "dynamic.h"
#include "wildcard.h"
#include "mode.h"
#include "commands.h"
#include "xline.h"
#include "inspstring.h"
#include "hashcomp.h"
#include "socketengine.h"
#include "userprocess.h"
#include "inspircd.h"
#include "typedefs.h"
#include "command_parse.h"
#include "cull_list.h"

View File

@ -14,19 +14,12 @@
* ---------------------------------------------------
*/
#include "inspircd_config.h"
#include "configreader.h"
#include "channels.h"
#include "connection.h"
#include "users.h"
#include "inspircd.h"
#include <stdarg.h>
#include "inspstring.h"
#include "commands.h"
#include "typedefs.h"
#include "socketengine.h"
#include "hashcomp.h"
#include "wildcard.h"
#include "xline.h"
#include "cull_list.h"

Some files were not shown because too many files have changed in this diff Show More