diff options
author | brain <brain@e03df62e-2008-0410-955e-edbf42e46eb7> | 2004-04-04 00:58:20 +0000 |
---|---|---|
committer | brain <brain@e03df62e-2008-0410-955e-edbf42e46eb7> | 2004-04-04 00:58:20 +0000 |
commit | 6d853575a51230b5b8905933423ed8cd94058435 (patch) | |
tree | f47357b13c40c3704a3d16d2c759e59552c471df /src/inspircd.cpp | |
parent | ae5ff9b009565dd91743950d4c41a501f2d3ad27 (diff) |
Added support for /modules command
Updated contributors
git-svn-id: http://svn.inspircd.org/repository/trunk/inspircd@373 e03df62e-2008-0410-955e-edbf42e46eb7
Diffstat (limited to 'src/inspircd.cpp')
-rw-r--r-- | src/inspircd.cpp | 14 |
1 files changed, 13 insertions, 1 deletions
diff --git a/src/inspircd.cpp b/src/inspircd.cpp index e825729f9..590daea9d 100644 --- a/src/inspircd.cpp +++ b/src/inspircd.cpp @@ -76,6 +76,7 @@ int DieDelay = 5; time_t startup_time = time(NULL); extern vector<Module*> modules; +vector<string> module_names; extern vector<ircd_module*> factory; vector<int> fd_reap; @@ -3976,6 +3977,15 @@ void handle_trace(char **parameters, int pcnt, userrec *user) } } +void handle_modules(char **parameters, int pcnt, userrec *user) +{ + for (int i = 0; i < module_names.size(); i++) + { + Version V = modules[i]->GetVersion(); + WriteServ(user->fd,"900 0x%08lx %d.%d.%d.%d :%s",modules[i],V.Major,V.Minor,V.Revision,V.Build,module_names[i].c_str()); + } +} + void handle_stats(char **parameters, int pcnt, userrec *user) { if (pcnt != 1) @@ -4555,6 +4565,7 @@ void SetupCommandTable(void) createcommand("WHOWAS",handle_whowas,0,1); createcommand("CONNECT",handle_connect,'o',1); createcommand("SQUIT",handle_squit,'o',1); + createcommand("MODULES",handle_modules,'o',0); } void process_buffer(userrec *user) @@ -4906,8 +4917,9 @@ int InspIRCd(void) if (factory[count]->factory) { modules[count] = factory[count]->factory->CreateModule(); - /* save the module and the module's classfactory, if + /* save the module and the module's classfactory, if * this isnt done, random crashes can occur :/ */ + module_names.push_back(modfile); } else { |