* +------------------------------------+
*
* InspIRCd is copyright (C) 2002-2006 ChatSpike-Dev.
- * E-mail:
- * <brain@chatspike.net>
- * <Craig@chatspike.net>
+ * E-mail:
+ * <brain@chatspike.net>
+ * <Craig@chatspike.net>
*
* Written by Craig Edwards, Craig McLure, and others.
* This program is free but copyrighted software; see
- * the file COPYING for details.
+ * the file COPYING for details.
*
* ---------------------------------------------------
*/
/* $ModDesc: Provides support for an SAQUIT command, exits user with a reason */
-Server *Srv;
+static Server *Srv;
class cmd_saquit : public command_t
{
cmd_saquit () : command_t("SAQUIT",'o',2)
{
this->source = "m_saquit.so";
+ syntax = "<nick> <reason>";
}
- void Handle (char **parameters, int pcnt, userrec *user)
+ void Handle (const char** parameters, int pcnt, userrec *user)
{
userrec* dest = Srv->FindNick(std::string(parameters[0]));
if (dest)
{
+ if (Srv->IsUlined(dest->server))
+ {
+ WriteServ(user->fd,"990 %s :Cannot use an SA command on a u-lined client",user->nick);
+ return;
+ }
std::string line = "";
for (int i = 1; i < pcnt - 1; i++)
{