summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorbrain <brain@e03df62e-2008-0410-955e-edbf42e46eb7>2005-12-14 16:48:12 +0000
committerbrain <brain@e03df62e-2008-0410-955e-edbf42e46eb7>2005-12-14 16:48:12 +0000
commit945466193b36e4e46ea005db299c64151ed957f0 (patch)
treec664a97b881a65a441bced308e751f8a9f6bc7a9
parent48e477893fdc3cd87b46e445b1e3e2d1395c4b94 (diff)
Tidied up inspircd.h
git-svn-id: http://svn.inspircd.org/repository/trunk/inspircd@2421 e03df62e-2008-0410-955e-edbf42e46eb7
-rw-r--r--include/inspircd.h32
-rw-r--r--include/mode.h2
-rw-r--r--include/modules.h7
-rw-r--r--src/inspircd.cpp44
-rw-r--r--src/modules.cpp8
5 files changed, 14 insertions, 79 deletions
diff --git a/include/inspircd.h b/include/inspircd.h
index 1499e9847..c0b8810ed 100644
--- a/include/inspircd.h
+++ b/include/inspircd.h
@@ -94,22 +94,6 @@ typedef void (handlerfunc) (char**, int, userrec*);
/* prototypes */
int InspIRCd(char** argv, int argc);
-int InitConfig(void);
-void ReadConfig(bool bail,userrec* user);
-
-std::string getservername();
-std::string getserverdesc();
-std::string getnetworkname();
-std::string getadminname();
-std::string getadminemail();
-std::string getadminnick();
-void readfile(file_cache &F, const char* fname);
-bool ModeDefined(char c, int i);
-bool ModeDefinedOper(char c, int i);
-int ModeDefinedOn(char c, int i);
-int ModeDefinedOff(char c, int i);
-void ModeMakeList(char modechar);
-bool ModeIsListMode(char modechar, int type);
chanrec* add_channel(userrec *user, const char* cn, const char* key, bool override);
chanrec* del_channel(userrec *user, const char* cname, const char* reason, bool local);
void force_nickchange(userrec* user,const char* newnick);
@@ -121,34 +105,20 @@ std::string GetRevision();
int loop_call(handlerfunc fn, char **parameters, int pcnt, userrec *u, int start, int end, int joins);
void kick_channel(userrec *src,userrec *user, chanrec *Ptr, char* reason);
void AddWhoWas(userrec* u);
-void update_stats_l(int fd,int data_out);
void ConnectUser(userrec *user);
-void DoSplitEveryone();
userrec* ReHashNick(char* Old, char* New);
bool LoadModule(const char* filename);
bool UnloadModule(const char* filename);
char* ModuleError();
-void NoticeAll(userrec *source, bool local_only, char* text, ...);
-void ServerNoticeAll(char* text, ...);
-void ServerPrivmsgAll(char* text, ...);
-void NoticeAllOpers(userrec *source, bool local_only, char* text, ...);
-
-// optimization tricks to save us walking the user hash
-
+/* optimization tricks to save us walking the user hash */
void AddOper(userrec* user);
void DeleteOper(userrec* user);
-
void handle_version(char **parameters, int pcnt, userrec *user);
-
// userrec optimization stuff
-
void AddServerName(std::string servername);
const char* FindServerNamePtr(std::string servername);
-
std::string GetVersionString();
-
void* dns_task(void* arg);
-
void process_buffer(const char* cmdbuf,userrec *user);
void FullConnectUser(userrec* user);
chanrec* ForceChan(chanrec* Ptr,ucrec &a,userrec* user, int created);
diff --git a/include/mode.h b/include/mode.h
index f5e9c7722..e63d9de6e 100644
--- a/include/mode.h
+++ b/include/mode.h
@@ -2,7 +2,7 @@
* | Inspire Internet Relay Chat Daemon |
* +------------------------------------+
*
- * Inspire is copyright (C) 2002-2004 ChatSpike-Dev.
+ * Inspire is copyright (C) 2002-2005 ChatSpike-Dev.
* E-mail:
* <brain@chatspike.net>
* <Craig@chatspike.net>
diff --git a/include/modules.h b/include/modules.h
index 2a7525c07..452ec72d5 100644
--- a/include/modules.h
+++ b/include/modules.h
@@ -1685,4 +1685,11 @@ class ModuleFactory : public classbase
typedef DLLFactory<ModuleFactory> ircd_module;
+bool ModeDefined(char c, int i);
+bool ModeDefinedOper(char c, int i);
+int ModeDefinedOn(char c, int i);
+int ModeDefinedOff(char c, int i);
+void ModeMakeList(char modechar);
+bool ModeIsListMode(char modechar, int type);
+
#endif
diff --git a/src/inspircd.cpp b/src/inspircd.cpp
index 15915607d..d3b1e4f09 100644
--- a/src/inspircd.cpp
+++ b/src/inspircd.cpp
@@ -97,25 +97,13 @@ chan_hash chanlist;
whowas_hash whowas;
command_table cmdlist;
address_cache IP;
-
servernamelist servernames;
-
int boundPortCount = 0;
int portCount = 0, ports[MAXSOCKS];
-
-/* prototypes */
-
-/*int has_channel(userrec *u, chanrec *c);
-int usercount(chanrec *c);
-int usercount_i(chanrec *c);
-char* Passwd(userrec *user);
-bool IsDenied(userrec *user);
-void AddWhoWas(userrec* u);*/
-
std::vector<userrec*> all_opers;
-
char lowermap[255];
+
void AddOper(userrec* user)
{
log(DEBUG,"Oper added to optimization list");
@@ -175,36 +163,6 @@ std::string GetRevision()
}
-std::string getservername()
-{
- return Config->ServerName;
-}
-
-std::string getserverdesc()
-{
- return Config->ServerDesc;
-}
-
-std::string getnetworkname()
-{
- return Config->Network;
-}
-
-std::string getadminname()
-{
- return Config->AdminName;
-}
-
-std::string getadminemail()
-{
- return Config->AdminEmail;
-}
-
-std::string getadminnick()
-{
- return Config->AdminNick;
-}
-
/* add a channel to a user, creating the record for it if needed and linking
* it to the user record */
diff --git a/src/modules.cpp b/src/modules.cpp
index 5fef5a608..80145ebee 100644
--- a/src/modules.cpp
+++ b/src/modules.cpp
@@ -536,22 +536,22 @@ bool Server::IsOnChannel(userrec* User, chanrec* Chan)
std::string Server::GetServerName()
{
- return getservername();
+ return Config->ServerName;
}
std::string Server::GetNetworkName()
{
- return getnetworkname();
+ return Config->Network;
}
std::string Server::GetServerDescription()
{
- return getserverdesc();
+ return Config->ServerDesc;
}
Admin Server::GetAdmin()
{
- return Admin(getadminname(),getadminemail(),getadminnick());
+ return Admin(Config->AdminName,Config->AdminEmail,Config->AdminNick);
}