ViewVC Help
View File | Revision Log | Show Annotations | View Changeset | Root Listing
root/svn/ircd-hybrid/branches/8.2.x/modules/m_svsnick.c
(Generate patch)

Comparing:
ircd-hybrid/trunk/modules/m_svsnick.c (file contents), Revision 3347 by michael, Sun Apr 20 14:03:06 2014 UTC vs.
ircd-hybrid/branches/8.2.x/modules/m_svsnick.c (file contents), Revision 4564 by michael, Sun Aug 24 10:24:47 2014 UTC

# Line 16 | Line 16
16   *
17   *  You should have received a copy of the GNU General Public License
18   *  along with this program; if not, write to the Free Software
19 < *  Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA  02111-1307
19 > *  Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301
20   *  USA
21   */
22  
# Line 63 | Line 63 | ms_svsnick(struct Client *source_p, int
63    if (!HasFlag(source_p, FLAGS_SERVICE) || !valid_nickname(parv[2], 1))
64      return 0;
65  
66  if (hunt_server(source_p, ":%s SVSNICK %s %s :%s",
67                  1, parc, parv) != HUNTED_ISME)
68    return 0;
69
66    if ((target_p = find_person(source_p, parv[1])) == NULL)
67      return 0;
68  
69 <  assert(MyClient(target_p));
69 >  if (!MyConnect(target_p))
70 >  {
71 >    if (target_p->from == source_p->from)
72 >    {
73 >      sendto_realops_flags(UMODE_DEBUG, L_ALL, SEND_NOTICE,
74 >                           "Received wrong-direction SVSNICK "
75 >                           "for %s (behind %s) from %s",
76 >                           target_p->name, source_p->from->name,
77 >                           get_client_name(source_p, HIDE_IP));
78 >      return 0;
79 >    }
80 >
81 >    sendto_one(target_p, ":%s SVSNICK %s %s %s", source_p->id,
82 >               target_p->id, parv[2], parv[3]);
83 >    return 0;
84 >  }
85  
86    if ((exists_p = hash_find_client(parv[2])))
87    {
# Line 98 | Line 109 | ms_svsnick(struct Client *source_p, int
109      char modebuf[IRCD_BUFSIZE] = "";
110  
111      DelUMode(target_p, UMODE_REGISTERED);
112 <    send_umode(target_p, target_p, oldmodes, 0xffffffff, modebuf);
112 >    send_umode(target_p, target_p, oldmodes, modebuf);
113    }
114  
115    sendto_common_channels_local(target_p, 1, 0, ":%s!%s@%s NICK :%s",
# Line 121 | Line 132 | ms_svsnick(struct Client *source_p, int
132  
133   static struct Message svsnick_msgtab =
134   {
135 <  "SVSNICK", 0, 0, 4, MAXPARA, MFLG_SLOW, 0,
136 <  {m_ignore, m_ignore, ms_svsnick, m_ignore, m_ignore, m_ignore}
135 >  "SVSNICK", NULL, 0, 0, 4, MAXPARA, MFLG_SLOW, 0,
136 >  { m_ignore, m_ignore, ms_svsnick, m_ignore, m_ignore, m_ignore }
137   };
138  
139   static void

Diff Legend

Removed lines
+ Added lines
< Changed lines (old)
> Changed lines (new)