summaryrefslogtreecommitdiff
path: root/src/modules/m_cban.cpp
diff options
context:
space:
mode:
Diffstat (limited to 'src/modules/m_cban.cpp')
-rw-r--r--src/modules/m_cban.cpp18
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: