summaryrefslogtreecommitdiff
path: root/modules/commands
diff options
context:
space:
mode:
authorAdam <Adam@anope.org>2012-10-30 21:22:10 -0400
committerAdam <Adam@anope.org>2012-10-30 21:22:10 -0400
commit1730bfb2bc2a664f6b555152c1251384669ee661 (patch)
treee6f1f8a9a5d18ef5afe28beb841e6fb298c8b349 /modules/commands
parent26a4a13cdff2933b77da986ccc38f3538beaaea7 (diff)
Send uids everywhere when setting modes on clients
Diffstat (limited to 'modules/commands')
-rw-r--r--modules/commands/cs_clone.cpp4
-rw-r--r--modules/commands/cs_mode.cpp8
-rw-r--r--modules/commands/cs_modes.cpp4
-rw-r--r--modules/commands/cs_register.cpp4
-rw-r--r--modules/commands/os_mode.cpp7
5 files changed, 15 insertions, 12 deletions
diff --git a/modules/commands/cs_clone.cpp b/modules/commands/cs_clone.cpp
index bbc06c7be..aef48ea4c 100644
--- a/modules/commands/cs_clone.cpp
+++ b/modules/commands/cs_clone.cpp
@@ -75,9 +75,9 @@ public:
{
/* On most ircds you do not receive the admin/owner mode till its registered */
if ((cm = ModeManager::FindChannelModeByName(CMODE_OWNER)))
- target_ci->c->SetMode(NULL, cm, u->nick);
+ target_ci->c->SetMode(NULL, cm, u->GetUID());
else if ((cm = ModeManager::FindChannelModeByName(CMODE_PROTECT)))
- target_ci->c->RemoveMode(NULL, cm, u->nick);
+ target_ci->c->RemoveMode(NULL, cm, u->GetUID());
}
/* Mark the channel as persistent */
diff --git a/modules/commands/cs_mode.cpp b/modules/commands/cs_mode.cpp
index 6b8df2cc9..840912aaf 100644
--- a/modules/commands/cs_mode.cpp
+++ b/modules/commands/cs_mode.cpp
@@ -280,9 +280,9 @@ class CommandCSMode : public Command
if (Anope::Match(uc->user->GetMask(), param))
{
if (adding)
- ci->c->SetMode(NULL, cm, uc->user->nick);
+ ci->c->SetMode(NULL, cm, uc->user->GetUID());
else
- ci->c->RemoveMode(NULL, cm, uc->user->nick);
+ ci->c->RemoveMode(NULL, cm, uc->user->GetUID());
}
}
}
@@ -303,9 +303,9 @@ class CommandCSMode : public Command
}
if (adding)
- ci->c->SetMode(NULL, cm, param);
+ ci->c->SetMode(NULL, cm, target->GetUID());
else
- ci->c->RemoveMode(NULL, cm, param);
+ ci->c->RemoveMode(NULL, cm, target->GetUID());
}
break;
}
diff --git a/modules/commands/cs_modes.cpp b/modules/commands/cs_modes.cpp
index b398e1e8e..2775e92bc 100644
--- a/modules/commands/cs_modes.cpp
+++ b/modules/commands/cs_modes.cpp
@@ -55,9 +55,9 @@ class CommandModeBase : public Command
else
{
if (set)
- c->SetMode(NULL, cm, u2->nick);
+ c->SetMode(NULL, cm, u2->GetUID());
else
- c->RemoveMode(NULL, cm, u2->nick);
+ c->RemoveMode(NULL, cm, u2->GetUID());
Log(LOG_COMMAND, source, com, ci) << "for " << u2->nick;
}
diff --git a/modules/commands/cs_register.cpp b/modules/commands/cs_register.cpp
index 7528a96c0..28fb931f5 100644
--- a/modules/commands/cs_register.cpp
+++ b/modules/commands/cs_register.cpp
@@ -85,9 +85,9 @@ class CommandCSRegister : public Command
{
/* On most ircds you do not receive the admin/owner mode till its registered */
if ((cm = ModeManager::FindChannelModeByName(CMODE_OWNER)))
- c->SetMode(NULL, cm, u->nick);
+ c->SetMode(NULL, cm, u->GetUID());
else if ((cm = ModeManager::FindChannelModeByName(CMODE_PROTECT)))
- c->RemoveMode(NULL, cm, u->nick);
+ c->RemoveMode(NULL, cm, u->GetUID());
}
/* Mark the channel as persistent */
diff --git a/modules/commands/os_mode.cpp b/modules/commands/os_mode.cpp
index 67ef1c8d4..a0195d497 100644
--- a/modules/commands/os_mode.cpp
+++ b/modules/commands/os_mode.cpp
@@ -61,23 +61,26 @@ class CommandOSMode : public Command
if (!cm)
continue;
- Anope::string param;
+ Anope::string param, param_log;
if (cm->Type != MODE_REGULAR)
{
if (!sep.GetToken(param))
continue;
+ param_log = param;
+
if (cm->Type == MODE_STATUS)
{
User *targ = finduser(param);
if (targ == NULL || c->FindUser(targ) == NULL)
continue;
+ param = targ->GetUID();
}
}
log_modes += cm->ModeChar;
if (!param.empty())
- log_params += " " + param;
+ log_params += " " + param_log;
if (add)
c->SetMode(source.service, cm, param, false);