Skip to content

Commit

Permalink
Change m_gecosban to extban g and m_account_modes to extban r
Browse files Browse the repository at this point in the history
  • Loading branch information
Jackmcbarn committed Jun 5, 2011
1 parent cbbd56b commit 4238f3b
Show file tree
Hide file tree
Showing 2 changed files with 7 additions and 6 deletions.
5 changes: 3 additions & 2 deletions src/modules/m_account_modes.cpp
Expand Up @@ -60,7 +60,7 @@ class ModuleAccountModes : public Module

void On005Numeric(std::string &t)
{
ServerInstance->AddExtBanChar('R');
ServerInstance->AddExtBanChar('r');
}

ModResult OnUserPreMessage(User* user,void* dest,int target_type, std::string &text, char status, CUList &exempt_list)
Expand Down Expand Up @@ -94,9 +94,10 @@ class ModuleAccountModes : public Module
return MOD_RES_PASSTHRU;
}

// XXX: Does this belong in m_services_account?
ModResult OnCheckBan(User* user, Channel* chan, const std::string& mask)
{
if (mask[0] == 'R' && mask[1] == ':')
if (mask[0] == 'r' && mask[1] == ':')
{
std::string acctname = account ? account->GetAccountName(user) : "";
if (acctname == mask.substr(2))
Expand Down
8 changes: 4 additions & 4 deletions src/modules/m_gecosban.cpp
Expand Up @@ -13,7 +13,7 @@

#include "inspircd.h"

/* $ModDesc: Implements extban +b r: - realname (gecos) bans */
/* $ModDesc: Implements extban +b g: - gecos bans */

class ModuleGecosBan : public Module
{
Expand All @@ -30,12 +30,12 @@ class ModuleGecosBan : public Module

Version GetVersion()
{
return Version("Extban 'r' - realname (gecos) ban", VF_OPTCOMMON|VF_VENDOR);
return Version("Implements extban +b g: - gecos bans", VF_OPTCOMMON|VF_VENDOR);
}

ModResult OnCheckBan(User *user, Channel *c, const std::string& mask)
{
if (mask[0] == 'r' && mask[1] == ':')
if (mask[0] == 'g' && mask[1] == ':')
{
if (InspIRCd::Match(user->fullname, mask.substr(2)))
return MOD_RES_DENY;
Expand All @@ -45,7 +45,7 @@ class ModuleGecosBan : public Module

void On005Numeric(std::string &output)
{
ServerInstance->AddExtBanChar('r');
ServerInstance->AddExtBanChar('g');
}
};

Expand Down

0 comments on commit 4238f3b

Please sign in to comment.