extern void construct_noparam_modes(void);
extern void find_orphaned_cflags(void);
extern unsigned int find_cflag_slot(void);
+extern char cflagsbuf[256];
+extern char cflagsmyinfo[256];
#endif
static int mode_limit_simple;
static int mask_pos;
+char cflagsbuf[256];
+char cflagsmyinfo[256];
+
int chmode_flags[256];
/* OPTIMIZE ME! -- dwr */
void
construct_noparam_modes(void)
{
int i;
+ char *ptr = cflagsbuf;
+ char *ptr2 = cflagsmyinfo;
static int prev_chmode_flags[256];
+
+ *ptr = '\0';
+ *ptr2 = '\0';
for(i = 0; i < 256; i++)
{
}
else
prev_chmode_flags[i] = chmode_flags[i];
+
+ switch (chmode_flags[i])
+ {
+ case MODE_EXLIMIT:
+ case MODE_DISFORWARD:
+ if(ConfigChannel.use_forward)
+ {
+ *ptr++ = (char) i;
+ }
+
+ break;
+ case MODE_REGONLY:
+ if(rb_dlink_list_length(&service_list))
+ {
+ *ptr++ = (char) i;
+ }
+
+ break;
+ default:
+ if(chmode_flags[i] != 0)
+ {
+ *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))
+ {
+ *ptr2++ = (char) i;
+ }
}
+
+ *ptr++ = '\0';
+ *ptr2++ = '\0';
}
/*
/* 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 biklmnopstveqrcgzjfILPQF bkloveqjfI",
+/* 004 RPL_MYINFO, */ "%s %s %s %s bkloveqjfI",
/* 005 RPL_ISUPPORT, */ "%s :are supported by this server",
/* 006 */ NULL,
/* 007 */ NULL,
#include "snomask.h"
#include "blacklist.h"
#include "substitution.h"
+#include "chmode.h"
static void report_and_set_user_flags(struct Client *, struct ConfItem *);
void user_welcome(struct Client *source_p);
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);
+ sendto_one_numeric(source_p, RPL_MYINFO, form_str(RPL_MYINFO), me.name, ircd_version, umodebuf, cflagsmyinfo);
show_isupport(source_p);
#include "ircd.h"
#include "s_conf.h"
#include "supported.h"
+#include "chmode.h"
rb_dlink_list isupportlist;
{
static char result[80];
- rb_snprintf(result, sizeof result, "%s%sbq,k,%slj,imnpst%scgzLP%s",
+ rb_snprintf(result, sizeof result, "%s%sbq,k,%slj,%s",
ConfigChannel.use_except ? "e" : "",
ConfigChannel.use_invex ? "I" : "",
ConfigChannel.use_forward ? "f" : "",
- rb_dlink_list_length(&service_list) ? "r" : "",
- ConfigChannel.use_forward ? "QF" : "");
+ cflagsbuf);
return result;
}