* remote servers/users (ex: services) from setting them. Make sure
* your services and remote servers are properly configured when
* using this option!
+ * Valid parameters are: CLPFQITDENGJKMrczgqefj
*/
#disabledmodes = "ME";
extern void construct_cflags_strings(void);
extern char cflagsbuf[256];
extern char cflagsmyinfo[256];
+extern char cflagsparaminfo[256];
#endif
#include "chmode.h"
#include "irc_dictionary.h"
+
/* bitmasks for error returns, so we send once per call */
#define SM_ERR_NOTS 0x00000001 /* No TS on channel */
#define SM_ERR_NOOPS 0x00000002 /* No chan ops */
char cflagsbuf[256];
char cflagsmyinfo[256];
+char cflagsparaminfo[256];
int chmode_flags[256];
break;
default:
- if(chmode_flags[i] != 0)
+ if(chmode_flags[i] != 0 && !(chmode_table[i].set_func == chm_orphaned))
{
*ptr++ = (char) i;
}
}
/* Should we leave orphaned check here? -- dwr */
- if(!(chmode_table[i].set_func == chm_nosuch) && !(chmode_table[i].set_func == chm_orphaned))
+ if( !(chmode_table[i].set_func == chm_nosuch) &&
+ !(chmode_table[i].set_func == chm_orphaned) &&
+ !(chmode_table[i].set_func == chm_admin && !ConfigChannel.use_admin) &&
+ !(chmode_table[i].set_func == chm_halfop && !ConfigChannel.use_halfop))
{
*ptr2++ = (char) i;
}
*ptr2++ = '\0';
}
+void
+construct_cflag_param_string(void)
+{
+
+ *cflagsparaminfo = '\0';
+ rb_snprintf(cflagsparaminfo, sizeof cflagsparaminfo, "%sb%s%s%s%sklov%s%s",
+ ConfigChannel.use_admin ? "a" : "",
+ ConfigChannel.use_except ? "e" : "",
+ ConfigChannel.use_forward ? "f" : "",
+ ConfigChannel.use_halfop ? "h" : "",
+ strcasecmp(ConfigChannel.disabledmodes, "j") ? "" : "j",
+ strcasecmp(ConfigChannel.disabledmodes, "q") ? "" : "q",
+ ConfigChannel.use_invex ? "I" : "");
+}
+
/*
* find_umode_slot
*
/* 001 RPL_WELCOME, */ ":Welcome to the %s Internet Relay Chat Network %s",
/* 002 RPL_YOURHOST,*/ ":Your host is %s, running version %s",
/* 003 RPL_CREATED, */ ":This server was created %s",
-/* 004 RPL_MYINFO, */ "%s %s %s %s bkloveqjfI",
+/* 004 RPL_MYINFO, */ "%s %s %s %s %s",
/* 005 RPL_ISUPPORT, */ "%s :are supported by this server",
/* 006 */ NULL,
/* 007 */ NULL,
if(*dm == 'I')
{
cflag_orphan('I');
- ConfigChannel.use_invex = "NO";
+ ConfigChannel.use_invex = 0;
continue;
}
if(*dm == 'e')
{
cflag_orphan('e');
- ConfigChannel.use_except = "NO";
+ ConfigChannel.use_except = 0;
continue;
}
if(*dm == 'f')
{
cflag_orphan('f');
- ConfigChannel.use_forward = "NO";
+ ConfigChannel.use_forward = 0;
continue;
}
if(*dm == 'j')
}
}
}
+ construct_cflag_param_string();
startup = 0;
}
sendto_one_numeric(source_p, RPL_YOURHOST, form_str(RPL_YOURHOST),
get_listener_name(source_p->localClient->listener), ircd_version);
sendto_one_numeric(source_p, RPL_CREATED, form_str(RPL_CREATED), creation);
- sendto_one_numeric(source_p, RPL_MYINFO, form_str(RPL_MYINFO), me.name, ircd_version, umodebuf, cflagsmyinfo);
+ sendto_one_numeric(source_p, RPL_MYINFO, form_str(RPL_MYINFO), me.name, ircd_version, umodebuf, cflagsmyinfo, cflagsparaminfo);
show_isupport(source_p);
{
static char result[80];
- rb_snprintf(result, sizeof result, "%s%sbq,k,%slj,%s",
+ rb_snprintf(result, sizeof result, "%s%sb%s,k,%sl%s,%s",
ConfigChannel.use_except ? "e" : "",
ConfigChannel.use_invex ? "I" : "",
+ strcasecmp(ConfigChannel.disabledmodes, "q") ? "" : "q",
ConfigChannel.use_forward ? "f" : "",
+ strcasecmp(ConfigChannel.disabledmodes, "j") ? "" : "j",
cflagsbuf);
return result;
}