Browse Source

* Fix long nicks not properly getting rotated

Bryan Drewery 16 năm trước cách đây
mục cha
commit
05e9e09c56
1 tập tin đã thay đổi với 5 bổ sung0 xóa
  1. 5 0
      src/mod/server.mod/servmsg.c

+ 5 - 0
src/mod/server.mod/servmsg.c

@@ -37,6 +37,11 @@ unsigned int rolls = 0;
 static void rotate_nick(char *nick, char *orignick)
 {
   size_t len = strlen(nick);
+  // Cap the len calcs at the max NICKLEN for this server
+  if (len > nick_len) {
+    len = nick_len;
+    nick[len] = 0;
+  }
   int use_chr = 1;
 
 #ifdef DEBUG