From a88e285baa753b5139e539ac3b7919dbdeb54386 Mon Sep 17 00:00:00 2001 From: brain Date: Fri, 15 Sep 2006 17:26:43 +0000 Subject: Improve notices, so that if SAJOIN fails it can tell the oper who issued it git-svn-id: http://svn.inspircd.org/repository/trunk/inspircd@5259 e03df62e-2008-0410-955e-edbf42e46eb7 --- src/modules/m_sajoin.cpp | 14 +++++++++++++- 1 file changed, 13 insertions(+), 1 deletion(-) (limited to 'src') diff --git a/src/modules/m_sajoin.cpp b/src/modules/m_sajoin.cpp index dee6746cd..b305033c9 100644 --- a/src/modules/m_sajoin.cpp +++ b/src/modules/m_sajoin.cpp @@ -62,10 +62,22 @@ class cmd_sajoin : public command_t chanrec* n = ServerInstance->FindChan(parameters[1]); if (n) { - return (n->HasUser(dest) ? CMD_SUCCESS : CMD_FAILURE); + if (n->HasUser(dest)) + { + ServerInstance->WriteOpers(std::string(user->nick)+" used SAJOIN to make "+std::string(dest->nick)+" join "+parameters[1]); + return CMD_SUCCESS; + } + else + { + user->WriteServ("NOTICE "+std::string(user->nick)+" :*** Could not join "+std::string(user->nick)+" to "+parameters[1]+" (User is probably banned, or blocking modes)"); + return CMD_FAILURE; + } } else + { + user->WriteServ("NOTICE "+std::string(user->nick)+" :*** Could not join "+std::string(user->nick)+" to "+parameters[1]); return CMD_FAILURE; + } } return CMD_SUCCESS; -- cgit v1.2.3