void *args[2];
if ((np=getnickbynumeric(numeric&CU_NUMERICMASK))==NULL) {
- Error("channel",ERR_ERROR,"Trying to remove non-existent nick %d from channel %s",numeric,cp->index->name);
+ Error("channel",ERR_ERROR,"Trying to remove non-existent nick %lu from channel %s",numeric,cp->index->name->content);
return;
}
continue;
if ((np=getnickbynumeric(cp->users->content[i]))==NULL) {
- Error("channel",ERR_ERROR,"Found unknown numeric %u on channel %s",cp->users->content[i],cp->index->name->content);
+ Error("channel",ERR_ERROR,"Found unknown numeric %lu on channel %s",cp->users->content[i],cp->index->name->content);
continue;
}
return count;
}
+/*
+ * clean_key: returns a "cleaned" version of the key like ircu does.
+ *
+ * Note that s is a signed char, so we are basically allowing everything from 33-127 except : or ,
+ *
+ * Unlike ircu we don't check against KEYLEN here, this is done elsewhere.
+ */
+void clean_key(char *key) {
+ for (;*key;key++) {
+ if (*key<=32 || *key==':' || *key==',') {
+ *key=0;
+ return;
+ }
+ }
+}