implemented KICK command
[silc.git] / lib / silccore / id.c
index c531badce4cbe89208264f17be522a0a0371a42c..7cb854fc21e985784e1641a7142a85156d10923c 100644 (file)
@@ -131,3 +131,13 @@ unsigned int silc_id_get_len(SilcIdType type)
 
   return 0;
 }
+
+/* Duplicate ID data */
+
+void *silc_id_dup(void *id, SilcIdType type)
+{
+  int len = silc_id_get_len(type);
+  void *new = silc_calloc(1, len);
+  memcpy(new, id, len);
+  return new;
+}