mirror of
https://github.com/araxiaonline/GMGenie.git
synced 2026-06-13 02:32:22 -04:00
Fixemail in playerinfo window and several loops I broke during cleanup.
This commit is contained in:
@@ -174,7 +174,7 @@ function ChatFrame_MessageEventHandler(self, event, ...)
|
||||
local os, latency = string.match(arg1, "OS: (.*) %- Latency: (.*) ms");
|
||||
local email = string.match(arg1, "Mail: (.*)");
|
||||
if not email then
|
||||
local email = string.match(arg1, "Email: (.*)");
|
||||
email = string.match(arg1, "Email: (.*)");
|
||||
end
|
||||
local ip, locked = string.match(arg1, "Last IP: (.*) %(Locked: (.*)%)");
|
||||
local level = string.match(arg1, "Level: ([0-9]+)");
|
||||
|
||||
@@ -19,7 +19,7 @@ function GMGenie.pairsByKeys(t, f)
|
||||
table.insert(a, n);
|
||||
end
|
||||
table.sort(a, f);
|
||||
for value in pairs(a) do
|
||||
for _, value in pairs(a) do
|
||||
table.insert(b, t[value]);
|
||||
end
|
||||
return b;
|
||||
@@ -32,7 +32,7 @@ function GMGenie.pairsByKeys2(t, f)
|
||||
table.insert(a, n);
|
||||
end
|
||||
table.sort(a, f);
|
||||
for value in pairs(a) do
|
||||
for _, value in pairs(a) do
|
||||
table.insert(b, value);
|
||||
end
|
||||
return b;
|
||||
|
||||
@@ -30,7 +30,7 @@ end
|
||||
function GMGenie.Macros.Discipline.Mute.addToUnitMenu()
|
||||
UnitPopupMenus["GMGenie_Mute"] = {};
|
||||
local MuteTemp = GMGenie.pairsByKeys2(GMGenie_SavedVars.mute);
|
||||
for name in pairs(MuteTemp) do
|
||||
for _, name in pairs(MuteTemp) do
|
||||
table.insert(UnitPopupMenus["GMGenie_Mute"], "GMGenie_Mute_" .. name);
|
||||
UnitPopupButtons["GMGenie_Mute_" .. name] = { text = name, dist = 0, };
|
||||
end
|
||||
@@ -48,7 +48,7 @@ function GMGenie.Macros.Discipline.Mute.loadDropdown(_, level)
|
||||
UIDropDownMenu_AddButton(info, level);
|
||||
|
||||
local MuteTemp = GMGenie.pairsByKeys2(GMGenie_SavedVars.mute);
|
||||
for name in pairs(MuteTemp) do
|
||||
for _, name in pairs(MuteTemp) do
|
||||
local info = UIDropDownMenu_CreateInfo();
|
||||
info.hasArrow = false;
|
||||
info.notCheckable = true;
|
||||
@@ -87,7 +87,7 @@ end
|
||||
function GMGenie.Macros.Discipline.CharBan.addToUnitMenu()
|
||||
UnitPopupMenus["GMGenie_CharBan"] = {};
|
||||
local CharBanTemp = GMGenie.pairsByKeys2(GMGenie_SavedVars.charBan);
|
||||
for name in pairs(CharBanTemp) do
|
||||
for _, name in pairs(CharBanTemp) do
|
||||
table.insert(UnitPopupMenus["GMGenie_CharBan"], "GMGenie_CharBan_" .. name);
|
||||
UnitPopupButtons["GMGenie_CharBan_" .. name] = { text = name, dist = 0, };
|
||||
end
|
||||
@@ -105,7 +105,7 @@ function GMGenie.Macros.Discipline.CharBan.loadDropdown(_, level)
|
||||
UIDropDownMenu_AddButton(info, level);
|
||||
|
||||
local CharBanTemp = GMGenie.pairsByKeys2(GMGenie_SavedVars.charBan);
|
||||
for name in pairs(CharBanTemp) do
|
||||
for _, name in pairs(CharBanTemp) do
|
||||
local info = UIDropDownMenu_CreateInfo();
|
||||
info.hasArrow = false;
|
||||
info.notCheckable = true;
|
||||
@@ -144,7 +144,7 @@ end
|
||||
function GMGenie.Macros.Discipline.AccBan.addToUnitMenu()
|
||||
UnitPopupMenus["GMGenie_AccBan"] = {};
|
||||
local AccBanTemp = GMGenie.pairsByKeys2(GMGenie_SavedVars.accBan);
|
||||
for name in pairs(AccBanTemp) do
|
||||
for _, name in pairs(AccBanTemp) do
|
||||
table.insert(UnitPopupMenus["GMGenie_AccBan"], "GMGenie_AccBan_" .. name);
|
||||
UnitPopupButtons["GMGenie_AccBan_" .. name] = { text = name, dist = 0, };
|
||||
end
|
||||
@@ -162,7 +162,7 @@ function GMGenie.Macros.Discipline.AccBan.loadDropdown(_, level)
|
||||
UIDropDownMenu_AddButton(info, level);
|
||||
|
||||
local AccBanTemp = GMGenie.pairsByKeys2(GMGenie_SavedVars.accBan);
|
||||
for name in pairs(AccBanTemp) do
|
||||
for _, name in pairs(AccBanTemp) do
|
||||
local info = UIDropDownMenu_CreateInfo();
|
||||
info.hasArrow = false;
|
||||
info.notCheckable = true;
|
||||
@@ -232,7 +232,7 @@ end
|
||||
function GMGenie.Macros.Discipline.IpBan.addToUnitMenu()
|
||||
UnitPopupMenus["GMGenie_IpBan"] = {};
|
||||
local IpBanTemp = GMGenie.pairsByKeys2(GMGenie_SavedVars.ipBan);
|
||||
for name in pairs(IpBanTemp) do
|
||||
for _, name in pairs(IpBanTemp) do
|
||||
table.insert(UnitPopupMenus["GMGenie_IpBan"], "GMGenie_IpBan_" .. name);
|
||||
UnitPopupButtons["GMGenie_IpBan_" .. name] = { text = name, dist = 0, };
|
||||
end
|
||||
@@ -250,7 +250,7 @@ function GMGenie.Macros.Discipline.IpBan.loadDropdown(_, level)
|
||||
UIDropDownMenu_AddButton(info, level);
|
||||
|
||||
local IpBanTemp = GMGenie.pairsByKeys2(GMGenie_SavedVars.ipBan);
|
||||
for name in pairs(IpBanTemp) do
|
||||
for _, name in pairs(IpBanTemp) do
|
||||
local info = UIDropDownMenu_CreateInfo();
|
||||
info.hasArrow = false;
|
||||
info.notCheckable = true;
|
||||
|
||||
@@ -36,7 +36,7 @@ end
|
||||
function GMGenie.Macros.Mail.addToUnitMenu()
|
||||
UnitPopupMenus["GMGenie_Mail"] = {};
|
||||
local MailTemp = GMGenie.pairsByKeys2(GMGenie_SavedVars.mail);
|
||||
for name in pairs(MailTemp) do
|
||||
for _, name in pairs(MailTemp) do
|
||||
table.insert(UnitPopupMenus["GMGenie_Mail"], "GMGenie_Mail_" .. name);
|
||||
UnitPopupButtons["GMGenie_Mail_" .. name] = { text = name, dist = 0, };
|
||||
end
|
||||
@@ -54,7 +54,7 @@ function GMGenie.Macros.Mail.loadDropdown(_, level)
|
||||
UIDropDownMenu_AddButton(info, level);
|
||||
|
||||
local MailTemp = GMGenie.pairsByKeys2(GMGenie_SavedVars.mail);
|
||||
for name in pairs(MailTemp) do
|
||||
for _, name in pairs(MailTemp) do
|
||||
local info = UIDropDownMenu_CreateInfo();
|
||||
info.hasArrow = false;
|
||||
info.notCheckable = true;
|
||||
|
||||
@@ -25,7 +25,7 @@ end
|
||||
function GMGenie.Macros.Tele.addToUnitMenu()
|
||||
UnitPopupMenus["GMGenie_Tele"] = {};
|
||||
local TeleTemp = GMGenie.pairsByKeys2(GMGenie_SavedVars.tele);
|
||||
for name in pairs(TeleTemp) do
|
||||
for _, name in pairs(TeleTemp) do
|
||||
table.insert(UnitPopupMenus["GMGenie_Tele"], "GMGenie_Tele_" .. name);
|
||||
UnitPopupButtons["GMGenie_Tele_" .. name] = { text = name, dist = 0, };
|
||||
end
|
||||
@@ -43,7 +43,7 @@ function GMGenie.Macros.Tele.loadDropdown(_, level)
|
||||
UIDropDownMenu_AddButton(info, level);
|
||||
|
||||
local TeleTemp = GMGenie.pairsByKeys2(GMGenie_SavedVars.tele);
|
||||
for name in pairs(TeleTemp) do
|
||||
for _, name in pairs(TeleTemp) do
|
||||
local info = UIDropDownMenu_CreateInfo();
|
||||
info.hasArrow = false;
|
||||
info.notCheckable = true;
|
||||
|
||||
@@ -21,7 +21,7 @@ function GMGenie.Macros.Whispers.run(name, title)
|
||||
GMGenie_Macros_Whispers_SubjectPopup_Subject:SetFocus();
|
||||
else
|
||||
local args = { strsplit("\n", msg) };
|
||||
for text in pairs(args) do
|
||||
for _, text in pairs(args) do
|
||||
SendChatMessage(text, "WHISPER", nil, name);
|
||||
end
|
||||
end
|
||||
@@ -41,7 +41,7 @@ function GMGenie.Macros.Whispers.sendWithSubject()
|
||||
|
||||
local msg = string.gsub(GMGenie.Macros.Whispers.curWhisperMessage, "SUBJECT", subject);
|
||||
local args = { strsplit("\n", msg) };
|
||||
for text in pairs(args) do
|
||||
for _, text in pairs(args) do
|
||||
SendChatMessage(text, "WHISPER", nil, GMGenie.Macros.Whispers.curName);
|
||||
end
|
||||
|
||||
@@ -52,7 +52,7 @@ function GMGenie.Macros.Whispers.addToUnitMenu()
|
||||
UnitPopupMenus["GMGenie_Whispers"] = {};
|
||||
|
||||
local whispersTemp = GMGenie.pairsByKeys2(GMGenie_SavedVars.whispers);
|
||||
for name in pairs(whispersTemp) do
|
||||
for _, name in pairs(whispersTemp) do
|
||||
table.insert(UnitPopupMenus["GMGenie_Whispers"], "GMGenie_Whispers_" .. name);
|
||||
UnitPopupButtons["GMGenie_Whispers_" .. name] = { text = name, dist = 0, };
|
||||
end
|
||||
@@ -70,7 +70,7 @@ function GMGenie.Macros.Whispers.loadDropdown(_, level)
|
||||
UIDropDownMenu_AddButton(info, level);
|
||||
|
||||
local whispersTemp = GMGenie.pairsByKeys2(GMGenie_SavedVars.whispers);
|
||||
for name in pairs(whispersTemp) do
|
||||
for _, name in pairs(whispersTemp) do
|
||||
local info = UIDropDownMenu_CreateInfo();
|
||||
info.hasArrow = false;
|
||||
info.notCheckable = true;
|
||||
|
||||
@@ -68,7 +68,7 @@ function GMGenie.Macros.onLoad()
|
||||
table.insert(GMGenie.Macros.menuItems, "IpBan");
|
||||
GMGenie.Macros.Discipline.IpBan.addToUnitMenu();
|
||||
|
||||
for button in ipairs(GMGenie.Macros.menuItems) do
|
||||
for _, button in ipairs(GMGenie.Macros.menuItems) do
|
||||
table.insert(UnitPopupMenus["PLAYER"], #UnitPopupMenus["PLAYER"] - 1, "GMGenie_" .. button);
|
||||
table.insert(UnitPopupMenus["FRIEND"], #UnitPopupMenus["FRIEND"] - 1, "GMGenie_" .. button);
|
||||
table.insert(UnitPopupMenus["PARTY"], #UnitPopupMenus["PARTY"] - 1, "GMGenie_" .. button);
|
||||
|
||||
@@ -30,7 +30,7 @@ GMGenie.Macros.Discipline.Mute.currentEditing = nil;
|
||||
|
||||
function GMGenie.Macros.Discipline.Mute.loadOptionsDropdown()
|
||||
local MuteTemp = GMGenie.pairsByKeys2(GMGenie_SavedVars.mute);
|
||||
for name in pairs(MuteTemp) do
|
||||
for _, name in pairs(MuteTemp) do
|
||||
local info = UIDropDownMenu_CreateInfo();
|
||||
info.text = name;
|
||||
info.value = name;
|
||||
@@ -98,7 +98,7 @@ GMGenie.Macros.Discipline.CharBan.currentEditing = nil;
|
||||
|
||||
function GMGenie.Macros.Discipline.CharBan.loadOptionsDropdown()
|
||||
local CharBanTemp = GMGenie.pairsByKeys2(GMGenie_SavedVars.charBan);
|
||||
for name in pairs(CharBanTemp) do
|
||||
for _, name in pairs(CharBanTemp) do
|
||||
local info = UIDropDownMenu_CreateInfo();
|
||||
info.text = name;
|
||||
info.value = name;
|
||||
@@ -166,7 +166,7 @@ GMGenie.Macros.Discipline.AccBan.currentEditing = nil;
|
||||
|
||||
function GMGenie.Macros.Discipline.AccBan.loadOptionsDropdown()
|
||||
local AccBanTemp = GMGenie.pairsByKeys2(GMGenie_SavedVars.accBan);
|
||||
for name in pairs(AccBanTemp) do
|
||||
for _, name in pairs(AccBanTemp) do
|
||||
local info = UIDropDownMenu_CreateInfo();
|
||||
info.text = name;
|
||||
info.value = name;
|
||||
@@ -234,7 +234,7 @@ GMGenie.Macros.Discipline.IpBan.currentEditing = nil;
|
||||
|
||||
function GMGenie.Macros.Discipline.IpBan.loadOptionsDropdown()
|
||||
local IpBanTemp = GMGenie.pairsByKeys2(GMGenie_SavedVars.ipBan);
|
||||
for name in pairs(IpBanTemp) do
|
||||
for _, name in pairs(IpBanTemp) do
|
||||
local info = UIDropDownMenu_CreateInfo();
|
||||
info.text = name;
|
||||
info.value = name;
|
||||
|
||||
@@ -35,7 +35,7 @@ function GMGenie.Macros.Mail.checkMacroLength()
|
||||
if #lines > 1 then
|
||||
maxlength = maxlength - 4;
|
||||
end
|
||||
for line in pairs(lines) do
|
||||
for _, line in pairs(lines) do
|
||||
if string.len(line) > maxlength then
|
||||
GMGenie_Macros_Mail_OptionsWindow_Macro_Frame_Text:SetTextColor(255, 0, 0);
|
||||
else
|
||||
@@ -48,7 +48,7 @@ GMGenie.Macros.Mail.currentEditing = nil;
|
||||
|
||||
function GMGenie.Macros.Mail.loadOptionsDropdown()
|
||||
local MailTemp = GMGenie.pairsByKeys2(GMGenie_SavedVars.mail);
|
||||
for name in pairs(MailTemp) do
|
||||
for _, name in pairs(MailTemp) do
|
||||
local info = UIDropDownMenu_CreateInfo();
|
||||
info.text = name;
|
||||
info.value = name;
|
||||
|
||||
@@ -24,7 +24,7 @@ GMGenie.Macros.Tele.currentEditing = nil;
|
||||
|
||||
function GMGenie.Macros.Tele.loadOptionsDropdown()
|
||||
local TeleTemp = GMGenie.pairsByKeys2(GMGenie_SavedVars.tele);
|
||||
for name in pairs(TeleTemp) do
|
||||
for _, name in pairs(TeleTemp) do
|
||||
local info = UIDropDownMenu_CreateInfo();
|
||||
info.text = name;
|
||||
info.value = name;
|
||||
|
||||
@@ -31,7 +31,7 @@ function GMGenie.Macros.Whispers.checkMacroLength()
|
||||
local macro = string.gsub(macro, "NAME", "abcdefghijkl");
|
||||
local lines = { strsplit("\n", macro) };
|
||||
|
||||
for line in pairs(lines) do
|
||||
for _, line in pairs(lines) do
|
||||
if string.len(line) > 255 then
|
||||
GMGenie_Macros_Whispers_OptionsWindow_Macro_Frame_Text:SetTextColor(255, 0, 0);
|
||||
else
|
||||
@@ -45,7 +45,7 @@ GMGenie.Macros.Whispers.currentEditing = nil;
|
||||
|
||||
function GMGenie.Macros.Whispers.loadOptionsDropdown()
|
||||
local whispersTemp = GMGenie.pairsByKeys2(GMGenie_SavedVars.whispers);
|
||||
for name in pairs(whispersTemp) do
|
||||
for _, name in pairs(whispersTemp) do
|
||||
local info = UIDropDownMenu_CreateInfo();
|
||||
info.text = name;
|
||||
info.value = name;
|
||||
|
||||
@@ -27,7 +27,7 @@ GMGenie.Spawns.Objects = {};
|
||||
|
||||
function GMGenie.Spawns.Objects.loadOptionsDropdown()
|
||||
local objectsTemp = GMGenie.pairsByKeys2(GMGenie_SavedVars.objects);
|
||||
for name in pairs(objectsTemp) do
|
||||
for _, name in pairs(objectsTemp) do
|
||||
local info = UIDropDownMenu_CreateInfo();
|
||||
info.text = name;
|
||||
info.value = name;
|
||||
@@ -85,7 +85,7 @@ GMGenie.Spawns.Npcs = {};
|
||||
|
||||
function GMGenie.Spawns.Npcs.loadOptionsDropdown()
|
||||
local npcsTemp = GMGenie.pairsByKeys2(GMGenie_SavedVars.npcs);
|
||||
for name in pairs(npcsTemp) do
|
||||
for _, name in pairs(npcsTemp) do
|
||||
local info = UIDropDownMenu_CreateInfo();
|
||||
info.text = name;
|
||||
info.value = name;
|
||||
|
||||
@@ -34,7 +34,7 @@ function GMGenie.loadSettings()
|
||||
end
|
||||
|
||||
function GMGenie.setDefault(names)
|
||||
for name in ipairs(names) do
|
||||
for _, name in ipairs(names) do
|
||||
GMGenie_SavedVars[name] = GMGenie.defaultSettings[name];
|
||||
end
|
||||
end
|
||||
|
||||
2
Spy.lua
2
Spy.lua
@@ -284,7 +284,7 @@ end
|
||||
local Saved_SetItemRef = SetItemRef;
|
||||
function SetItemRef(link, text, button, chatFrame)
|
||||
if (strsub(link, 1, 9) == "anticheat") then
|
||||
local name = strsplit(":", link);
|
||||
local _, name = strsplit(":", link);
|
||||
if (button == "LeftButton") then
|
||||
GMGenie.Spy.antiCheat(name);
|
||||
elseif (button == "RightButton") then
|
||||
|
||||
Reference in New Issue
Block a user