1
0
mirror of https://github.com/anope/anope.git synced 2026-07-01 10:06:37 +02:00

Cleaned up some of the code in my last commit and made it a bit more consistant.. probably should have done this before but owell

git-svn-id: http://anope.svn.sourceforge.net/svnroot/anope/trunk@2592 5417fbe8-f217-4b02-8779-1006273d7864
This commit is contained in:
Adam-
2009-10-27 13:19:01 +00:00
parent 9e48e683e7
commit 52593ef71b
+9 -6
View File
@@ -1710,21 +1710,24 @@ void chan_set_correct_modes(User * user, Channel * c, int give_modes)
else
add_modes &= ~CUS_PROTECT;
if (op && (add_modes & CUS_OP) && !(status & CUS_OP)) {
if (op && (add_modes & CUS_OP) && !(status & CUS_OP))
{
modebuf += op->ModeChar;
userbuf += " " + std::string(user->nick);
}
else
add_modes &= ~CUS_OP;
if (halfop && (add_modes & CUS_HALFOP) && !(status & CUS_HALFOP)) {
if (halfop && (add_modes & CUS_HALFOP) && !(status & CUS_HALFOP))
{
modebuf += halfop->ModeChar;
userbuf += " " + std::string(user->nick);
}
else
add_modes &= ~CUS_HALFOP;
if ((add_modes & CUS_VOICE) && !(status & CUS_VOICE)) {
if (voice && (add_modes & CUS_VOICE) && !(status & CUS_VOICE))
{
modebuf += voice->ModeChar;
userbuf += " " + std::string(user->nick);
}
@@ -1741,19 +1744,19 @@ void chan_set_correct_modes(User * user, Channel * c, int give_modes)
userbuf += " " + std::string(user->nick);
}
if (rem_modes & CUS_PROTECT)
if (admin && rem_modes & CUS_PROTECT)
{
modebuf += admin->ModeChar;
userbuf += " " + std::string(user->nick);
}
if (rem_modes & CUS_OP)
if (op && rem_modes & CUS_OP)
{
modebuf += op->ModeChar;
userbuf += " " + std::string(user->nick);
}
if (rem_modes & CUS_HALFOP)
if (halfop && rem_modes & CUS_HALFOP)
{
modebuf += halfop->ModeChar;
userbuf += " " + std::string(user->nick);