From e587b9efef09ca2cbb8873dd8cb2941ad74bda42 Mon Sep 17 00:00:00 2001 From: brain Date: Tue, 20 Dec 2005 09:51:21 +0000 Subject: [PATCH] Fixed case-change nicks not being propogated git-svn-id: http://svn.inspircd.org/repository/trunk/inspircd@2583 e03df62e-2008-0410-955e-edbf42e46eb7 --- conf/inspircd.conf.example | 37 ++++++++++++------------------------- src/cmd_nick.cpp | 13 ++++++++++--- 2 files changed, 22 insertions(+), 28 deletions(-) diff --git a/conf/inspircd.conf.example b/conf/inspircd.conf.example index b77df99c1..ac48be1ee 100644 --- a/conf/inspircd.conf.example +++ b/conf/inspircd.conf.example @@ -240,29 +240,17 @@ # Defines which servers can link to this one, and which servers this # # server may create outbound links to. # # # -# name - The name is the canocial name of the server, it does# -# not have to resolve - but it is expected to be sent # -# in the remote servers connection info. # -# # -# ipaddr - Valid host or ip address for remote server. * # -# # -# port - Valid listening UDP port for remote server. # -# # -# sendpass - Password to send to create an outbound connection # -# to this server. # -# # -# recvpass - Password to receive to accept an inbound connection # -# from this server. # -# # -# autoconnect - Sets the server to autoconnect. x is the number # -# (optional) of seconds between attempts. 300 = 5 minutes # -# # -# encryptionkey - The encryption key to use to encrypt this link. # -# (optional) Applicable when using m_spanningtree.so, the key # -# must be EXACTLY 16, 24 or 32 characters long and # -# must match on both ends of the link. Each link may # -# have its own key so long as both ends of the link # -# use the same key string. # +# name - The name is the canocial name of the server, it does # +# not have to resolve - but it is expected to be sent # +# in the remote servers connection info. # +# ipaddr - Valid host or ip address for remote server. * # +# port - Valid listening UDP port for remote server. # +# sendpass - Password to send to create an outbound connection to # +# this server. # +# recvpass - Password to receive to accept an inbound connection # +# from this server. # +# autoconnect - Sets the server to autoconnect. Where x is the number # +# (optional) of seconds between attempts. 300 = 5 minutes # # # # to u:line a server (give it extra privilages required for running # # services, Q, etc) you must include the tag as shown # @@ -284,8 +272,7 @@ port="7000" autoconnect="300" sendpass="outgoing!password" - recvpass="incoming!password" - encryptionkey="0123456789123456"> + recvpass="incoming!password"> nick) == irc::string(parameters[0])) { - log(DEBUG,"old nick is new nick, skipping"); + log(DEBUG,"old nick is new nick, not updating hash (case change only)"); + strlcpy(oldnick,user->nick,NICKMAX); + int MOD_RESULT = 0; + FOREACH_RESULT(OnUserPreNick(user,parameters[0])); + if (MOD_RESULT) + return; strlcpy(user->nick,parameters[0],NICKMAX); if (user->registered == 7) WriteCommon(user,"NICK %s",parameters[0]); + FOREACH_MOD OnUserPostNick(user,oldnick); return; } else @@ -137,8 +145,7 @@ void cmd_nick::Handle (char **parameters, int pcnt, userrec *user) WriteCommon(user,"NICK %s",parameters[0]); } - - char oldnick[NICKMAX]; + strlcpy(oldnick,user->nick,NICKMAX); /* change the nick of the user in the users_hash */ -- 2.39.5