- virtual void OnPostCommand(const std::string &command, const char* const* parameters, int pcnt, User *user, CmdResult result, const std::string &original_line)
+ virtual void OnPostCommand(const std::string &command, const std::vector<std::string> ¶meters, User *user, CmdResult result, const std::string &original_line)
virtual int OnUserPreJoin(User* user, Channel* chan, const char* cname, std::string &privs, const std::string &keygiven)
{
virtual int OnUserPreJoin(User* user, Channel* chan, const char* cname, std::string &privs, const std::string &keygiven)
{
- /*
- * XXX: this is potentially prone to desyncs (though unlikely).
- * Really, now we have a protocol interface, we should only do
- * this for *local* users and just broadcast out a SNONOTICE if
- * an override is perpetrated. -- w00t
- */
- if (IS_OPER(user))
+ if (IS_LOCAL(user) && IS_OPER(user))
if (RequireKey && keygiven != "override")
{
// Can't join normally -- must use a special key to bypass restrictions
if (RequireKey && keygiven != "override")
{
// Can't join normally -- must use a special key to bypass restrictions
- chan->WriteChannelWithServ(ServerInstance->Config->ServerName, "NOTICE %s :%s used oper-override to bypass invite-only", cname, user->nick);
- ServerInstance->SNO->WriteToSnoMask('O',std::string(user->nick)+" used operoverride to bypass +i on "+std::string(cname));
+ chan->WriteChannelWithServ(ServerInstance->Config->ServerName, "NOTICE %s :%s used oper override to bypass invite-only", cname, user->nick);
+ ServerInstance->SNO->WriteToSnoMask('O',std::string(user->nick)+" used oper override to bypass +i on "+std::string(cname));
if (RequireKey && keygiven != "override")
{
// Can't join normally -- must use a special key to bypass restrictions
if (RequireKey && keygiven != "override")
{
// Can't join normally -- must use a special key to bypass restrictions
- chan->WriteChannelWithServ(ServerInstance->Config->ServerName, "NOTICE %s :%s used oper-override to bypass the channel key", cname, user->nick);
- ServerInstance->SNO->WriteToSnoMask('O',std::string(user->nick)+" used operoverride to bypass +k on "+std::string(cname));
+ chan->WriteChannelWithServ(ServerInstance->Config->ServerName, "NOTICE %s :%s used oper override to bypass the channel key", cname, user->nick);
+ ServerInstance->SNO->WriteToSnoMask('O',std::string(user->nick)+" used oper override to bypass +k on "+std::string(cname));
if (RequireKey && keygiven != "override")
{
// Can't join normally -- must use a special key to bypass restrictions
if (RequireKey && keygiven != "override")
{
// Can't join normally -- must use a special key to bypass restrictions
- chan->WriteChannelWithServ(ServerInstance->Config->ServerName, "NOTICE %s :%s used oper-override to bypass the channel limit", cname, user->nick);
- ServerInstance->SNO->WriteToSnoMask('O',std::string(user->nick)+" used operoverride to bypass +l on "+std::string(cname));
+ chan->WriteChannelWithServ(ServerInstance->Config->ServerName, "NOTICE %s :%s used oper override to bypass the channel limit", cname, user->nick);
+ ServerInstance->SNO->WriteToSnoMask('O',std::string(user->nick)+" used oper override to bypass +l on "+std::string(cname));
if (RequireKey && keygiven != "override")
{
// Can't join normally -- must use a special key to bypass restrictions
if (RequireKey && keygiven != "override")
{
// Can't join normally -- must use a special key to bypass restrictions
- chan->WriteChannelWithServ(ServerInstance->Config->ServerName, "NOTICE %s :%s used oper-override to bypass channel ban", cname, user->nick);
- ServerInstance->SNO->WriteToSnoMask('O',"%s used oper-override to bypass channel ban on %s", user->nick, cname);
+ chan->WriteChannelWithServ(ServerInstance->Config->ServerName, "NOTICE %s :%s used oper override to bypass channel ban", cname, user->nick);
+ ServerInstance->SNO->WriteToSnoMask('O',"%s used oper override to bypass channel ban on %s", user->nick, cname);