From 3eb54dca416a658380a2395da46afff2e8b4d453 Mon Sep 17 00:00:00 2001 From: brain Date: Thu, 31 Aug 2006 22:27:54 +0000 Subject: 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 --- src/cmd_quit.cpp | 15 +++++++++++---- 1 file changed, 11 insertions(+), 4 deletions(-) (limited to 'src') 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")); -- cgit v1.2.3