+/* re-allocates a nick in the user_hash after they change nicknames,
+ * returns a pointer to the new user as it may have moved */
+
+userrec* ReHashNick(char* Old, char* New)
+{
+ //user_hash::iterator newnick;
+ user_hash::iterator oldnick = clientlist.find(Old);
+
+ log(DEBUG,"ReHashNick: %s %s",Old,New);
+
+ if (!strcasecmp(Old,New))
+ {
+ log(DEBUG,"old nick is new nick, skipping");
+ return oldnick->second;
+ }
+
+ if (oldnick == clientlist.end()) return NULL; /* doesnt exist */