extern time_t TIME;
extern user_hash clientlist;
extern chan_hash chanlist;
-extern whowas_hash whowas;
extern std::vector<userrec*> all_opers;
extern std::vector<userrec*> local_users;
extern userrec* fd_ref_table[MAX_DESCRIPTORS];
if (ServerInstance->Parser->LoopCall(this,parameters,pcnt,user,0,pcnt-2,0))
return;
- if (parameters[0][0] == '$')
+ if ((parameters[0][0] == '$') && (*user->oper))
{
// notice to server mask
char* servermask = parameters[0];
servermask++;
if (match(Config->ServerName,servermask))
- {
+ {
ServerPrivmsgAll("%s",parameters[1]);
- }
+ }
return;
- }
- char status = 0;
- if ((*parameters[0] == '@') || (*parameters[0] == '%') || (*parameters[0] == '+'))
- {
- status = *parameters[0];
- parameters[0]++;
- }
- if (parameters[0][0] == '#')
+ }
+ char status = 0;
+ if ((*parameters[0] == '@') || (*parameters[0] == '%') || (*parameters[0] == '+'))
+ {
+ status = *parameters[0];
+ parameters[0]++;
+ }
+ if (parameters[0][0] == '#')
{
chan = FindChan(parameters[0]);
if (chan)
{
if (IS_LOCAL(user))
{
- if ((chan->binarymodes & CM_NOEXTERNAL) && (!has_channel(user,chan)))
+ if ((chan->modes[CM_NOEXTERNAL]) && (!chan->HasUser(user)))
{
WriteServ(user->fd,"404 %s %s :Cannot send to channel (no external messages)", user->nick, chan->name);
return;
}
- if ((chan->binarymodes & CM_MODERATED) && (cstatus(user,chan)<STATUS_VOICE))
+ if ((chan->modes[CM_MODERATED]) && (cstatus(user,chan)<STATUS_VOICE))
{
WriteServ(user->fd,"404 %s %s :Cannot send to channel (+m)", user->nick, chan->name);
return;