dragonmtn-commits
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

[Dragonmtn-commits] Changes to snowwhite/nickserv.c


From: Mark Loeser
Subject: [Dragonmtn-commits] Changes to snowwhite/nickserv.c
Date: Tue, 12 Apr 2005 02:18:32 -0400

Index: snowwhite/nickserv.c
diff -u snowwhite/nickserv.c:1.6 snowwhite/nickserv.c:1.7
--- snowwhite/nickserv.c:1.6    Sat Apr  9 13:00:58 2005
+++ snowwhite/nickserv.c        Tue Apr 12 06:18:29 2005
@@ -9,7 +9,7 @@
  * \wd \taz \greg \mysid
  * \date 1996-2001
  *
- * $Id: nickserv.c,v 1.6 2005/04/09 13:00:58 Halcy0n Exp $
+ * $Id: nickserv.c,v 1.7 2005/04/12 06:18:29 Halcy0n Exp $
  */
 
 /*
@@ -225,7 +225,6 @@
   { "sendpass",                        ns_getpass,              0,     LOG_NO, 
CMD_REG },
   { "setpass",                 ns_setpass,              0,             LOG_DB, 
0 },
   { "setemail",                        ns_setemail,             0,     LOG_NO, 
CMD_REG },
-  { "realgetpass",             ns_getrealpass,  OOPER, LOG_NO, CMD_REG },
   { "delete",                  ns_delete,               OOPER, LOG_DB, CMD_REG 
},
   { "list",                            ns_list,                 OOPER, LOG_NO, 
CMD_REG },
   { "save",                            ns_save,                 OOPER, LOG_NO, 
CMD_REG },
@@ -5094,90 +5093,6 @@
 #endif
 
 /**
- * Debugging command, get password field bits from user structure
- * \deprecated Use of this command is deprecated
- */
-NCMD(ns_getrealpass)
-{
-       char *from = nick->nick;
-       RegNickList *targetNick;
-
-       if (addFlood(nick, 5))
-               return RET_KILLED;
-
-       if (numargs < 2) {
-               sSend(":%s NOTICE %s :You must specify a nick to getrealpass",
-                         NickServ, from);
-               return RET_SYNTAX;
-       }
-#ifdef ENABLE_GRPOPS
-       if (isRoot(nick) == 0 && isGRPop(nick) == 0)
-#else
-       if (isRoot(nick) == 0)
-#endif
-       {
-               PutReply(NickServ, nick, ERR_NOACCESS, 0, 0, 0);
-               return RET_NOPERM;
-       }
-
-       sSend(":%s NOTICE %s :Warning -- this command is deprecated.",
-                 NickServ, from);
-
-       targetNick = getRegNickData(args[1]);
-
-       if (targetNick == NULL)
-               sSend(":%s NOTICE %s :Nick %s is not registered", NickServ, 
from,
-                         args[1]);
-       else if (targetNick->flags & NMARK) {
-               if (targetNick->markby)
-                       sSend
-                               (":%s NOTICE %s :\2Important Note:\2 %s has 
been marked by %s -- you need to contact the setter before retrieving the 
password for the nick in question.",
-                                NickServ, from, targetNick->nick, 
targetNick->markby);
-               else
-                       sSend(":%s NOTICE %s :\2Important Note:\2 %s has been 
marked.",
-                                 NickServ, from, targetNick->nick);
-               return RET_OK;
-       }
-               else if (!opFlagged(nick, OROOT | OVERRIDE)
-                                && (targetNick->flags & NOSENDPASS)) {
-               sSend
-                       (":%s NOTICE %s :Nick %s has enabled the \2NOPWSEND\2 
option.",
-                        NickServ, from, args[1]);
-               return RET_EFAULT;
-       }
-               else if ((!isRoot(nick) && (targetNick->opflags & OROOT))
-                                || (!isServop(nick) && (targetNick->opflags & 
OSERVOP))) {
-               sSend
-                       (":%s NOTICE %s :Permission denied -- a GRPop may not 
GRP a user with root or servop privileges.",
-                        NickServ, from);
-               sSend(":%s GLOBOPS :address@hidden tries to getrealpass 
\2%s\2.",
-                         NickServ, from, nick->user, nick->host, args[1]);
-               operlog->log(nick, NS_GETREALPASS, args[1], RET_FAIL);
-               return RET_NOPERM;
-       } else {
-               if (!(targetNick->flags & NENCRYPT))
-                       sSend(":%s NOTICE %s :The password for %s is %s", 
NickServ, from,
-                                 targetNick->nick, targetNick->password);
-               else {
-                       u_char *p;
-
-                       sSend(":%s NOTICE %s :The password for %s is encrypted: 
%s", NickServ, from,
-                                 targetNick->nick, 
md5_printable(targetNick->password));
-                       p = toBase64(targetNick->password, 16);
-                       if (p != NULL) {
-                               sSend(":%s NOTICE %s :In Base64 format that is: 
$%s", NickServ, from,
-                                         p);
-                               FREE(p);
-                       }
-               }
-               sSend(":%s GLOBOPS :%s used getrealpass on %s", myname, from,
-                         args[1]);
-               operlog->log(nick, NS_GETREALPASS, args[1], 0);
-       }
-       return RET_OK;
-}
-
-/**
  * \nscmd Getpass
  * \syntax Getpass \<nick> { options }
  * \plr Send a password change authorization key to the user's e-mail




reply via email to

[Prev in Thread] Current Thread [Next in Thread]