/* $ModDesc: Gives /cban, aka C:lines. Think Q:lines, for channels. */
-class CBan
+class CBan : public classbase
{
public:
irc::string chname;
this->Srv = Me;
}
- void Handle(char **parameters, int pcnt, userrec *user)
+ void Handle(const char** parameters, int pcnt, userrec *user)
{
/* syntax: CBAN #channel time :reason goes here */
/* 'time' is a human-readable timestring, like 2d3h2s. */
/* check cbans in here, and apply as necessary. */
for(cbanlist::iterator iter = cbans.begin(); iter != cbans.end(); iter++)
{
- if(iter->chname == cname && !strchr(user->modes, 'o'))
+ if(iter->chname == cname && !user->modes[UM_OPERATOR])
{
// Channel is banned.
WriteServ(user->fd, "384 %s %s :Cannot join channel, CBANed (%s)", user->nick, cname, iter->reason.c_str());