Some cleanups. (might break build for scripts as they are a WIP)
This commit is contained in:
@@ -105,7 +105,7 @@ namespace Game.Chat.Commands
|
||||
break;
|
||||
}
|
||||
|
||||
string author = handler.GetSession() ? handler.GetSession().GetPlayerName() : "Server";
|
||||
string author = handler.GetSession() != null ? handler.GetSession().GetPlayerName() : "Server";
|
||||
switch (Global.WorldMgr.BanAccount(mode, nameOrIP, duration, reason, author))
|
||||
{
|
||||
case BanReturn.Success:
|
||||
@@ -180,7 +180,7 @@ namespace Game.Chat.Commands
|
||||
Player target = Global.ObjAccessor.FindPlayerByName(name);
|
||||
ObjectGuid targetGuid;
|
||||
|
||||
if (!target)
|
||||
if (target == null)
|
||||
{
|
||||
targetGuid = Global.CharacterCacheStorage.GetCharacterGuidByName(name);
|
||||
if (targetGuid.IsEmpty())
|
||||
@@ -314,7 +314,7 @@ namespace Game.Chat.Commands
|
||||
handler.SendSysMessage(CypherStrings.BanlistMatchingcharacter);
|
||||
|
||||
// Chat short output
|
||||
if (handler.GetSession())
|
||||
if (handler.GetSession() != null)
|
||||
{
|
||||
do
|
||||
{
|
||||
@@ -405,7 +405,7 @@ namespace Game.Chat.Commands
|
||||
|
||||
handler.SendSysMessage(CypherStrings.BanlistMatchingip);
|
||||
// Chat short output
|
||||
if (handler.GetSession())
|
||||
if (handler.GetSession() != null)
|
||||
{
|
||||
do
|
||||
{
|
||||
@@ -458,7 +458,7 @@ namespace Game.Chat.Commands
|
||||
handler.SendSysMessage(CypherStrings.BanlistMatchingaccount);
|
||||
|
||||
// Chat short output
|
||||
if (handler.GetSession())
|
||||
if (handler.GetSession() != null)
|
||||
{
|
||||
do
|
||||
{
|
||||
|
||||
Reference in New Issue
Block a user