summaryrefslogtreecommitdiff
path: root/src/commands.cpp
diff options
context:
space:
mode:
authorbrain <brain@e03df62e-2008-0410-955e-edbf42e46eb7>2005-12-05 12:04:24 +0000
committerbrain <brain@e03df62e-2008-0410-955e-edbf42e46eb7>2005-12-05 12:04:24 +0000
commitab90b4872444191645b54fc0bb13b59b2c08af34 (patch)
treee66cfe2bface4a1a92affd9c1df9c05ca1ced1d6 /src/commands.cpp
parent215dced66877d2be891d300b1f74476e3b00dc4b (diff)
Fixed prefixquit to not prefix remote quits
git-svn-id: http://svn.inspircd.org/repository/trunk/inspircd@2193 e03df62e-2008-0410-955e-edbf42e46eb7
Diffstat (limited to 'src/commands.cpp')
-rw-r--r--src/commands.cpp18
1 files changed, 15 insertions, 3 deletions
diff --git a/src/commands.cpp b/src/commands.cpp
index c7c2b8e9a..81ff9cf00 100644
--- a/src/commands.cpp
+++ b/src/commands.cpp
@@ -902,9 +902,21 @@ void handle_quit(char **parameters, int pcnt, userrec *user)
reason[MAXQUIT-1] = '\0';
}
- Write(user->fd,"ERROR :Closing link (%s@%s) [%s%s]",user->ident,user->host,PrefixQuit,parameters[0]);
- WriteOpers("*** Client exiting: %s!%s@%s [%s%s]",user->nick,user->ident,user->host,PrefixQuit,parameters[0]);
- WriteCommonExcept(user,"QUIT :%s%s",PrefixQuit,parameters[0]);
+ /* We should only prefix the quit for a local user. Remote users have
+ * already been prefixed, where neccessary, by the upstream server.
+ */
+ if (!strcasecmp(user->server,ServerName))
+ {
+ Write(user->fd,"ERROR :Closing link (%s@%s) [%s%s]",user->ident,user->host,PrefixQuit,parameters[0]);
+ WriteOpers("*** Client exiting: %s!%s@%s [%s%s]",user->nick,user->ident,user->host,PrefixQuit,parameters[0]);
+ WriteCommonExcept(user,"QUIT :%s%s",PrefixQuit,parameters[0]);
+ }
+ else
+ {
+ Write(user->fd,"ERROR :Closing link (%s@%s) [%s]",user->ident,user->host,parameters[0]);
+ WriteOpers("*** Client exiting: %s!%s@%s [%s]",user->nick,user->ident,user->host,parameters[0]);
+ WriteCommonExcept(user,"QUIT :%s",parameters[0]);
+ }
FOREACH_MOD OnUserQuit(user,std::string(PrefixQuit)+std::string(parameters[0]));
}