diff options
author | w00t <w00t@e03df62e-2008-0410-955e-edbf42e46eb7> | 2006-02-13 01:14:16 +0000 |
---|---|---|
committer | w00t <w00t@e03df62e-2008-0410-955e-edbf42e46eb7> | 2006-02-13 01:14:16 +0000 |
commit | aef3ee694d623901d2d6c4039b5f746969264e30 (patch) | |
tree | 845a22a741482bdff1c0e84faf7d1c79a2d1fba3 /src | |
parent | 628c4b1b6f9bb2e417bd69e6624b3804ed26ecbd (diff) |
Make use of IsValidChannelName() - as a side note, we perhaps shouldn't be returning 403 in CBAN...
git-svn-id: http://svn.inspircd.org/repository/trunk/inspircd@3184 e03df62e-2008-0410-955e-edbf42e46eb7
Diffstat (limited to 'src')
-rw-r--r-- | src/modules/m_cban.cpp | 18 |
1 files changed, 1 insertions, 17 deletions
diff --git a/src/modules/m_cban.cpp b/src/modules/m_cban.cpp index cd8ad2283..ce01804ef 100644 --- a/src/modules/m_cban.cpp +++ b/src/modules/m_cban.cpp @@ -49,7 +49,6 @@ std::string EncodeCBan(const CBan &ban); CBan DecodeCBan(const std::string &data); bool CBanComp(const CBan &ban1, const CBan &ban2); void ExpireBans(); -bool IsValidChan(const char* cname); extern time_t TIME; typedef std::vector<CBan> cbanlist; @@ -93,7 +92,7 @@ class cmd_cban : public command_t else if (pcnt >= 2) { /* full form to add a CBAN */ - if(IsValidChan(parameters[0])) + if (IsValidChannelName(parameters[0])) { // parameters[0] = #channel // parameters[1] = 1h3m2s @@ -240,21 +239,6 @@ void ExpireBans() } } -bool IsValidChan(const char* cname) -{ - if(!cname) - return false; - - if(cname[0] != '#') - return false; - - for(unsigned int i = 0; i < strlen(cname); i++) - if((cname[i] == ' ') || (cname[i] == '\7') || (cname[i] == ',')) - return false; - - return true; -} - class ModuleCBanFactory : public ModuleFactory { public: |