-
Notifications
You must be signed in to change notification settings - Fork 1
/
Copy path7_bot.lua
130 lines (118 loc) · 3.36 KB
/
7_bot.lua
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
tUserToBot = {
["1_[宋世塑哇蒥"] = {
["sDescription"] = " [晕杏蘛",
["sNeedClient"] = "FlylinkDC++ ",
["sNeedVersion"] = "333",
["sNeedConnection"] = "100",
["sNeedHubs"] = "3/0/0",
["sIP"] = "10.33.33.33",
["sMode"] = "A",
["sEmail"] = "DCBEELINEKZ@mail.ru",
["iShare"] = 3033,
},
-----------------------------------
["2_[僚严判帕紊哇蒥"] = {
["sDescription"] = " [dcbeelinekz.1bb.ru]",
["sNeedClient"] = "FlylinkDC++ ",
["sNeedVersion"] = "333",
["sNeedConnection"] = "100",
["sNeedHubs"] = "3/0/0",
["sIP"] = "10.33.33.33",
["sMode"] = "A",
["sEmail"] = "DCBEELINEKZ@mail.ru",
["iShare"] = 3303,
},
["3_[耛"] = {
["sDescription"] = " [牙梢]",
["sNeedClient"] = "FlylinkDC++ ",
["sNeedVersion"] = "333",
["sNeedConnection"] = "100",
["sNeedHubs"] = "3/0/0",
["sIP"] = "10.33.33.33",
["sMode"] = "A",
["sEmail"] = "DCBEELINEKZ@mail.ru",
["iShare"] = 30303,
},
["4_[信迫膛]"] = {
["sDescription"] = " [dcbeelinekz.do.am]",
["sNeedClient"] = "FlylinkDC++ ",
["sNeedVersion"] = "333",
["sNeedConnection"] = "100",
["sNeedHubs"] = "3/0/0",
["sIP"] = "10.33.33.33",
["sMode"] = "A",
["sEmail"] = "DCBEELINEKZ@mail.ru",
["iShare"] = 3330,
},
["5_[屡淄蚊蝅"] = {
["sDescription"] = " [眯酉侠 率]",
["sNeedClient"] = "FlylinkDC++ ",
["sNeedVersion"] = "333",
["sNeedConnection"] = "100",
["sNeedHubs"] = "3/0/0",
["sIP"] = "10.33.33.33",
["sMode"] = "A",
["sEmail"] = "DCBEELINEKZ@mail.ru",
["iShare"] = 303030,
},
["6_[瓮死赏繻"] = {
["sDescription"] = " [vk.com/dchub_router]",
["sNeedClient"] = "FlylinkDC++ ",
["sNeedVersion"] = "333",
["sNeedConnection"] = "100",
["sNeedHubs"] = "3/0/0",
["sIP"] = "10.33.33.33",
["sMode"] = "A",
["sEmail"] = "DCBEELINEKZ@mail.ru",
["iShare"] = 33030,
},
["7_[雅新判]"] = {
["sDescription"] = " [vk.com/dcbeelinekz]",
["sNeedClient"] = "FlylinkDC++ ",
["sNeedVersion"] = "333",
["sNeedConnection"] = "100",
["sNeedHubs"] = "3/0/0",
["sIP"] = "10.33.33.33",
["sMode"] = "A",
["sEmail"] = "DCBEELINEKZ@mail.ru",
["iShare"] = 330303,
},
}
------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------
function OnStartup()
tNeedToSendAll = {}
DoNeedDescription()
SendFakeDescription()
TmrMan.AddTimer(1000, "OnTimer1")
end
function GetNickListArrival(curUser,sData)
tNeedToSendAll[curUser.sNick] = 1
end
function OnTimer1()
for sName in pairs(tNeedToSendAll) do
local tNeedUser = Core.GetUser(sName)
if tNeedUser and Core.GetUserValue(tNeedUser, 9) then
SendFakeDescription(tNeedUser)
tNeedToSendAll[sName] = nil
end
end
collectgarbage("collect")
end
function SendFakeDescription(curUser)
for i, v in pairs(tUserToBot) do
local sNewMyINFO = v.sMyINFO
local sIPInfo = "$UserIP "..i.." "..v["sIP"]
if not curUser then
Core.SendToAll(sNewMyINFO)
Core.SendToAll(sIPInfo)
else
Core.SendToUser(curUser, sNewMyINFO)
Core.SendToUser(curUser, sIPInfo)
end
end
end
function DoNeedDescription()
for i, v in pairs(tUserToBot) do
tUserToBot[i].sMyINFO = "$MyINFO $ALL "..i.." "..v.sDescription.."<"..(v["sNeedClient"] or "Bot'sDC++").." V:"..(v["sNeedVersion"] or "1.00")..",M:"..(v.sMode or "A")..",H:"..(v["sNeedHubs"] or "0/0/1")..",S:"..(v.iSlots or 0)..">$ $"..(v["sNeedConnection"] or "BOT").."$"..(v.sEmail or "").."$"..(v["iShare"] or 0).."$"
end
end