diff options
-rw-r--r-- | doc/modes.txt | 1 | ||||
-rw-r--r-- | help/umode | 1 | ||||
-rw-r--r-- | include/client.h | 4 | ||||
-rw-r--r-- | include/numeric.h | 1 | ||||
-rw-r--r-- | modules/m_svsmode.c | 1 | ||||
-rw-r--r-- | modules/m_webirc.c | 1 | ||||
-rw-r--r-- | modules/m_whois.c | 5 | ||||
-rw-r--r-- | src/numeric.c | 2 | ||||
-rw-r--r-- | src/s_user.c | 3 |
9 files changed, 16 insertions, 3 deletions
diff --git a/doc/modes.txt b/doc/modes.txt index ca6c4fd..90f20ac 100644 --- a/doc/modes.txt +++ b/doc/modes.txt @@ -36,6 +36,7 @@ User Modes: +S - ssl - Client is connected via SSL/TLS +u - unauth - See unauthorized client notices +w - wallop - See server generated WALLOPS ++W - webirc - User is connected using a webirc gateway +x - hiddenhost - User's host has been spoofed by services. This mode can be set by servers and services only. +y - spy - See LINKS, STATS (if configured), TRACE notices @@ -8,6 +8,7 @@ Usermodes: (* designates that the umode is oper only) Use the /oper command to attain this. +i - Designates this client 'invisible'. * +w - Can see server wallops. + +W - User is connected using a webirc gateway. * +z - Can see oper wallops. * +l - Can see oper locops (local wallops). * +c - Can see client connections and exits. diff --git a/include/client.h b/include/client.h index 436f6d3..a80cb43 100644 --- a/include/client.h +++ b/include/client.h @@ -163,6 +163,7 @@ #define UMODE_FARCONNECT 0x00800000 /**< Can see remote client connects/exits */ #define UMODE_HIDDENHOST 0x01000000 /**< User's host is hidden */ #define UMODE_SSL 0x02000000 /**< User is connected via TLS/SSL */ +#define UMODE_WEBIRC 0x04000000 /**< User connected via a webirc gateway */ #define UMODE_ALL UMODE_SERVNOTICE @@ -173,7 +174,8 @@ #define SEND_UMODES (UMODE_INVISIBLE | UMODE_OPER | UMODE_WALLOP |\ UMODE_REGONLY | UMODE_REGISTERED | UMODE_ADMIN |\ - UMODE_HIDDEN | UMODE_HIDDENHOST | UMODE_SSL) + UMODE_HIDDEN | UMODE_HIDDENHOST | UMODE_SSL |\ + UMODE_WEBIRC) diff --git a/include/numeric.h b/include/numeric.h index 2a9efad..abdcd5e 100644 --- a/include/numeric.h +++ b/include/numeric.h @@ -138,6 +138,7 @@ extern const char *form_str(unsigned int); #define RPL_NOTOPIC 331 #define RPL_TOPIC 332 #define RPL_TOPICWHOTIME 333 +#define RPL_WHOISTEXT 337 #define RPL_WHOISACTUALLY 338 #define RPL_INVITING 341 #define RPL_INVITELIST 346 diff --git a/modules/m_svsmode.c b/modules/m_svsmode.c index 851629e..4db45d1 100644 --- a/modules/m_svsmode.c +++ b/modules/m_svsmode.c @@ -145,6 +145,7 @@ ms_svsmode(struct Client *client_p, struct Client *source_p, break; case 'S': /* Only servers may set +S in a burst */ + case 'W': /* Only servers may set +W in a burst */ break; default: diff --git a/modules/m_webirc.c b/modules/m_webirc.c index 2aa710a..1fbe4c6 100644 --- a/modules/m_webirc.c +++ b/modules/m_webirc.c @@ -149,6 +149,7 @@ mr_webirc(struct Client *client_p, struct Client *source_p, int parc, char *parv } } + AddUMode(source_p, UMODE_WEBIRC); sendto_one(source_p, ":%s NOTICE %s :CGI:IRC host/IP set to %s %s", me.name, source_p->name[0] ? source_p->name : "*", parv[3], parv[4]); } diff --git a/modules/m_whois.c b/modules/m_whois.c index 74149a5..e01901b 100644 --- a/modules/m_whois.c +++ b/modules/m_whois.c @@ -129,6 +129,11 @@ whois_person(struct Client *source_p, struct Client *target_p) RPL_WHOISOPERATOR), me.name, source_p->name, target_p->name); + if (HasUMode(target_p, UMODE_WEBIRC)) + sendto_one(source_p, form_str(RPL_WHOISTEXT), + me.name, source_p->name, target_p->name, + "User connected using a webirc gateway"); + if (target_p->sockhost[0] && strcmp(target_p->sockhost, "0")) { if (HasUMode(source_p, UMODE_ADMIN) || source_p == target_p) diff --git a/src/numeric.c b/src/numeric.c index 71ca857..78a6420 100644 --- a/src/numeric.c +++ b/src/numeric.c @@ -364,7 +364,7 @@ static const char *const replies[] = { /* 334 */ NULL, /* 335 */ NULL, /* 336 */ NULL, -/* 337 */ NULL, +/* 338 RPL_WHOISTEXT */ ":%s 337 %s %s :%s", /* 338 RPL_WHOISACTUALLY */ ":%s 338 %s %s %s :actually using host", /* 339 */ NULL, /* 340 */ NULL, diff --git a/src/s_user.c b/src/s_user.c index f7d6bd4..30d54f9 100644 --- a/src/s_user.c +++ b/src/s_user.c @@ -105,7 +105,7 @@ const unsigned int user_modes[256] = 0, /* T */ 0, /* U */ 0, /* V */ - 0, /* W */ + UMODE_WEBIRC, /* W */ 0, /* X */ 0, /* Y */ 0, /* Z 0x5A */ @@ -894,6 +894,7 @@ set_user_mode(struct Client *client_p, struct Client *source_p, break; case 'S': /* Only servers may set +S in a burst */ + case 'W': /* Only servers may set +W in a burst */ case 'r': /* Only services may set +r */ case 'x': /* Only services may set +x */ break; |