diff options
author | brain <brain@e03df62e-2008-0410-955e-edbf42e46eb7> | 2005-12-20 09:51:21 +0000 |
---|---|---|
committer | brain <brain@e03df62e-2008-0410-955e-edbf42e46eb7> | 2005-12-20 09:51:21 +0000 |
commit | e587b9efef09ca2cbb8873dd8cb2941ad74bda42 (patch) | |
tree | 35457482ec7f1b14212c7bf9dc3454b07ac339ae | |
parent | 53aaf31285c1168b1d0d1aca5e67b6323b0d0910 (diff) |
Fixed case-change nicks not being propogated
git-svn-id: http://svn.inspircd.org/repository/trunk/inspircd@2583 e03df62e-2008-0410-955e-edbf42e46eb7
-rw-r--r-- | conf/inspircd.conf.example | 37 | ||||
-rw-r--r-- | 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 <uline server> tag as shown # @@ -284,8 +272,7 @@ port="7000" autoconnect="300" sendpass="outgoing!password" - recvpass="incoming!password" - encryptionkey="0123456789123456"> + recvpass="incoming!password"> <link name="services.antarctic.com" ipaddr="localhost" diff --git a/src/cmd_nick.cpp b/src/cmd_nick.cpp index f35a8fd8c..33960463b 100644 --- a/src/cmd_nick.cpp +++ b/src/cmd_nick.cpp @@ -65,6 +65,8 @@ extern userrec* fd_ref_table[65536]; void cmd_nick::Handle (char **parameters, int pcnt, userrec *user) { + char oldnick[NICKMAX]; + if (pcnt < 1) { log(DEBUG,"not enough params for handle_nick"); @@ -92,10 +94,16 @@ void cmd_nick::Handle (char **parameters, int pcnt, userrec *user) } if (irc::string(user->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 */ |