-
-
Notifications
You must be signed in to change notification settings - Fork 0
/
fix.eggdrop.cmd.tcl
204 lines (195 loc) · 8.37 KB
/
fix.eggdrop.cmd.tcl
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
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
181
182
183
184
185
186
187
188
189
190
191
192
193
194
195
196
197
198
199
200
201
202
203
204
# https://github.com/eggheads/eggdrop/blob/59d1b044f2cbacf20c5f2425922a7ae3918fc9bd/doc/sphinx_source/mainDocs/tcl-commands.rst#deluser-handle
#########
# HOMEPAGE : github.com/ZarTek-Creole/tcl-fix.eggdrop.cmd
#
# Si vous aussi vous comprenez rien au commandes eggdrop;
# [bot ] commands pour bots
# [user ] commands pour user
# [put ] commands pour put
#########
####
# return preprely the list of servers with [servers]
###
proc servers {} {
set SERVER_LIST [list]
foreach { server_line } $::servers {
set server_data [split [lindex $server_line 0] :];
set server_info [lindex $server_line 1];
set server_addr [lindex $server_data 0];
set server_port [lindex $server_data 1];
set server_pass [lindex $server_data 2];
lappend SERVER_LIST [list $server_addr $server_port $server_pass $server_info]
}
return $SERVER_LIST
}
proc addserver { args } {
# https://github.com/eggheads/eggdrop/blob/59d1b044f2cbacf20c5f2425922a7ae3918fc9bd/doc/sphinx_source/mainDocs/tcl-commands.rst#server-add-iphost-port-password
server add $args
}
proc delserver { args } {
# https://github.com/eggheads/eggdrop/blob/59d1b044f2cbacf20c5f2425922a7ae3918fc9bd/doc/sphinx_source/mainDocs/tcl-commands.rst#server-del-iphost-port
server remove $args
}
proc users { } {
userlist
}
proc put { args } {
set cmd [lindex $args 0]
set opts [lrange $args 1 end]
switch -nocase $cmd {
serv {
# https://github.com/eggheads/eggdrop/blob/59d1b044f2cbacf20c5f2425922a7ae3918fc9bd/doc/sphinx_source/mainDocs/tcl-commands.rst#putserv-text-options
putserv $opts
}
help {
# https://github.com/eggheads/eggdrop/blob/59d1b044f2cbacf20c5f2425922a7ae3918fc9bd/doc/sphinx_source/mainDocs/tcl-commands.rst#puthelp-text-options
puthelp $opts
}
quick {
# https://github.com/eggheads/eggdrop/blob/59d1b044f2cbacf20c5f2425922a7ae3918fc9bd/doc/sphinx_source/mainDocs/tcl-commands.rst#putquick-text-options
putquick $opts
}
kick {
# https://github.com/eggheads/eggdrop/blob/59d1b044f2cbacf20c5f2425922a7ae3918fc9bd/doc/sphinx_source/mainDocs/tcl-commands.rst#putquick-text-options
putkick $opts
}
log {
# https://github.com/eggheads/eggdrop/blob/59d1b044f2cbacf20c5f2425922a7ae3918fc9bd/doc/sphinx_source/mainDocs/tcl-commands.rst#putlog-text
putlog $opts
}
default {
return "put ?serv|help|quick|kick|log? ?opts?"
}
}
}
proc user { args } {
set cmd [lindex $args 0]
set opts [lrange $args 1 end]
switch -nocase $cmd {
count {
# https://github.com/eggheads/eggdrop/blob/59d1b044f2cbacf20c5f2425922a7ae3918fc9bd/doc/sphinx_source/mainDocs/tcl-commands.rst#countusers
countusers $opts
}
add {
# https://github.com/eggheads/eggdrop/blob/59d1b044f2cbacf20c5f2425922a7ae3918fc9bd/doc/sphinx_source/mainDocs/tcl-commands.rst#adduser-handle-hostmask
adduser $opts
}
del {
deluser $opts
}
find {
# https://github.com/eggheads/eggdrop/blob/59d1b044f2cbacf20c5f2425922a7ae3918fc9bd/doc/sphinx_source/mainDocs/tcl-commands.rst#finduser-nickuserhost
finduser $opts
}
list {
# https://github.com/eggheads/eggdrop/blob/59d1b044f2cbacf20c5f2425922a7ae3918fc9bd/doc/sphinx_source/mainDocs/tcl-commands.rst#userlist-flags
userlist
}
isvalid {
# https://github.com/eggheads/eggdrop/blob/59d1b044f2cbacf20c5f2425922a7ae3918fc9bd/doc/sphinx_source/mainDocs/tcl-commands.rst#validuser-handle
validuser $opts
}
passwdisvalid {
# https://github.com/eggheads/eggdrop/blob/59d1b044f2cbacf20c5f2425922a7ae3918fc9bd/doc/sphinx_source/mainDocs/tcl-commands.rst#passwdok-handle-pass
passwdok $opts
}
get {
# https://github.com/eggheads/eggdrop/blob/59d1b044f2cbacf20c5f2425922a7ae3918fc9bd/doc/sphinx_source/mainDocs/tcl-commands.rst#getuser-handle-entry-type-extra-info
getuser $opts
}
set {
# https://github.com/eggheads/eggdrop/blob/59d1b044f2cbacf20c5f2425922a7ae3918fc9bd/doc/sphinx_source/mainDocs/tcl-commands.rst#setuser-handle-entry-type-extra-info
setuser $opts
}
chhandle {
# https://github.com/eggheads/eggdrop/blob/59d1b044f2cbacf20c5f2425922a7ae3918fc9bd/doc/sphinx_source/mainDocs/tcl-commands.rst#chhandle-old-handle-new-handle
chhandle $opts
}
chattr {
# https://github.com/eggheads/eggdrop/blob/59d1b044f2cbacf20c5f2425922a7ae3918fc9bd/doc/sphinx_source/mainDocs/tcl-commands.rst#chattr-handle-changes-channel
chattr $opts
}
kick {
# https://github.com/eggheads/eggdrop/blob/59d1b044f2cbacf20c5f2425922a7ae3918fc9bd/doc/sphinx_source/mainDocs/tcl-commands.rst#putquick-text-options
putkick $opts
}
matchattr {
# https://github.com/eggheads/eggdrop/blob/59d1b044f2cbacf20c5f2425922a7ae3918fc9bd/doc/sphinx_source/mainDocs/tcl-commands.rst#matchattr-handle-flags-channel
matchattr $opts
}
default {
return "user ?count|add|del|find|list|isvalid|passwdisvalid|get|set|chhandle|chattr|kick|matchattr? ?opts?"
}
}
}
# ALL USER CMD BEGIN WITH 'USER' name
proc uservalid { args } {
# https://github.com/eggheads/eggdrop/blob/59d1b044f2cbacf20c5f2425922a7ae3918fc9bd/doc/sphinx_source/mainDocs/tcl-commands.rst#validuser-handle
validuser $args
}
proc userfind { args } {
# https://github.com/eggheads/eggdrop/blob/59d1b044f2cbacf20c5f2425922a7ae3918fc9bd/doc/sphinx_source/mainDocs/tcl-commands.rst#finduser-nickuserhost
finduser $args
}
# userlist is ok
proc userpasswdisvalid { args } {
# https://github.com/eggheads/eggdrop/blob/59d1b044f2cbacf20c5f2425922a7ae3918fc9bd/doc/sphinx_source/mainDocs/tcl-commands.rst#passwdok-handle-pass
passwdok $args
}
proc userget { args } {
# https://github.com/eggheads/eggdrop/blob/59d1b044f2cbacf20c5f2425922a7ae3918fc9bd/doc/sphinx_source/mainDocs/tcl-commands.rst#getuser-handle-entry-type-extra-info
getuser $args
}
proc userset { args } {
# https://github.com/eggheads/eggdrop/blob/59d1b044f2cbacf20c5f2425922a7ae3918fc9bd/doc/sphinx_source/mainDocs/tcl-commands.rst#setuser-handle-entry-type-extra-info
setuser $args
}
proc userchhandle { args } {
# https://github.com/eggheads/eggdrop/blob/59d1b044f2cbacf20c5f2425922a7ae3918fc9bd/doc/sphinx_source/mainDocs/tcl-commands.rst#chhandle-old-handle-new-handle
chhandle $args
}
proc userchattr { args } {
# https://github.com/eggheads/eggdrop/blob/59d1b044f2cbacf20c5f2425922a7ae3918fc9bd/doc/sphinx_source/mainDocs/tcl-commands.rst#chattr-handle-changes-channel
chattr $args
}
proc usermatchattr { args } {
# https://github.com/eggheads/eggdrop/blob/59d1b044f2cbacf20c5f2425922a7ae3918fc9bd/doc/sphinx_source/mainDocs/tcl-commands.rst#matchattr-handle-flags-channel
matchattr $args
}
proc useradd { args } {
# https://github.com/eggheads/eggdrop/blob/59d1b044f2cbacf20c5f2425922a7ae3918fc9bd/doc/sphinx_source/mainDocs/tcl-commands.rst#adduser-handle-hostmask
adduser $args
}
proc bot { args } {
set cmd [lindex $args 0]
set opts [lrange $args 1 end]
switch -nocase $cmd {
log {
# https://github.com/eggheads/eggdrop/blob/59d1b044f2cbacf20c5f2425922a7ae3918fc9bd/doc/sphinx_source/mainDocs/tcl-commands.rst#putlog-text
putlog $opts
}
attr {
# https://github.com/eggheads/eggdrop/blob/59d1b044f2cbacf20c5f2425922a7ae3918fc9bd/doc/sphinx_source/mainDocs/tcl-commands.rst#botattr-handle-changes-channel
botattr $opts
}
del {
# https://github.com/eggheads/eggdrop/blob/59d1b044f2cbacf20c5f2425922a7ae3918fc9bd/doc/sphinx_source/mainDocs/tcl-commands.rst#deluser-handle
deluser $opts
}
add {
# https://github.com/eggheads/eggdrop/blob/59d1b044f2cbacf20c5f2425922a7ae3918fc9bd/doc/sphinx_source/mainDocs/tcl-commands.rst#addbot-handle-address-botport-userport
addbot $opts
}
default {
return "bot ?log|attr|del? ?opts?"
}
}
}
# ALL BOT CMD BEGIN WITH 'BOT' name
proc delbot { args } {
# https://github.com/eggheads/eggdrop/blob/59d1b044f2cbacf20c5f2425922a7ae3918fc9bd/doc/sphinx_source/mainDocs/tcl-commands.rst#deluser-handle
deluser $args
}
proc botadd { args } {
addbot $args
}