diff --git a/Changes b/Changes index 6afd3339f..744dd098e 100644 --- a/Changes +++ b/Changes @@ -1000,3 +1000,4 @@ seen. gmtime warning still there - TKL mods compile and run fine, set{} stuff to decide what funcs are avail forthcoming - SMO recoded but wierd because sendto_umode and sendto_snomask are wierd +- chatops actually checks if sender is an oper, why did no one notice this? diff --git a/src/s_serv.c b/src/s_serv.c index 8b99cebea..19924e351 100644 --- a/src/s_serv.c +++ b/src/s_serv.c @@ -3198,6 +3198,13 @@ int m_chatops(cptr, sptr, parc, parv) me.name, parv[0], "CHATOPS"); return 0; } + + if (MyClient(sptr) && !IsAnOper(cptr)) + { + sendto_one(sptr, err_str(ERR_NOPRIVELEGES), me.name, sptr->name); + return 0; + } + sendto_serv_butone_token(IsServer(cptr) ? cptr : NULL, parv[0], MSG_CHATOPS, TOK_CHATOPS, ":%s", message); sendto_umode(UMODE_OPER, "*** ChatOps -- from %s: %s",