summaryrefslogtreecommitdiff
path: root/src
diff options
context:
space:
mode:
authorbrain <brain@e03df62e-2008-0410-955e-edbf42e46eb7>2006-08-31 22:27:54 +0000
committerbrain <brain@e03df62e-2008-0410-955e-edbf42e46eb7>2006-08-31 22:27:54 +0000
commit3eb54dca416a658380a2395da46afff2e8b4d453 (patch)
treef89761026476337279745663fab131d0acab1550 /src
parent76550ea8a94060c8ca96414ffb92cd58d7ec6f13 (diff)
Put some client quit stuff in cmd_quit into the Qq snomasks properly
git-svn-id: http://svn.inspircd.org/repository/trunk/inspircd@5093 e03df62e-2008-0410-955e-edbf42e46eb7
Diffstat (limited to 'src')
-rw-r--r--src/cmd_quit.cpp15
1 files changed, 11 insertions, 4 deletions
diff --git a/src/cmd_quit.cpp b/src/cmd_quit.cpp
index 19dbf9bf0..37d6147c4 100644
--- a/src/cmd_quit.cpp
+++ b/src/cmd_quit.cpp
@@ -41,12 +41,12 @@ void cmd_quit::Handle (const char** parameters, int pcnt, userrec *user)
if (IS_LOCAL(user))
{
user->Write("ERROR :Closing link (%s@%s) [%s%s]",user->ident,user->host,ServerInstance->Config->PrefixQuit,parameters[0]);
- ServerInstance->WriteOpers("*** Client exiting: %s!%s@%s [%s%s]",user->nick,user->ident,user->host,ServerInstance->Config->PrefixQuit,parameters[0]);
+ ServerInstance->SNO->WriteToSnoMask('q',"Client exiting: %s!%s@%s [%s%s]",user->nick,user->ident,user->host,ServerInstance->Config->PrefixQuit,parameters[0]);
user->WriteCommonExcept("QUIT :%s%s",ServerInstance->Config->PrefixQuit,parameters[0]);
}
else
{
- ServerInstance->WriteOpers("*** Client exiting at %s: %s!%s@%s [%s]",user->server,user->nick,user->ident,user->host,parameters[0]);
+ ServerInstance->SNO->WriteToSnoMask('q',"Client exiting at %s: %s!%s@%s [%s]",user->server,user->nick,user->ident,user->host,parameters[0]);
user->WriteCommonExcept("QUIT :%s",parameters[0]);
}
FOREACH_MOD(I_OnUserQuit,OnUserQuit(user,std::string(ServerInstance->Config->PrefixQuit)+std::string(parameters[0])));
@@ -54,8 +54,15 @@ void cmd_quit::Handle (const char** parameters, int pcnt, userrec *user)
}
else
{
- user->Write("ERROR :Closing link (%s@%s) [QUIT]",user->ident,user->host);
- ServerInstance->WriteOpers("*** Client exiting: %s!%s@%s [Client exited]",user->nick,user->ident,user->host);
+ if (IS_LOCAL(user))
+ {
+ user->Write("ERROR :Closing link (%s@%s) [QUIT]",user->ident,user->host);
+ ServerInstance->SNO->WriteToSnoMask('q',"Client exiting: %s!%s@%s [Client exited]",user->nick,user->ident,user->host);
+ }
+ else
+ {
+ ServerInstance->SNO->WriteToSnoMask('q',"Client exiting at %s: %s!%s@%s [Client exited]",user->server,user->nick,user->ident,user->host);
+ }
user->WriteCommonExcept("QUIT :Client exited");
FOREACH_MOD(I_OnUserQuit,OnUserQuit(user,"Client exited"));