[2.0] Fix some grammar errors #390

Closed
wants to merge 1 commit into
from

Projects

None yet

2 participants

@Shawn-Smith
Contributor

I've noticed that with network services, like NickServ/ChanServ/etc, there are some grammatical errors with the whois output from them, example: ChanServ is an ChatSpike Service

There's also repeated output if you have m_servprotect loaded, example:

ChanServ is an IRC operator
ChanServ is an ChatSpike Service

So, this update fixes that by checking to make sure the oper-name is not Services when outputting the is an IRC operator line, and then changes the services-line given by m_servprotect to the following:

ChanServ is a Network Service on ChatSpike

This hasn't been tested as I don't have a test-net with services enabled, if anybody could test it that would be great. It DOES compile.

@SaberUK
Contributor
SaberUK commented Jan 22, 2013

What about people who are not using m_servprotect who have oper blocks with 'Services' in their name? It seems like a violation of the principle of least surprise to not send the RPL_WHOISOPERATOR for these clients.

A better fix would just be to do something like this:

name[0] matches /aeiou/ ? "an" : "a"
@Shawn-Smith
Contributor

What about removing the whois line from m_servprotect entirely and sending the line below if the opertype is services?

ServerInstance->SendWhoisLine(user, dest, 310, "%s %s :is a Network Service on %s", user->nick.c_str(), dest->nick.c_str(), ServerInstance->Config->Network.c_str()

Edit :: Actually, I don't care how it's done, rewriting the line entirely or doing a match against /aeiou/, but it should be removed from m_servprotect and added to whois.cpp since you can have services without having that module loaded.

@Shawn-Smith
Contributor

Closing this and re-opening for 2.2

@Shawn-Smith Shawn-Smith closed this Apr 3, 2013
@Shawn-Smith Shawn-Smith deleted the Shawn-Smith:insp20+ServicesOper branch Apr 3, 2013
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment