mirror of
https://github.com/inspircd/inspircd.git
synced 2025-03-10 19:19:02 -04:00
Made inspircd itself a class, and called its instance TittyBiscuits, just because.
git-svn-id: http://svn.inspircd.org/repository/trunk/inspircd@2425 e03df62e-2008-0410-955e-edbf42e46eb7
This commit is contained in:
parent
353145dd74
commit
f9bc7a311d
@ -90,10 +90,15 @@ class serverstats
|
||||
}
|
||||
};
|
||||
|
||||
typedef void (handlerfunc) (char**, int, userrec*);
|
||||
|
||||
class InspIRCd
|
||||
{
|
||||
public:
|
||||
InspIRCd(int argc, char** argv);
|
||||
int Run();
|
||||
};
|
||||
|
||||
/* prototypes */
|
||||
int InspIRCd(char** argv, int argc);
|
||||
void force_nickchange(userrec* user,const char* newnick);
|
||||
void kill_link(userrec *user,const char* r);
|
||||
void kill_link_silent(userrec *user,const char* r);
|
||||
@ -118,6 +123,5 @@ 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);
|
||||
|
||||
#endif
|
||||
|
@ -25,5 +25,6 @@ typedef std::deque<command_t> command_table;
|
||||
typedef std::vector<std::string> servernamelist;
|
||||
typedef std::vector<ExtMode> ExtModeList;
|
||||
typedef ExtModeList::iterator ExtModeListIter;
|
||||
typedef void (handlerfunc) (char**, int, userrec*);
|
||||
|
||||
#endif
|
||||
|
@ -428,7 +428,7 @@ void kill_link_silent(userrec *user,const char* r)
|
||||
}
|
||||
|
||||
|
||||
int main(int argc, char** argv)
|
||||
InspIRCd::InspIRCd(int argc, char** argv)
|
||||
{
|
||||
Start();
|
||||
srand(time(NULL));
|
||||
@ -468,14 +468,7 @@ int main(int argc, char** argv)
|
||||
lowermap[(unsigned)']'] = '}';
|
||||
lowermap[(unsigned)'\\'] = '|';
|
||||
|
||||
if (InspIRCd(argv,argc) == ERROR)
|
||||
{
|
||||
log(DEFAULT,"main: daemon function bailed");
|
||||
printf("ERROR: could not initialise. Shutting down.\n");
|
||||
Exit(ERROR);
|
||||
}
|
||||
Exit(TRUE);
|
||||
return 0;
|
||||
return;
|
||||
}
|
||||
|
||||
template<typename T> inline string ConvToStr(const T &in)
|
||||
@ -1543,7 +1536,7 @@ int BindPorts()
|
||||
return boundPortCount;
|
||||
}
|
||||
|
||||
int InspIRCd(char** argv, int argc)
|
||||
int InspIRCd::Run()
|
||||
{
|
||||
bool expire_run = false;
|
||||
std::vector<int> activefds;
|
||||
@ -1753,3 +1746,17 @@ int InspIRCd(char** argv, int argc)
|
||||
return 0;
|
||||
}
|
||||
|
||||
/**********************************************************************************/
|
||||
|
||||
/**
|
||||
* An ircd in four lines! bwahahaha. ahahahahaha. ahahah *cough*.
|
||||
*/
|
||||
|
||||
int main(int argc, char** argv)
|
||||
{
|
||||
InspIRCd TittyBiscuits = new InspIRCd(argc, argv);
|
||||
TittyBiscuits->Run();
|
||||
delete TittyBiscuits;
|
||||
return 0;
|
||||
}
|
||||
|
||||
|
Loading…
x
Reference in New Issue
Block a user