From: Michael Poole Date: Sat, 4 Nov 2006 21:42:00 +0000 (+0000) Subject: Do not accept NICK on server ports. X-Git-Url: http://git.pk910.de/?p=ircu2.10.12-pk.git;a=commitdiff_plain;h=1f6b088e22e5ca8add547fc5fc54d52c4fcf52b8 Do not accept NICK on server ports. git-svn-id: file:///home/klmitch/undernet-ircu/undernet-ircu-svn/ircu2/branches/u2_10_12_branch@1729 c9e4aea6-c8fd-4c43-8297-357d70d61c8c --- diff --git a/ChangeLog b/ChangeLog index 358c915..3f937d9 100644 --- a/ChangeLog +++ b/ChangeLog @@ -1,3 +1,8 @@ +2006-11-04 Michael Poole + + * ircd/m_nick.c (m_nick): If we get NICK on a server port, tell + the client to go away. + 2006-11-04 Michael Poole * ircd/version.c.SH: Skip version.c. diff --git a/ircd/m_nick.c b/ircd/m_nick.c index 2ac4fe8..b1fa7fd 100644 --- a/ircd/m_nick.c +++ b/ircd/m_nick.c @@ -151,6 +151,9 @@ int m_nick(struct Client* cptr, struct Client* sptr, int parc, char* parv[]) assert(0 != cptr); assert(cptr == sptr); + if (IsServerPort(cptr)) + return exit_client(cptr, cptr, &me, "Use a different port"); + /* * parv[0] will be empty for clients connecting for the first time */ @@ -160,6 +163,7 @@ int m_nick(struct Client* cptr, struct Client* sptr, int parc, char* parv[]) send_reply(sptr, ERR_NONICKNAMEGIVEN); return 0; } + /* * Don't let them send make us send back a really long string of * garbage