summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorbrain <brain@e03df62e-2008-0410-955e-edbf42e46eb7>2005-12-07 09:54:25 +0000
committerbrain <brain@e03df62e-2008-0410-955e-edbf42e46eb7>2005-12-07 09:54:25 +0000
commit858b28bd2e46d827fd7178aa7cc99a19f9af6a61 (patch)
treec2f16178cfcf355b049bffef1f672a71539fddd4
parent89045dd768ee9c0add28248c77b885c1a6797a31 (diff)
Added remote connect notices
git-svn-id: http://svn.inspircd.org/repository/trunk/inspircd@2241 e03df62e-2008-0410-955e-edbf42e46eb7
-rw-r--r--src/commands.cpp15
-rw-r--r--src/modules/m_spanningtree.cpp13
2 files changed, 12 insertions, 16 deletions
diff --git a/src/commands.cpp b/src/commands.cpp
index 38880a586..c5529501d 100644
--- a/src/commands.cpp
+++ b/src/commands.cpp
@@ -1348,7 +1348,6 @@ void handle_modules(char **parameters, int pcnt, userrec *user)
void handle_stats(char **parameters, int pcnt, userrec *user)
{
- char Link_ServerName[MAXBUF],Link_IPAddr[MAXBUF],Link_Port[MAXBUF];
if (pcnt != 1)
{
return;
@@ -1364,14 +1363,7 @@ void handle_stats(char **parameters, int pcnt, userrec *user)
if (*parameters[0] == 'c')
{
- for (int i = 0; i < ConfValueEnum("link",&config_f); i++)
- {
- ConfValue("link","name",i,Link_ServerName,&config_f);
- ConfValue("link","ipaddr",i,Link_IPAddr,&config_f);
- ConfValue("link","port",i,Link_Port,&config_f);
- WriteServ(user->fd,"213 %s C *@%s * %s %s 0 M",user->nick,Link_IPAddr,Link_ServerName,Link_Port);
- WriteServ(user->fd,"244 %s H * * %s",user->nick,Link_ServerName);
- }
+ /* This stats symbol must be handled by a linking module */
}
if (*parameters[0] == 'i')
@@ -1396,10 +1388,11 @@ void handle_stats(char **parameters, int pcnt, userrec *user)
if (*parameters[0] == 'U')
{
+ char ulined[MAXBUF];
for (int i = 0; i < ConfValueEnum("uline",&config_f); i++)
{
- ConfValue("uline","server",i,Link_ServerName,&config_f);
- WriteServ(user->fd,"248 %s U %s",user->nick,Link_ServerName);
+ ConfValue("uline","server",i,ulined,&config_f);
+ WriteServ(user->fd,"248 %s U %s",user->nick,ulined);
}
}
diff --git a/src/modules/m_spanningtree.cpp b/src/modules/m_spanningtree.cpp
index fff7e77df..65ff9ecc2 100644
--- a/src/modules/m_spanningtree.cpp
+++ b/src/modules/m_spanningtree.cpp
@@ -936,6 +936,7 @@ class TreeSocket : public InspSocket
clientlist[tempnick]->chans[i].channel = NULL;
clientlist[tempnick]->chans[i].uc_modes = 0;
}
+ WriteOpers("*** Client connecting at %s: %s!%s@%s [%s]",client[tempnick]->server,client[tempnick]->nick,client[tempnick]->ident,client[tempnick]->host,client[tempnick]->ip);
params[7] = ":" + params[7];
DoOneToAllButSender(source,"NICK",params,source);
return true;
@@ -2228,13 +2229,15 @@ class ModuleSpanningTree : public Module
virtual bool HandleStats(char ** parameters, int pcnt, userrec* user)
{
- if (*parameters[0] == 'c')
+ if (*parameters[0] == 'c')
{
- for (int i = 0; i < LinkBlocks.size(); i++)
- {
- WriteServ(user->fd,"213 %s C *@%s * %s %d 0 M",user->nick,LinkBlocks[i].IPAddr,LinkBlocks[i].Name,LinkBlocks[i].Port);
- WriteServ(user->fd,"244 %s H * * %s",user->nick,LinkBlocks[i].Name);
+ for (unsigned int i = 0; i < LinkBlocks.size(); i++)
+ {
+ WriteServ(user->fd,"213 %s C *@%s * %s %d 0 M",user->nick,LinkBlocks[i].IPAddr.c_str(),LinkBlocks[i].Name.c_str(),LinkBlocks[i].Port);
+ WriteServ(user->fd,"244 %s H * * %s",user->nick,LinkBlocks[i].Name.c_str());
}
+ WriteServ(user->fd,"219 %s %s :End of /STATS report",user->nick,parameters[0]);
+ WriteOpers("*** Notice: Stats '%s' requested by %s (%s@%s)",parameters[0],user->nick,user->ident,user->host);
return true;
}
return false;