diff options
author | michael <michael@82007160-df01-0410-b94d-b575c5fd34c7> | 2013-11-20 20:46:43 +0000 |
---|---|---|
committer | michael <michael@82007160-df01-0410-b94d-b575c5fd34c7> | 2013-11-20 20:46:43 +0000 |
commit | 5c8569a24c2580068dfb768bf5e7fb0c383c20b3 (patch) | |
tree | 1bc1c98c768184c7be34f192f99aaa5fa6b483e9 | |
parent | b44c3fa0e4232b6e42db4e25c64fffbd29d1e174 (diff) |
- Better distinguishing between usermode +g and +G in both /whois and /privmsg
as suggested by Adam <adam@anope.org>
git-svn-id: svn://svn.ircd-hybrid.org/svnroot/ircd-hybrid/branches/8.1.x@2579 82007160-df01-0410-b94d-b575c5fd34c7
-rw-r--r-- | modules/core/m_message.c | 10 | ||||
-rw-r--r-- | modules/m_whois.c | 10 | ||||
-rw-r--r-- | src/numeric.c | 4 |
3 files changed, 18 insertions, 6 deletions
diff --git a/modules/core/m_message.c b/modules/core/m_message.c index 04c34aa..9ef0dea 100644 --- a/modules/core/m_message.c +++ b/modules/core/m_message.c @@ -545,11 +545,16 @@ msg_client(int p_or_n, const char *command, struct Client *source_p, } else { + int callerid = !!HasUMode(target_p, UMODE_CALLERID); + /* check for accept, flag recipient incoming message */ if (p_or_n != NOTICE) sendto_one(source_p, form_str(RPL_TARGUMODEG), ID_or_name(&me, source_p->from), - ID_or_name(source_p, source_p->from), target_p->name); + ID_or_name(source_p, source_p->from), target_p->name, + callerid ? "+g" : "+G", + callerid ? "server side ignore" : + "server side ignore with the exception of common channels"); if ((target_p->localClient->last_caller_id_time + ConfigFileEntry.caller_id_wait) < CurrentTime) @@ -561,7 +566,8 @@ msg_client(int p_or_n, const char *command, struct Client *source_p, sendto_one(target_p, form_str(RPL_UMODEGMSG), me.name, target_p->name, - get_client_name(source_p, HIDE_IP)); + get_client_name(source_p, HIDE_IP), + callerid ? "+g" : "+G"); target_p->localClient->last_caller_id_time = CurrentTime; diff --git a/modules/m_whois.c b/modules/m_whois.c index c68647d..9f62a58 100644 --- a/modules/m_whois.c +++ b/modules/m_whois.c @@ -120,9 +120,15 @@ whois_person(struct Client *source_p, struct Client *target_p) me.name, source_p->name, target_p->name, target_p->away); - if (HasUMode(target_p, UMODE_CALLERID) && !HasUMode(target_p, UMODE_SOFTCALLERID)) + if (HasUMode(target_p, UMODE_CALLERID|UMODE_SOFTCALLERID)) + { + int callerid = !!HasUMode(target_p, UMODE_CALLERID); sendto_one(source_p, form_str(RPL_TARGUMODEG), - me.name, source_p->name, target_p->name); + me.name, source_p->name, target_p->name, + callerid ? "+g" : "+G", + callerid ? "server side ignore" : + "server side ignore with the exception of common channels"); + } if (HasUMode(target_p, UMODE_OPER)) if (!HasUMode(target_p, UMODE_HIDDEN) || HasUMode(source_p, UMODE_OPER)) diff --git a/src/numeric.c b/src/numeric.c index 4b09622..f5240a8 100644 --- a/src/numeric.c +++ b/src/numeric.c @@ -747,9 +747,9 @@ static const char *const replies[] = { /* 713 ERR_CHANOPEN */ ":%s 713 %s %s :Channel is open.", /* 714 ERR_KNOCKONCHAN */ ":%s 714 %s %s :You are already on that channel.", /* 715 */ NULL, -/* 716 RPL_TARGUMODEG */ ":%s 716 %s %s :is in +g mode (server side ignore)", +/* 716 RPL_TARGUMODEG */ ":%s 716 %s %s :is in %s mode (%s)", /* 717 RPL_TARGNOTIFY */ ":%s 717 %s %s :has been informed that you messaged them.", -/* 718 RPL_UMODEGMSG */ ":%s 718 %s %s :is messaging you, and you are umode +g.", +/* 718 RPL_UMODEGMSG */ ":%s 718 %s %s :is messaging you, and you are umode %s.", /* 719 */ NULL, /* 720 */ NULL, /* 721 */ NULL, |