summaryrefslogtreecommitdiff
path: root/src/channels.c
diff options
context:
space:
mode:
authorAdam- <Adam-@5417fbe8-f217-4b02-8779-1006273d7864>2010-01-06 20:09:48 +0000
committerAdam- <Adam-@5417fbe8-f217-4b02-8779-1006273d7864>2010-01-06 20:09:48 +0000
commit9124a3be5347317918d9fb95991bdb2dd3818c99 (patch)
tree59b726e2470328f56996a96b94fbc57e622c1edb /src/channels.c
parentb462814760cb7c0830072275acc97291a9fb905b (diff)
Fixed windows build and cleaned up a few small things
git-svn-id: http://anope.svn.sourceforge.net/svnroot/anope/trunk@2736 5417fbe8-f217-4b02-8779-1006273d7864
Diffstat (limited to 'src/channels.c')
-rw-r--r--src/channels.c8
1 files changed, 4 insertions, 4 deletions
diff --git a/src/channels.c b/src/channels.c
index 85b026b40..bc1b17f17 100644
--- a/src/channels.c
+++ b/src/channels.c
@@ -595,14 +595,14 @@ void Channel::ClearInvites(BotInfo *bi)
* @param EnforceMLock Should mlock be enforced on this mode change
* @param cmodes The modes to set
*/
-void Channel::SetModes(BotInfo *bi, bool EnforceMLock, const std::string &cmodes, ...)
+void Channel::SetModes(BotInfo *bi, bool EnforceMLock, const char *cmodes, ...)
{
char buf[BUFSIZE] = "";
va_list args;
std::string modebuf, sbuf;
int add = -1;
- va_start(args, cmodes.c_str());
- vsnprintf(buf, BUFSIZE - 1, cmodes.c_str(), args);
+ va_start(args, cmodes);
+ vsnprintf(buf, BUFSIZE - 1, cmodes, args);
va_end(args);
spacesepstream sep(buf);
@@ -2105,7 +2105,7 @@ void MassChannelModes(BotInfo *bi, const std::string &modes)
{
if (c->bouncy_modes)
return;
- c->SetModes(bi, false, modes);
+ c->SetModes(bi, false, modes.c_str());
}
}