- rb_snprintf(result, sizeof result, "&#:%i", ConfigChannel.max_chans_per_user);
+ rb_snprintf(result, sizeof result, "%s:%i",
+ ConfigChannel.use_local_channels ? "&#" : "#",
+ ConfigChannel.max_chans_per_user);
+ return result;
+}
+
+static const char*
+isupport_prefix(const void *ptr)
+{
+ static char result[11];
+
+ rb_snprintf(result, sizeof result, "(%so%sv)%s@%s+",
+ ConfigChannel.use_admin ? "a" : "",
+ ConfigChannel.use_halfop ? "h" : "",
+ ConfigChannel.use_admin ? "!" : "",
+ ConfigChannel.use_halfop ? "%" : "");