X-Git-Url: https://git.netwichtig.de/gitweb/?a=blobdiff_plain;f=include%2Fu_listmode.h;h=cad52fc12c4c578a6deda9806afe91428a158dcd;hb=06a25cab68a58a4c9e985a394590b3288de33723;hp=5c5ddd9ffe42df670e1ba4f599979fb8dcfbaf46;hpb=69b42417f3133154536034074b0d60d2f0314a72;p=user%2Fhenk%2Fcode%2Finspircd.git diff --git a/include/u_listmode.h b/include/u_listmode.h index 5c5ddd9ff..cad52fc12 100644 --- a/include/u_listmode.h +++ b/include/u_listmode.h @@ -31,7 +31,7 @@ class ListItem : public classbase { public: std::string nick; - irc::string mask; + std::string mask; std::string time; }; @@ -153,15 +153,15 @@ class ListModeBase : public ModeHandler { for (modelist::reverse_iterator it = el->rbegin(); it != el->rend(); ++it) { - user->WriteNumeric(listnumeric, "%s %s %s %s %s", user->nick, channel->name, it->mask.c_str(), it->nick.c_str(), it->time.c_str()); + user->WriteNumeric(listnumeric, "%s %s %s %s %s", user->nick.c_str(), channel->name.c_str(), it->mask.c_str(), it->nick.c_str(), it->time.c_str()); } } - user->WriteNumeric(endoflistnumeric, "%s %s :%s", user->nick, channel->name, endofliststring.c_str()); + user->WriteNumeric(endoflistnumeric, "%s %s :%s", user->nick.c_str(), channel->name.c_str(), endofliststring.c_str()); } virtual void DisplayEmptyList(User* user, Channel* channel) { - user->WriteNumeric(endoflistnumeric, "%s %s :%s", user->nick, channel->name, endofliststring.c_str()); + user->WriteNumeric(endoflistnumeric, "%s %s :%s", user->nick.c_str(), channel->name.c_str(), endofliststring.c_str()); } /** Remove all instances of the mode from a channel. @@ -174,7 +174,7 @@ class ListModeBase : public ModeHandler channel->GetExt(infokey, el); if (el) { - irc::modestacker modestack(false); + irc::modestacker modestack(ServerInstance, false); std::deque stackresult; std::vector mode_junk; mode_junk.push_back(channel->name); @@ -182,9 +182,9 @@ class ListModeBase : public ModeHandler for (modelist::iterator it = el->begin(); it != el->end(); it++) { if (stack) - stack->Push(this->GetModeChar(), assign(it->mask)); + stack->Push(this->GetModeChar(), it->mask); else - modestack.Push(this->GetModeChar(), assign(it->mask)); + modestack.Push(this->GetModeChar(), it->mask); } if (stack) @@ -284,11 +284,11 @@ class ListModeBase : public ModeHandler for (limitlist::iterator it = chanlimits.begin(); it != chanlimits.end(); it++) { - if (match(channel->name, it->mask.c_str())) + if (match(channel->name, it->mask)) { // We have a pattern matching the channel... maxsize = el->size(); - if (maxsize < it->limit) + if (IS_LOCAL(source) || (maxsize < it->limit)) { /* Ok, it *could* be allowed, now give someone subclassing us * a chance to validate the parameter. @@ -304,7 +304,7 @@ class ListModeBase : public ModeHandler { // And now add the mask onto the list... ListItem e; - e.mask = assign(parameter); + e.mask = parameter; e.nick = servermode ? ServerInstance->Config->ServerName : source->nick; e.time = stringtime(); @@ -323,7 +323,7 @@ class ListModeBase : public ModeHandler /* List is full, give subclass a chance to send a custom message */ if (!TellListTooLong(source, channel, parameter)) { - source->WriteNumeric(478, "%s %s %s :Channel ban/ignore list is full", source->nick, channel->name, parameter.c_str()); + source->WriteNumeric(478, "%s %s %s :Channel ban/ignore list is full", source->nick.c_str(), channel->name.c_str(), parameter.c_str()); } parameter = ""; @@ -396,13 +396,13 @@ class ListModeBase : public ModeHandler { modelist* mlist; chan->GetExt(infokey, mlist); - irc::modestacker modestack(true); + irc::modestacker modestack(ServerInstance, true); std::deque stackresult; if (mlist) { for (modelist::iterator it = mlist->begin(); it != mlist->end(); it++) { - modestack.Push(std::string(1, mode)[0], assign(it->mask)); + modestack.Push(std::string(1, mode)[0], it->mask); } } while (modestack.GetStackedLine(stackresult))