diff --git a/extensions/m_webirc.c b/extensions/m_webirc.c index 43d3c273..2fce29d0 100644 --- a/extensions/m_webirc.c +++ b/extensions/m_webirc.c @@ -130,6 +130,9 @@ mr_webirc(struct Client *client_p, struct Client *source_p, int parc, const char } } + /* Set UMODE_WEBCLIENT */ + source_p->umodes = source_p->umodes | UMODE_WEBCLIENT; + sendto_one(source_p, "NOTICE * :CGI:IRC host/IP set to %s %s", parv[3], parv[4]); return 0; } diff --git a/help/opers/umode b/help/opers/umode index cdae8a93..7c8e911b 100644 --- a/help/opers/umode +++ b/help/opers/umode @@ -28,3 +28,4 @@ User modes: (* designates that the umode is oper only) +I - Prevents non-opers from seeing your channel list in a whois query. +Z - Is connected via SSL (set only on connection). + +W - Is connected via a web client (set only on connection). diff --git a/help/users/umode b/help/users/umode index 519e5b1f..3ed44150 100644 --- a/help/users/umode +++ b/help/users/umode @@ -22,3 +22,4 @@ User modes: (? designates that the umode is provided by an extension anyone who's in a common channel with you to message you. +V - Prevents you from receiving invites. +Z - Is connected via SSL (set only on connection). + +W - Is connected via a web client (set only on connection). diff --git a/include/client.h b/include/client.h index 70fd0d14..1da2f14c 100644 --- a/include/client.h +++ b/include/client.h @@ -425,6 +425,7 @@ struct ListClient { #define UMODE_OPER 0x1000 /* Operator */ #define UMODE_ADMIN 0x2000 /* Admin on server */ #define UMODE_SSLCLIENT 0x4000 /* using SSL */ +#define UMODE_WEBCLIENT 0x100000 /* user is connected via a web client */ #define UMODE_OVERRIDE 0x20000 /* able to override */ #define IsOverride(x) ((x)->umodes & UMODE_OVERRIDE) diff --git a/include/numeric.h b/include/numeric.h index 123ea1fb..e8709165 100644 --- a/include/numeric.h +++ b/include/numeric.h @@ -330,6 +330,7 @@ extern const char *form_str(int); #define ERR_HELPNOTFOUND 524 #define RPL_WHOISSECURE 671 /* Unreal3.2 --nenolod */ +#define RPL_WHOISWEBIRC 672 /* plexus -- Xe */ #define RPL_MODLIST 702 #define RPL_ENDOFMODLIST 703 diff --git a/modules/m_whois.c b/modules/m_whois.c index eef1d4bf..42dd4b8b 100644 --- a/modules/m_whois.c +++ b/modules/m_whois.c @@ -313,6 +313,12 @@ single_whois(struct Client *source_p, struct Client *target_p, int operspy) if(IsSSLClient(target_p)) sendto_one_numeric(source_p, RPL_WHOISSECURE, form_str(RPL_WHOISSECURE), target_p->name); + + if(!(target_p->umodes & UMODE_WEBCLIENT)) { + sendto_one_numeric(source_p, RPL_WHOISWEBIRC, form_str(RPL_WHOISWEBIRC), + target_p->name); + } + if((source_p == target_p || IsOper(source_p)) && target_p->certfp != NULL) sendto_one_numeric(source_p, RPL_WHOISCERTFP, diff --git a/src/messages.tab b/src/messages.tab index dfc5e548..d87faa2f 100644 --- a/src/messages.tab +++ b/src/messages.tab @@ -693,7 +693,7 @@ static const char * replies[] = { /* 669 */ NULL, /* 670 */ NULL, /* 671 RPL_WHOISSECURE, */ "%s :is using a secure connection", -/* 672 */ NULL, +/* 672 RPL_WHOISWEBIRC, */ "%s :is using a web IRC client", /* 673 */ NULL, /* 674 */ NULL, /* 675 */ NULL, diff --git a/src/s_user.c b/src/s_user.c index b7295cdf..be4383d6 100644 --- a/src/s_user.c +++ b/src/s_user.c @@ -88,7 +88,7 @@ int user_modes[256] = { 0, /* T */ 0, /* U */ UMODE_NOINVITE, /* V */ - 0, /* W */ + UMODE_WEBCLIENT, /* W */ 0, /* X */ 0, /* Y */ UMODE_SSLCLIENT, /* Z */ @@ -1011,13 +1011,14 @@ user_mode(struct Client *client_p, struct Client *source_p, int parc, const char } break; - /* we may not get these, - * but they shouldnt be in default - */ + /* we may not get these, + * but they shouldnt be in default + */ - /* can only be set on burst */ + /* can only be set on burst */ case 'S': case 'Z': + case 'W': case ' ': case '\n': case '\r': @@ -1046,7 +1047,7 @@ user_mode(struct Client *client_p, struct Client *source_p, int parc, const char source_p->umodes &= ~UMODE_SERVNOTICE; break; } - /* FALLTHROUGH */ + /* FALLTHROUGH */ default: if (MyConnect(source_p) && *pm == 'Q' && !ConfigChannel.use_forward) { badflag = YES;