]> jfr.im git - solanum.git/blobdiff - ircd/capability.c
add SNO_FARCONNECT to the help text (#260)
[solanum.git] / ircd / capability.c
index f82821d9a027db90fc112dfc38f21f69e46295da..710bce106b63e1bfb7e50d34ef600267327debbf 100644 (file)
@@ -1,5 +1,5 @@
 /*
- * Copyright (c) 2012 William Pitcock <nenolod@dereferenced.org>.
+ * Copyright (c) 2012 Ariadne Conill <ariadne@dereferenced.org>.
  *
  * Permission to use, copy, modify, and/or distribute this software for any
  * purpose with or without fee is hereby granted, provided that the above
@@ -67,6 +67,11 @@ capability_put(struct CapabilityIndex *idx, const char *cap, void *ownerdata)
        if ((entry = rb_dictionary_retrieve(idx->cap_dict, cap)) != NULL)
        {
                entry->flags &= ~CAP_ORPHANED;
+               if (ownerdata != NULL)
+               {
+                       s_assert(entry->ownerdata == NULL);
+                       entry->ownerdata = ownerdata;
+               }
                return (1 << entry->value);
        }