summaryrefslogtreecommitdiff
path: root/src/mode.cpp
diff options
context:
space:
mode:
authorbrain <brain@e03df62e-2008-0410-955e-edbf42e46eb7>2008-05-19 21:16:42 +0000
committerbrain <brain@e03df62e-2008-0410-955e-edbf42e46eb7>2008-05-19 21:16:42 +0000
commit31f1e7ad092f8bf16ee653cc105eea4a769650ca (patch)
treedced0411d5fbe803fe92ea54cb03d36c0a817563 /src/mode.cpp
parent869bd02318d94a38369a125726b8edeb54ba0706 (diff)
Convert channel::name to std::string, this was a beastie!
git-svn-id: http://svn.inspircd.org/repository/trunk/inspircd@9770 e03df62e-2008-0410-955e-edbf42e46eb7
Diffstat (limited to 'src/mode.cpp')
-rw-r--r--src/mode.cpp14
1 files changed, 7 insertions, 7 deletions
diff --git a/src/mode.cpp b/src/mode.cpp
index 2fb001037..ed4b4b6b6 100644
--- a/src/mode.cpp
+++ b/src/mode.cpp
@@ -322,8 +322,8 @@ void ModeParser::DisplayCurrentModes(User *user, User* targetuser, Channel* targ
if (targetchannel)
{
/* Display channel's current mode string */
- user->WriteNumeric(324, "%s %s +%s",user->nick.c_str(), targetchannel->name, targetchannel->ChanModes(targetchannel->HasUser(user)));
- user->WriteNumeric(329, "%s %s %lu", user->nick.c_str(), targetchannel->name, (unsigned long)targetchannel->age);
+ user->WriteNumeric(324, "%s %s +%s",user->nick.c_str(), targetchannel->name.c_str(), targetchannel->ChanModes(targetchannel->HasUser(user)));
+ user->WriteNumeric(329, "%s %s %lu", user->nick.c_str(), targetchannel->name.c_str(), (unsigned long)targetchannel->age);
return;
}
else if (targetuser)
@@ -414,7 +414,7 @@ void ModeParser::Process(const std::vector<std::string>& parameters, User *user,
if (ServerInstance->Config->HideModeLists[mletter] && (targetchannel->GetStatus(user) < STATUS_HOP))
{
- user->WriteNumeric(482, "%s %s :Only half-operators and above may view the +%c list",user->nick.c_str(), targetchannel->name, *mode++);
+ user->WriteNumeric(482, "%s %s :Only half-operators and above may view the +%c list",user->nick.c_str(), targetchannel->name.c_str(), *mode++);
mh->DisplayEmptyList(user, targetchannel);
continue;
}
@@ -612,7 +612,7 @@ void ModeParser::Process(const std::vector<std::string>& parameters, User *user,
{
/* Bog off */
user->WriteNumeric(482, "%s %s :You must have channel privilege %c or above to %sset channel mode %c",
- user->nick.c_str(), targetchannel->name, needed, adding ? "" : "un", modechar);
+ user->nick.c_str(), targetchannel->name.c_str(), needed, adding ? "" : "un", modechar);
continue;
}
}
@@ -736,7 +736,7 @@ void ModeParser::Process(const std::vector<std::string>& parameters, User *user,
{
if (type == MODETYPE_CHANNEL)
{
- targetchannel->WriteChannelWithServ(ServerInstance->Config->ServerName, "MODE %s %s%s", targetchannel->name, output_sequence.c_str(), parameter_list.str().c_str());
+ targetchannel->WriteChannelWithServ(ServerInstance->Config->ServerName, "MODE %s %s%s", targetchannel->name.c_str(), output_sequence.c_str(), parameter_list.str().c_str());
this->LastParse = targetchannel->name;
}
else
@@ -749,13 +749,13 @@ void ModeParser::Process(const std::vector<std::string>& parameters, User *user,
{
if (type == MODETYPE_CHANNEL)
{
- targetchannel->WriteChannel(user,"MODE %s %s%s",targetchannel->name,output_sequence.c_str(),parameter_list.str().c_str());
+ targetchannel->WriteChannel(user, "MODE %s %s%s", targetchannel->name.c_str(), output_sequence.c_str(), parameter_list.str().c_str());
FOREACH_MOD(I_OnMode,OnMode(user, targetchannel, TYPE_CHANNEL, output_sequence + parameter_list.str()));
this->LastParse = targetchannel->name;
}
else
{
- user->WriteTo(targetuser,"MODE %s %s%s",targetuser->nick.c_str(),output_sequence.c_str(), parameter_list.str().c_str());
+ user->WriteTo(targetuser, "MODE %s %s%s", targetuser->nick.c_str(), output_sequence.c_str(), parameter_list.str().c_str());
FOREACH_MOD(I_OnMode,OnMode(user, targetuser, TYPE_USER, output_sequence + parameter_list.str()));
this->LastParse = targetuser->nick;
}