diff options
author | brain <brain@e03df62e-2008-0410-955e-edbf42e46eb7> | 2009-01-31 15:59:11 +0000 |
---|---|---|
committer | brain <brain@e03df62e-2008-0410-955e-edbf42e46eb7> | 2009-01-31 15:59:11 +0000 |
commit | 97ab3c404ccd201681f465aa2c3e9ff6586acbd8 (patch) | |
tree | f66ac353f88d5c0421fa4fbd1dea7e8f55b34c2c /src | |
parent | f84bff3aa60af440c059cd564a324cc7a6a9258d (diff) |
Fix for bug #695. For now, we cant be sure what parts of the code might still use empty nick to signify a server, so lets just avoid messing with it until 1.2+1 and use this simple workaround instead.
git-svn-id: http://svn.inspircd.org/repository/trunk/inspircd@11016 e03df62e-2008-0410-955e-edbf42e46eb7
Diffstat (limited to 'src')
-rw-r--r-- | src/modes/umode_o.cpp | 8 |
1 files changed, 3 insertions, 5 deletions
diff --git a/src/modes/umode_o.cpp b/src/modes/umode_o.cpp index 31c5635a9..baeaad5bb 100644 --- a/src/modes/umode_o.cpp +++ b/src/modes/umode_o.cpp @@ -24,9 +24,7 @@ ModeUserOperator::ModeUserOperator(InspIRCd* Instance) : ModeHandler(Instance, ' ModeAction ModeUserOperator::OnModeChange(User* source, User* dest, Channel*, std::string&, bool adding, bool servermode) { /* Only opers can execute this class at all */ - if (!ServerInstance->ULine(source->nick.c_str()) && - !ServerInstance->ULine(source->server) && - source->oper.empty()) + if (!ServerInstance->ULine(source->nick.c_str()) && !ServerInstance->ULine(source->server) && source->oper.empty()) return MODEACTION_DENY; /* Not even opers can GIVE the +o mode, only take it away */ @@ -40,9 +38,9 @@ ModeAction ModeUserOperator::OnModeChange(User* source, User* dest, Channel*, st * to your User! */ if (IS_LOCAL(dest)) - ServerInstance->SNO->WriteToSnoMask('o', "User %s de-opered (by %s)", dest->nick.c_str(), source->nick.c_str()); + ServerInstance->SNO->WriteToSnoMask('o', "User %s de-opered (by %s)", dest->nick.c_str(), source.empty() ? source->server : source->nick.c_str()); else - ServerInstance->SNO->WriteToSnoMask('O', "User %s de-opered (by %s)", dest->nick.c_str(), source->nick.c_str()); + ServerInstance->SNO->WriteToSnoMask('O', "User %s de-opered (by %s)", dest->nick.c_str(), source.empty() ? source->server : source->nick.c_str()); dest->UnOper(); return MODEACTION_ALLOW; |