From 97ab3c404ccd201681f465aa2c3e9ff6586acbd8 Mon Sep 17 00:00:00 2001 From: brain Date: Sat, 31 Jan 2009 15:59:11 +0000 Subject: 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 --- src/modes/umode_o.cpp | 8 +++----- 1 file changed, 3 insertions(+), 5 deletions(-) (limited to 'src/modes') 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; -- cgit v1.2.3