mirror of
https://github.com/mod-playerbots/azerothcore-wotlk.git
synced 2026-01-16 02:20:27 +00:00
chore(Script/Misc): cleanup (#19619)
* chore(Script/Misc): cleanup * more cleanup * cleanup
This commit is contained in:
@@ -444,7 +444,7 @@ public:
|
||||
if (banResult)
|
||||
{
|
||||
Field* fields2 = banResult->Fetch();
|
||||
handler->PSendSysMessage("%s", fields2[0].Get<std::string>());
|
||||
handler->PSendSysMessage("{}", fields2[0].Get<std::string>());
|
||||
}
|
||||
} while (result->NextRow());
|
||||
}
|
||||
@@ -480,14 +480,14 @@ public:
|
||||
|
||||
if (fields2[0].Get<uint32>() == fields2[1].Get<uint32>())
|
||||
{
|
||||
handler->PSendSysMessage("|%-15.15s|%02d-%02d-%02d %02d:%02d| permanent |%-15.15s|%-15.15s|",
|
||||
handler->PSendSysMessage("|%-15.15s|{:02}-{:02}-{:02} {:02}:{:02}| permanent |%-15.15s|%-15.15s|",
|
||||
accountName, tmBan.tm_year % 100, tmBan.tm_mon + 1, tmBan.tm_mday, tmBan.tm_hour, tmBan.tm_min,
|
||||
fields2[2].Get<std::string>(), fields2[3].Get<std::string>());
|
||||
}
|
||||
else
|
||||
{
|
||||
tm tmUnban = Acore::Time::TimeBreakdown(fields2[1].Get<uint32>());
|
||||
handler->PSendSysMessage("|%-15.15s|%02d-%02d-%02d %02d:%02d|%02d-%02d-%02d %02d:%02d|%-15.15s|%-15.15s|",
|
||||
handler->PSendSysMessage("|%-15.15s|{:02}-{:02}-{:02} {:02}:{:02}|{:02}-{:02}-{:02} {:02}:{:02}|%-15.15s|%-15.15s|",
|
||||
accountName, tmBan.tm_year % 100, tmBan.tm_mon + 1, tmBan.tm_mday, tmBan.tm_hour, tmBan.tm_min,
|
||||
tmUnban.tm_year % 100, tmUnban.tm_mon + 1, tmUnban.tm_mday, tmUnban.tm_hour, tmUnban.tm_min,
|
||||
fields2[2].Get<std::string>(), fields2[3].Get<std::string>());
|
||||
@@ -534,7 +534,7 @@ public:
|
||||
|
||||
PreparedQueryResult banResult = CharacterDatabase.Query(stmt2);
|
||||
if (banResult)
|
||||
handler->PSendSysMessage("%s", (*banResult)[0].Get<std::string>());
|
||||
handler->PSendSysMessage("{}", (*banResult)[0].Get<std::string>());
|
||||
} while (result->NextRow());
|
||||
}
|
||||
// Console wide output
|
||||
@@ -564,14 +564,14 @@ public:
|
||||
|
||||
if (banFields[0].Get<uint32>() == banFields[1].Get<uint32>())
|
||||
{
|
||||
handler->PSendSysMessage("|%-15.15s|%02d-%02d-%02d %02d:%02d| permanent |%-15.15s|%-15.15s|",
|
||||
handler->PSendSysMessage("|%-15.15s|{:02}-{:02}-{:02} {:02}:{:02}| permanent |%-15.15s|%-15.15s|",
|
||||
char_name, tmBan.tm_year % 100, tmBan.tm_mon + 1, tmBan.tm_mday, tmBan.tm_hour, tmBan.tm_min,
|
||||
banFields[2].Get<std::string>(), banFields[3].Get<std::string>());
|
||||
}
|
||||
else
|
||||
{
|
||||
tm tmUnban = Acore::Time::TimeBreakdown(banFields[1].Get<uint32>());
|
||||
handler->PSendSysMessage("|%-15.15s|%02d-%02d-%02d %02d:%02d|%02d-%02d-%02d %02d:%02d|%-15.15s|%-15.15s|",
|
||||
handler->PSendSysMessage("|%-15.15s|{:02}-{:02}-{:02} {:02}:{:02}|{:02}-{:02}-{:02} {:02}:{:02}|%-15.15s|%-15.15s|",
|
||||
char_name, tmBan.tm_year % 100, tmBan.tm_mon + 1, tmBan.tm_mday, tmBan.tm_hour, tmBan.tm_min,
|
||||
tmUnban.tm_year % 100, tmUnban.tm_mon + 1, tmUnban.tm_mday, tmUnban.tm_hour, tmUnban.tm_min,
|
||||
banFields[2].Get<std::string>(), banFields[3].Get<std::string>());
|
||||
@@ -621,7 +621,7 @@ public:
|
||||
do
|
||||
{
|
||||
Field* fields = result->Fetch();
|
||||
handler->PSendSysMessage("%s", fields[0].Get<std::string>());
|
||||
handler->PSendSysMessage("{}", fields[0].Get<std::string>());
|
||||
} while (result->NextRow());
|
||||
}
|
||||
// Console wide output
|
||||
@@ -637,14 +637,14 @@ public:
|
||||
tm tmBan = Acore::Time::TimeBreakdown(fields[1].Get<uint32>());
|
||||
if (fields[1].Get<uint32>() == fields[2].Get<uint32>())
|
||||
{
|
||||
handler->PSendSysMessage("|%-15.15s|%02d-%02d-%02d %02d:%02d| permanent |%-15.15s|%-15.15s|",
|
||||
handler->PSendSysMessage("|%-15.15s|{:02}-{:02}-{:02} {:02}:{:02}| permanent |%-15.15s|%-15.15s|",
|
||||
fields[0].Get<std::string>(), tmBan.tm_year % 100, tmBan.tm_mon + 1, tmBan.tm_mday, tmBan.tm_hour, tmBan.tm_min,
|
||||
fields[3].Get<std::string>(), fields[4].Get<std::string>());
|
||||
}
|
||||
else
|
||||
{
|
||||
tm tmUnban = Acore::Time::TimeBreakdown(fields[2].Get<uint32>());
|
||||
handler->PSendSysMessage("|%-15.15s|%02d-%02d-%02d %02d:%02d|%02d-%02d-%02d %02d:%02d|%-15.15s|%-15.15s|",
|
||||
handler->PSendSysMessage("|%-15.15s|{:02}-{:02}-{:02} {:02}:{:02}|{:02}-{:02}-{:02} {:02}:{:02}|%-15.15s|%-15.15s|",
|
||||
fields[0].Get<std::string>(), tmBan.tm_year % 100, tmBan.tm_mon + 1, tmBan.tm_mday, tmBan.tm_hour, tmBan.tm_min,
|
||||
tmUnban.tm_year % 100, tmUnban.tm_mon + 1, tmUnban.tm_mday, tmUnban.tm_hour, tmUnban.tm_min,
|
||||
fields[3].Get<std::string>(), fields[4].Get<std::string>());
|
||||
|
||||
Reference in New Issue
Block a user