summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorbrain <brain@e03df62e-2008-0410-955e-edbf42e46eb7>2005-04-28 20:23:12 +0000
committerbrain <brain@e03df62e-2008-0410-955e-edbf42e46eb7>2005-04-28 20:23:12 +0000
commitdb26f82ab0d9f95ffe690e2e4ac852c9f8e7a19a (patch)
tree977e76801b7e25b680bea2f94f96da54135c0054
parentceb22bce3d8a04e7951dd2e4fbb52f37135c3708 (diff)
Fixed remote /squit <mask>
git-svn-id: http://svn.inspircd.org/repository/trunk/inspircd@1250 e03df62e-2008-0410-955e-edbf42e46eb7
-rw-r--r--src/commands.cpp10
1 files changed, 6 insertions, 4 deletions
diff --git a/src/commands.cpp b/src/commands.cpp
index 00ee9a20f..c1d9f80ab 100644
--- a/src/commands.cpp
+++ b/src/commands.cpp
@@ -1551,6 +1551,7 @@ void handle_squit(char **parameters, int pcnt, userrec *user)
}
bool have_this_server = true;
int n_count = 0;
+ server_to_squit = "";
while (have_this_server)
{
have_this_server = false;
@@ -1564,6 +1565,7 @@ void handle_squit(char **parameters, int pcnt, userrec *user)
{
// found a valid ircd_connector.
have_this_server = true;
+ server_to_squit = me[j]->connectors[x].GetServerName().c_str();
break;
}
}
@@ -1571,12 +1573,12 @@ void handle_squit(char **parameters, int pcnt, userrec *user)
}
if (have_this_server)
{
- WriteOpers("SQUIT command issued by %s to remove %s from the mesh",user->nick,parameters[0]);
- WriteServ(user->fd,"NOTICE %s :*** Removing remote server %s.",user->nick,parameters[0]);
+ WriteOpers("SQUIT command issued by %s to remove %s from the mesh",user->nick,server_to_squit.c_str());
+ WriteServ(user->fd,"NOTICE %s :*** Removing remote server %s.",user->nick,server_to_squit.c_str());
char buffer[MAXBUF];
- snprintf(buffer,MAXBUF,"& %s",parameters[0]);
+ snprintf(buffer,MAXBUF,"& %s",server_to_squit.c_str());
NetSendToAll(buffer);
- DoSplit(parameters[0]);
+ DoSplit(server_to_squit.c_str());
n_count++;
}
}