Редакция 3 | Только различия | Не учитывать пробелы | Содержимое файла | Авторство | Последнее изменение | Открыть журнал | RSS
Редакция 3 | Редакция 6 | ||
---|---|---|---|
1 | # -*- coding: utf-8 -*-
|
1 | # -*- coding: utf-8 -*-
|
2 | """ Neo-Modus Direct Connect Protocol Package """
|
2 | """ Neo-Modus Direct Connect Protocol Package """
|
3 | from protocol import NMDC |
3 | from protocol import NMDC |
4 | 4 | ||
5 | class NMDCClientToHub(NMDC): |
5 | class NMDCClientToHub(NMDC): |
6 | def nmdc_BadPass(self): |
6 | def nmdc_BadPass(self): |
7 | pass
|
7 | pass
|
8 | 8 | ||
9 | def nmdc_BotList(self): |
9 | def nmdc_BotList(self): |
10 | pass
|
10 | pass
|
11 | 11 | ||
12 | def nmdc_Close(self): |
12 | def nmdc_Close(self): |
13 | pass
|
13 | pass
|
14 | 14 | ||
15 | def nmdc_ConnectToMe(self): |
15 | def nmdc_ConnectToMe(self): |
16 | pass
|
16 | pass
|
17 | 17 | ||
18 | def nmdc_ForceMove(self): |
18 | def nmdc_ForceMove(self): |
19 | pass
|
19 | pass
|
20 | 20 | ||
21 | def nmdc_GetNickList(self): |
21 | def nmdc_GetNickList(self): |
22 | pass
|
22 | pass
|
23 | 23 | ||
24 | def nmdc_GetPass(self): |
24 | def nmdc_GetPass(self): |
25 | pass
|
25 | pass
|
26 | 26 | ||
27 | def nmdc_Hello(self, params): |
27 | def nmdc_Hello(self, params): |
28 | self.sendLine("$Version 1,0091|$GetNickList|$MyINFO $ALL twistedbot TEST<++ V:0.698,M:A,H:1/0/0,S:5>$ $0.005$$0$|") |
28 | self.sendLine("$Version 1,0091|$GetNickList|$MyINFO $ALL twistedbot TEST<++ V:0.698,M:A,H:1/0/0,S:5>$ $0.005$$0$|") |
29 | #self.makeAnswer("Version","1,0099")
|
29 | #self.makeAnswer("Version","1,0099")
|
30 | #self.makeAnswer("GetNickList","")
|
30 | #self.makeAnswer("GetNickList","")
|
31 | #self.makeAnswer("MyINFO","$ALL twistedbot<++ V:0.698,M:A,H:1/0/0,S:5>$ $0.005$$0$")
|
31 | #self.makeAnswer("MyINFO","$ALL twistedbot<++ V:0.698,M:A,H:1/0/0,S:5>$ $0.005$$0$")
|
32 | 32 | ||
33 | def nmdc_HubIsFull(self): |
33 | def nmdc_HubIsFull(self): |
34 | pass
|
34 | pass
|
35 | 35 | ||
36 | def nmdc_HubName(self, params): |
36 | def nmdc_HubName(self, params): |
37 | pass
|
37 | pass
|
38 | 38 | ||
39 | def nmdc_HubTopic(self): |
39 | def nmdc_HubTopic(self): |
40 | pass
|
40 | pass
|
41 | 41 | ||
42 | def nmdc_Key(self, params): |
42 | def nmdc_Key(self, params): |
43 | print "nmdc_Key" |
43 | print "nmdc_Key" |
44 | pass
|
44 | pass
|
45 | 45 | ||
46 | def nmdc_Kick(self): |
46 | def nmdc_Kick(self): |
47 | pass
|
47 | pass
|
48 | 48 | ||
49 | def nmdc_Lock(self, params): |
49 | def nmdc_Lock(self, params): |
50 | from tools.dctools import createKey |
50 | from tools.dctools import createKey |
51 | keylock = createKey(params) |
51 | keylock = createKey(params) |
52 | print "nmdc_Lock: %s" %keylock |
52 | print "nmdc_Lock: %s" %keylock |
53 | self.makeAnswer("Supports", |
53 | self.makeAnswer("Supports", |
54 | "UserCommand NoGetINFO NoHello UserIP2 TTHSearch ZPipe0") |
54 | "UserCommand NoGetINFO NoHello UserIP2 TTHSearch ZPipe0") |
55 | self.makeAnswer("Key", keylock) |
55 | self.makeAnswer("Key", keylock) |
56 | self.makeAnswer("ValidateNick", "twistedbot") |
56 | self.makeAnswer("ValidateNick", "twistedbot") |
57 | 57 | ||
58 | def nmdc_LogedIn(self): |
58 | def nmdc_LogedIn(self): |
59 | pass
|
59 | pass
|
60 | 60 | ||
61 | def nmdc_MyINFO(self): |
61 | def nmdc_MyINFO(self): |
62 | pass
|
62 | pass
|
63 | 63 | ||
64 | def nmdc_MyPass(self): |
64 | def nmdc_MyPass(self): |
65 | pass
|
65 | pass
|
66 | 66 | ||
67 | def nmdc_NickList(self): |
67 | def nmdc_NickList(self): |
68 | pass
|
68 | pass
|
69 | 69 | ||
70 | def nmdc_OpForceMove(self): |
70 | def nmdc_OpForceMove(self): |
71 | pass
|
71 | pass
|
72 | 72 | ||
73 | def nmdc_OpList(self): |
73 | def nmdc_OpList(self): |
74 | pass
|
74 | pass
|
75 | 75 | ||
76 | def nmdc_Quit(self): |
76 | def nmdc_Quit(self): |
77 | pass
|
77 | pass
|
78 | 78 | ||
79 | def nmdc_RevConnectToMe(self): |
79 | def nmdc_RevConnectToMe(self): |
80 | pass
|
80 | pass
|
81 | 81 | ||
82 | def nmdc_Search(self): |
82 | def nmdc_Search(self): |
83 | pass
|
83 | pass
|
84 | 84 | ||
85 | def nmdc_SR(self): |
85 | def nmdc_SR(self): |
86 | pass
|
86 | pass
|
87 | 87 | ||
88 | def nmdc_Supports(self, params): |
88 | def nmdc_Supports(self, params): |
89 | pass
|
89 | pass
|
90 | 90 | ||
91 | def nmdc_UserCommand(self): |
91 | def nmdc_UserCommand(self): |
92 | pass
|
92 | pass
|
93 | 93 | ||
94 | def nmdc_UserIP(self): |
94 | def nmdc_UserIP(self, params): |
95 | pass
|
95 | print "nmdc_UserIP: %s" % params |
96 | 96 | ||
97 | def nmdc_Version(self): |
97 | def nmdc_Version(self): |
98 | pass
|
98 | pass
|
99 | 99 | ||
100 | def nmdc_ValidateNick(self): |
100 | def nmdc_ValidateNick(self): |
101 | pass
|
101 | pass
|
102 | 102 | ||
103 | def nmdc_ValidateDenide(self): |
103 | def nmdc_ValidateDenide(self): |
104 | pass
|
104 | pass
|
105 | 105 | ||
106 | 106 |