diff options
Diffstat (limited to 'src/modes')
-rw-r--r-- | src/modes/cmode_b.cpp | 12 | ||||
-rw-r--r-- | src/modes/cmode_h.cpp | 18 | ||||
-rw-r--r-- | src/modes/cmode_k.cpp | 13 | ||||
-rw-r--r-- | src/modes/cmode_l.cpp | 13 | ||||
-rw-r--r-- | src/modes/cmode_o.cpp | 19 | ||||
-rw-r--r-- | src/modes/cmode_v.cpp | 18 |
6 files changed, 0 insertions, 93 deletions
diff --git a/src/modes/cmode_b.cpp b/src/modes/cmode_b.cpp index 477d87544..b2b3f3c6f 100644 --- a/src/modes/cmode_b.cpp +++ b/src/modes/cmode_b.cpp @@ -141,18 +141,6 @@ std::string& ModeChannelBan::AddBan(User *user, std::string &dest, Channel *chan return dest; } -ModePair ModeChannelBan::ModeSet(User*, User*, Channel* channel, const std::string ¶meter) -{ - for (BanList::iterator i = channel->bans.begin(); i != channel->bans.end(); i++) - { - if (!strcasecmp(i->data.c_str(), parameter.c_str())) - { - return std::make_pair(true, i->data); - } - } - return std::make_pair(false, parameter); -} - std::string& ModeChannelBan::DelBan(User *user, std::string& dest, Channel *chan, int) { if ((!user) || (!chan)) diff --git a/src/modes/cmode_h.cpp b/src/modes/cmode_h.cpp index 9ca050de2..0b0f0b700 100644 --- a/src/modes/cmode_h.cpp +++ b/src/modes/cmode_h.cpp @@ -32,24 +32,6 @@ unsigned int ModeChannelHalfOp::GetPrefixRank() return HALFOP_VALUE; } -ModePair ModeChannelHalfOp::ModeSet(User*, User*, Channel* channel, const std::string ¶meter) -{ - User* x = ServerInstance->FindNick(parameter); - if (x) - { - Membership* memb = channel->GetUser(x); - if (memb && memb->hasMode('h')) - { - return std::make_pair(true, x->nick); - } - else - { - return std::make_pair(false, x->nick); - } - } - return std::make_pair(false, parameter); -} - void ModeChannelHalfOp::RemoveMode(Channel* channel, irc::modestacker* stack) { const UserMembList* clist = channel->GetUsers(); diff --git a/src/modes/cmode_k.cpp b/src/modes/cmode_k.cpp index 5b273cdd1..d8b04b576 100644 --- a/src/modes/cmode_k.cpp +++ b/src/modes/cmode_k.cpp @@ -21,19 +21,6 @@ ModeChannelKey::ModeChannelKey() : ModeHandler(NULL, "key", 'k', PARAM_ALWAYS, M { } -ModePair ModeChannelKey::ModeSet(User*, User*, Channel* channel, const std::string ¶meter) -{ - if (channel->modes[CM_KEY]) - { - std::string ckey = channel->GetModeParameter('k'); - return std::make_pair(true, ckey); - } - else - { - return std::make_pair(false, parameter); - } -} - void ModeChannelKey::RemoveMode(Channel* channel, irc::modestacker* stack) { /** +k needs a parameter when being removed, diff --git a/src/modes/cmode_l.cpp b/src/modes/cmode_l.cpp index 0fddf2af0..fce195200 100644 --- a/src/modes/cmode_l.cpp +++ b/src/modes/cmode_l.cpp @@ -21,19 +21,6 @@ ModeChannelLimit::ModeChannelLimit() : ModeHandler(NULL, "limit", 'l', PARAM_SET { } -ModePair ModeChannelLimit::ModeSet(User*, User*, Channel* channel, const std::string ¶meter) -{ - std::string climit = channel->GetModeParameter('l'); - if (!climit.empty()) - { - return std::make_pair(true, climit); - } - else - { - return std::make_pair(false, parameter); - } -} - bool ModeChannelLimit::ResolveModeConflict(std::string &their_param, const std::string &our_param, Channel*) { /* When TS is equal, the higher channel limit wins */ diff --git a/src/modes/cmode_o.cpp b/src/modes/cmode_o.cpp index 1bab9db26..e706302dc 100644 --- a/src/modes/cmode_o.cpp +++ b/src/modes/cmode_o.cpp @@ -32,25 +32,6 @@ unsigned int ModeChannelOp::GetPrefixRank() return OP_VALUE; } -ModePair ModeChannelOp::ModeSet(User*, User*, Channel* channel, const std::string ¶meter) -{ - User* x = ServerInstance->FindNick(parameter); - if (x) - { - Membership* memb = channel->GetUser(x); - if (memb && memb->hasMode('o')) - { - return std::make_pair(true, x->nick); - } - else - { - return std::make_pair(false, parameter); - } - } - return std::make_pair(false, parameter); -} - - void ModeChannelOp::RemoveMode(Channel* channel, irc::modestacker* stack) { const UserMembList* clist = channel->GetUsers(); diff --git a/src/modes/cmode_v.cpp b/src/modes/cmode_v.cpp index b791f5574..6e5ebd0a9 100644 --- a/src/modes/cmode_v.cpp +++ b/src/modes/cmode_v.cpp @@ -33,24 +33,6 @@ unsigned int ModeChannelVoice::GetPrefixRank() return VOICE_VALUE; } -ModePair ModeChannelVoice::ModeSet(User*, User*, Channel* channel, const std::string ¶meter) -{ - User* x = ServerInstance->FindNick(parameter); - if (x) - { - Membership* memb = channel->GetUser(x); - if (memb && memb->hasMode('v')) - { - return std::make_pair(true, x->nick); - } - else - { - return std::make_pair(false, parameter); - } - } - return std::make_pair(false, parameter); -} - void ModeChannelVoice::RemoveMode(Channel* channel, irc::modestacker* stack) { const UserMembList* clist = channel->GetUsers(); |