-
Notifications
You must be signed in to change notification settings - Fork 0
/
pcc.tcl
599 lines (520 loc) · 18.6 KB
/
pcc.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
205
206
207
208
209
210
211
212
213
214
215
216
217
218
219
220
221
222
223
224
225
226
227
228
229
230
231
232
233
234
235
236
237
238
239
240
241
242
243
244
245
246
247
248
249
250
251
252
253
254
255
256
257
258
259
260
261
262
263
264
265
266
267
268
269
270
271
272
273
274
275
276
277
278
279
280
281
282
283
284
285
286
287
288
289
290
291
292
293
294
295
296
297
298
299
300
301
302
303
304
305
306
307
308
309
310
311
312
313
314
315
316
317
318
319
320
321
322
323
324
325
326
327
328
329
330
331
332
333
334
335
336
337
338
339
340
341
342
343
344
345
346
347
348
349
350
351
352
353
354
355
356
357
358
359
360
361
362
363
364
365
366
367
368
369
370
371
372
373
374
375
376
377
378
379
380
381
382
383
384
385
386
387
388
389
390
391
392
393
394
395
396
397
398
399
400
401
402
403
404
405
406
407
408
409
410
411
412
413
414
415
416
417
418
419
420
421
422
423
424
425
426
427
428
429
430
431
432
433
434
435
436
437
438
439
440
441
442
443
444
445
446
447
448
449
450
451
452
453
454
455
456
457
458
459
460
461
462
463
464
465
466
467
468
469
470
471
472
473
474
475
476
477
478
479
480
481
482
483
484
485
486
487
488
489
490
491
492
493
494
495
496
497
498
499
500
501
502
503
504
505
506
507
508
509
510
511
512
513
514
515
516
517
518
519
520
521
522
523
524
525
526
527
528
529
530
531
532
533
534
535
536
537
538
539
540
541
542
543
544
545
546
547
548
549
550
551
552
553
554
555
556
557
558
559
560
561
562
563
564
565
566
567
568
569
570
571
572
573
574
575
576
577
578
579
580
581
582
583
584
585
586
587
588
589
590
591
592
593
594
595
596
597
598
599
# Name Public Channel Commands
# Author wilk wilkowy
# Description Channel commands to manage a bot
# Version 1.11 (2007..2020-04-24)
# License GNU GPL v2 or any later version
# Support https://www.quizpl.net
# Channel flags: chancmds
# Channel commands: (many, check below and finetune flags)
namespace eval chancmds::c {
# Channel command prefix (to edit command names skip to binds section near the end of this file).
variable cmd_prefix "!"
# Put here *handles* of other bots considered as master bots for this one, while present on channel with @ then this bot will not act.
#/just an idea/ variable master_bots [list]
}
# #################################################################### #
namespace eval chancmds {
variable version "1.11"
variable changed "2020-04-24"
variable author "wilk"
proc user_voice {nick uhost hand chan text} {
if {![channel get $chan chancmds]} { return }
if {![botisop $chan]} { return 1 }
set text [fix_args $text]
if {$text eq ""} {
if {![isop $nick $chan] && ![ishalfop $nick $chan] && ![isvoice $nick $chan] && ![matchattr $hand "q|q" $chan]} {
pushmode $chan "+v" $nick
}
} else {
foreach user [split $text] {
if {![onchan $user $chan] || [onchansplit $user $chan] || [isop $user $chan] || [ishalfop $user $chan] || [isvoice $user $chan]} { continue }
set uhand [nick2hand $user $chan]
if {![matchattr $uhand "q|q" $chan]} {
pushmode $chan "+v" $user
}
}
}
return 1
}
proc user_rndvoice {nick uhost hand chan text} {
if {![channel get $chan chancmds]} { return }
if {![botisop $chan]} { return 1 }
set nicks [list]
foreach user [chanlist $chan] {
if {[onchansplit $user $chan] || [isop $user $chan] || [ishalfop $user $chan] || [isvoice $user $chan]} { continue }
set uhand [nick2hand $user $chan]
if {![matchattr $uhand "q|q" $chan]} {
lappend nicks $user
}
}
if {[llength $nicks] > 0} {
pushmode $chan "+v" [lrandom $nicks]
}
}
proc user_devoice {nick uhost hand chan text} {
if {![channel get $chan chancmds]} { return }
if {![botisop $chan]} { return 1 }
set text [fix_args $text]
if {$text eq ""} {
if {[isvoice $nick $chan] && ![matchattr $hand "g|g" $chan]} {
pushmode $chan "-v" $nick
}
} else {
set lvl [get_user_level $hand $chan]
foreach user [split $text] {
if {![onchan $user $chan] || [onchansplit $user $chan] || ![isvoice $user $chan]} { continue }
set uhand [nick2hand $user $chan]
if {![matchattr $uhand "g|g" $chan] && $lvl >= [get_user_level $uhand $chan]} {
pushmode $chan "-v" $user
}
}
}
return 1
}
proc user_op {nick uhost hand chan text} {
if {![channel get $chan chancmds]} { return }
if {![botisop $chan]} { return 1 }
set text [fix_args $text]
if {$text eq ""} {
if {![isop $nick $chan] && ![matchattr $hand "d|d" $chan]} {
pushmode $chan "+o" $nick
}
} else {
foreach user [split $text] {
if {![onchan $user $chan] || [onchansplit $user $chan] || [isop $user $chan]} { continue }
set uhand [nick2hand $user $chan]
if {![matchattr $uhand "d|d" $chan]} {
pushmode $chan "+o" $user
}
}
}
return 1
}
proc user_deop {nick uhost hand chan text} {
if {![channel get $chan chancmds]} { return }
if {![botisop $chan]} { return 1 }
set text [fix_args $text]
if {$text eq ""} {
if {[isop $nick $chan] && ![matchattr $hand "a|a" $chan]} {
pushmode $chan "-o" $nick
if {![ishalfop $nick $chan] && ![isvoice $nick $chan] && ![matchattr $hand "q|q" $chan]} {
pushmode $chan "+v" $nick
}
}
} else {
set lvl [get_user_level $hand $chan]
foreach user [split $text] {
if {![onchan $user $chan] || [onchansplit $user $chan] || [isop $user $chan] || [isbotnick $user]} { continue }
set uhand [nick2hand $user $chan]
if {![matchattr $uhand "a|a" $chan] && $lvl >= [get_user_level $uhand $chan]} {
pushmode $chan "-o" $user
if {![ishalfop $nick $chan] && ![isvoice $user $chan] && ![matchattr $uhand "q|q" $chan]} {
pushmode $chan "+v" $nick
}
}
}
}
return 1
}
proc user_ban {nick uhost hand chan text} {
if {![channel get $chan chancmds]} { return }
set text [fix_args $text]
if {![botisop $chan] || $text eq ""} { return 1 }
set whom [get_arg $text]
if {[isbotnick $whom]} { return 1 }
if {[onchan $whom $chan]} {
if {[get_user_level $hand $chan] >= [get_user_level [nick2hand $whom] $chan]} {
set mask [maskhost "$whom\![getchanhost $whom $chan]"]
#set mask "*!*[lindex [split $mask "!"] 1]"
} else {
return 1
}
} else {
set mask $whom
}
set reason [get_str $text]
if {$reason ne ""} {
append reason " - "
}
append reason "requested by: $nick"
newchanban $chan $mask $nick $reason
return 1
}
proc user_kickban {nick uhost hand chan text} {
if {![channel get $chan chancmds]} { return }
set text [fix_args $text]
if {![botisop $chan] || $text eq ""} { return 1 }
set whom [get_arg $text]
if {![onchan $whom $chan] || [isbotnick $whom] || [onchansplit $whom $chan] || [get_user_level $hand $chan] < [get_user_level [nick2hand $whom] $chan]} { return 1 }
set mask [maskhost "$whom\![getchanhost $whom $chan]"]
#set mask "*!*[lindex [split $mask "!"] 1]"
set reason [get_str $text]
if {$reason ne ""} {
append reason " - "
}
append reason "requested by: $nick"
newchanban $chan $mask $nick $reason
putkick $chan $whom $reason
return 1
}
proc user_unban {nick uhost hand chan text} {
if {![channel get $chan chancmds]} { return }
set text [fix_args $text]
if {![botisop $chan] || $text eq ""} { return 1 }
set mask [get_arg $text]
if {[ischanban $mask $chan]} {
killchanban $chan $mask
#pushmode $chan "-b" $mask
}
return 1
}
proc user_kick {nick uhost hand chan text} {
if {![channel get $chan chancmds]} { return }
set text [fix_args $text]
if {![botisop $chan] || $text eq ""} { return 1 }
set whom [get_arg $text]
if {![onchan $whom $chan] || [isbotnick $whom] || [onchansplit $whom $chan] || [get_user_level $hand $chan] < [get_user_level [nick2hand $whom] $chan]} { return 1 }
set reason [get_str $text]
if {$reason ne ""} {
append reason " - "
}
append reason "requested by: $nick"
putkick $chan $whom $reason
return 1
}
proc user_shutup {nick uhost hand chan text} {
if {![channel get $chan chancmds]} { return }
set text [fix_args $text]
if {![botisop $chan] || $text eq ""} { return 1 }
set whom [get_arg $text]
if {![onchan $whom $chan] || [isbotnick $whom]} { return 1 }
# && $whom != $nick
if {![isvoice $nick $chan] && ![isop $nick $chan]} {
pushmode $chan "+v" $nick
}
if {[isvoice $whom $chan]} {
pushmode $chan "-v" $whom
}
if {[isop $whom $chan]} {
pushmode $chan "-o" $whom
}
pushmode $chan "+m"
return 1
}
proc chan_lock {nick uhost hand chan text} {
if {![channel get $chan chancmds]} { return }
if {[botisop $chan]} {
#putcmdlog "<<$nick>> !$hand! mode $chan +imp"
pushmode $chan "+i"
pushmode $chan "+m"
pushmode $chan "+p"
}
return 1
}
proc chan_unlock {nick uhost hand chan text} {
if {![channel get $chan chancmds]} { return }
if {[botisop $chan]} {
pushmode $chan "-i"
pushmode $chan "-m"
pushmode $chan "-p"
}
return 1
}
proc chan_topic {nick uhost hand chan text} {
if {![channel get $chan chancmds]} { return }
if {[botisop $chan] && [fix_args $text] ne ""} {
settopic $chan $text
}
return 1
}
proc chan_mode {nick uhost hand chan text} {
if {![channel get $chan chancmds]} { return }
set text [fix_args $text]
if {[botisop $chan] && $text ne ""} {
#set modes [lrange [split $text] 0 6]
setmodes $chan $text
}
return 1
}
proc chan_ulimit {nick uhost hand chan text} {
if {![channel get $chan chancmds]} { return }
if {[botisop $chan]} {
pushmode $chan "-l"
}
return 1
}
proc bot_rehash {nick uhost hand chan text} {
if {![channel get $chan chancmds]} { return }
if {[isop $nick $chan]} {
rehash
}
return 1
}
proc bot_restart {nick uhost hand chan text} {
if {![channel get $chan chancmds]} { return }
if {[isop $nick $chan]} {
restart
}
return 1
}
proc bot_backup {nick uhost hand chan text} {
if {![channel get $chan chancmds]} { return }
if {[isop $nick $chan]} {
backup
}
return 1
}
proc bot_save {nick uhost hand chan text} {
if {![channel get $chan chancmds]} { return }
if {[isop $nick $chan]} {
save
}
return 1
}
proc bot_reload {nick uhost hand chan text} {
if {![channel get $chan chancmds]} { return }
if {[isop $nick $chan]} {
reload
}
return 1
}
proc bot_die {nick uhost hand chan text} {
if {![channel get $chan chancmds]} { return }
if {[isop $nick $chan]} {
set reason [get_str [fix_args $text]]
if {$reason ne ""} {
append reason " - "
}
append reason "requested by: $nick"
die $reason
}
return 1
}
proc bot_jump {nick uhost hand chan text} {
if {![channel get $chan chancmds]} { return }
if {[isop $nick $chan]} {
set server [get_arg [fix_args $text]]
if {$server ne ""} {
jump $server
}
}
return 1
}
proc chan_msg {nick uhost hand chan text} {
if {![channel get $chan chancmds]} { return }
set text [fix_args $text]
if {$text ne ""} {
set where [get_arg $text]
#if {![channel get $where chancmds] || ![botonchan $where]} { return }
set msg [get_str $text]
sendmsg $where $msg
}
return 1
}
proc chan_notice {nick uhost hand chan text} {
if {![channel get $chan chancmds]} { return }
set text [fix_args $text]
if {$text ne ""} {
set where [get_arg $text]
#if {![channel get $where chancmds] || ![botonchan $where]} { return }
set msg [get_str $text]
sendnotc $where $msg
}
return 1
}
proc chan_action {nick uhost hand chan text} {
if {![channel get $chan chancmds]} { return }
set text [fix_args $text]
if {$text ne ""} {
set where [get_arg $text]
#if {![channel get $where chancmds] || ![botonchan $where]} { return }
set msg [get_str $text]
sendact $where $msg
}
return 1
}
proc misc_os {nick uhost hand chan text} {
if {![channel get $chan chancmds]} { return }
set unixtime [unixtime]
set datetime [strftime "%FT%T%z"]
set uptime [duration [expr {$unixtime - $::uptime}]]
set conntime [duration [expr {$unixtime - ${::server-online}}]]
sendmsg $nick "Eggdrop: \002$::version\002 | TCL: \002$::tcl_version\002 / \002$::tcl_patchLevel\002 | OS: \002[unames]\002 | IRC-server: \002$::server\002 (\002$::serveraddress\002) | Online: \002$conntime\002 | Uptime: \002$uptime\002 | Date: \002$datetime\002 | Epoch: \002$unixtime\002"
return 1
}
proc bot_adduser {nick uhost hand chan text} {
if {![channel get $chan chancmds]} { return }
set whom [get_arg [fix_args $text]]
if {![validuser $whom] && $whom ne ""} {
adduser $whom
}
return 1
}
proc bot_deluser {nick uhost hand chan text} {
if {![channel get $chan chancmds]} { return }
set whom [get_arg [fix_args $text]]
if {[validuser $whom]} {
deluser $whom
}
return 1
}
proc bot_addhost {nick uhost hand chan text} {
if {![channel get $chan chancmds]} { return }
set text [fix_args $text]
set whom [get_arg $text]
if {[validuser $whom]} {
set host [get_arg $text 1]
if {$host ne ""} {
setuser $whom HOSTS $host
}
}
return 1
}
proc bot_nick {nick uhost hand chan text} {
if {![channel get $chan chancmds]} { return }
set ::nick [get_arg [fix_args $text]]
return 1
}
proc get_user_level {hand chan} {
if {$hand eq "*" || $hand eq ""} { return 0 }
set lvl 0
if {[matchattr $hand "v|v" $chan] || [matchattr $hand "g|g" $chan]} { set lvl [expr {$lvl | 0x01}] }
if {[matchattr $hand "l|l" $chan] || [matchattr $hand "y|y" $chan]} { set lvl [expr {$lvl | 0x02}] }
if {[matchattr $hand "o|o" $chan] || [matchattr $hand "a|a" $chan]} { set lvl [expr {$lvl | 0x04}] }
if {[matchattr $hand "-|m" $chan]} { set lvl [expr {$lvl | 0x08}] }
if {[matchattr $hand "m|-" $chan]} { set lvl [expr {$lvl | 0x10}] }
if {[matchattr $hand "-|n" $chan]} { set lvl [expr {$lvl | 0x20}] }
if {[matchattr $hand "n|-" $chan]} { set lvl [expr {$lvl | 0x40}] }
if {[matchattr $hand "f|f" $chan]} { set lvl [expr {$lvl | 0x80}] }
return $lvl
}
# -=-=-=-=-=-
proc init {} {
variable version; variable author
set ns [namespace current]
if {![info exists ::wilk::version]} {
uplevel #0 source [file dirname [info script]]/wilk.tcl
}
namespace import ::wilk::*
::wilk::register $ns
setudef flag chancmds
bind pub m|m +o ${ns}::user_op
bind pub m|m ${c::cmd_prefix}o ${ns}::user_op
bind pub m|m ${c::cmd_prefix}op ${ns}::user_op
bind pub m|m -o ${ns}::user_deop
bind pub m|m ${c::cmd_prefix}do ${ns}::user_deop
bind pub m|m ${c::cmd_prefix}deop ${ns}::user_deop
bind pub v|v +v ${ns}::user_voice
bind pub v|v ${c::cmd_prefix}v ${ns}::user_voice
bind pub v|v ${c::cmd_prefix}voice ${ns}::user_voice
bind pub v|v ${c::cmd_prefix}rv ${ns}::user_rndvoice
bind pub v|v ${c::cmd_prefix}rvoice ${ns}::user_rndvoice
bind pub v|v -v ${ns}::user_devoice
bind pub v|v ${c::cmd_prefix}dv ${ns}::user_devoice
bind pub v|v ${c::cmd_prefix}devoice ${ns}::user_devoice
#bind pub o|o ${c::cmd_prefix}k ${ns}::user_kick
bind pub o|o ${c::cmd_prefix}kick ${ns}::user_kick
#bind pub m|m ${c::cmd_prefix}b ${ns}::user_ban
bind pub m|m ${c::cmd_prefix}ban ${ns}::user_ban
#bind pub m|m ${c::cmd_prefix}kb ${ns}::user_kickban
bind pub m|m ${c::cmd_prefix}kickban ${ns}::user_kickban
#bind pub m|m ${c::cmd_prefix}ub ${ns}::user_unban
bind pub m|m ${c::cmd_prefix}unban ${ns}::user_unban
bind pub m|m ${c::cmd_prefix}shutup ${ns}::user_shutup
bind pub m|m ${c::cmd_prefix}silence ${ns}::user_shutup
bind pub m|m ${c::cmd_prefix}quiet ${ns}::user_shutup
bind pub m|m ${c::cmd_prefix}stfu ${ns}::user_shutup
bind pub o|o ${c::cmd_prefix}msg ${ns}::chan_msg
bind pub o|o ${c::cmd_prefix}say ${ns}::chan_msg
bind pub o|o ${c::cmd_prefix}notice ${ns}::chan_notice
bind pub o|o ${c::cmd_prefix}me ${ns}::chan_action
bind pub v|v ${c::cmd_prefix}t ${ns}::chan_topic
bind pub v|v ${c::cmd_prefix}topic ${ns}::chan_topic
bind pub n|n ${c::cmd_prefix}mode ${ns}::chan_mode
bind pub m|m -l ${ns}::chan_ulimit
#bind pub m|m ${c::cmd_prefix}ul ${ns}::chan_ulimit
bind pub m|m ${c::cmd_prefix}ulimit ${ns}::chan_ulimit
bind pub m|m ${c::cmd_prefix}unlimit ${ns}::chan_ulimit
#bind pub n|n ${c::cmd_prefix}cl ${ns}::chan_lock
bind pub n|n ${c::cmd_prefix}lock ${ns}::chan_lock
#bind pub n|n ${c::cmd_prefix}cu ${ns}::chan_unlock
bind pub n|n ${c::cmd_prefix}unlock ${ns}::chan_unlock
bind pub n|- ${c::cmd_prefix}adduser ${ns}::bot_adduser
bind pub n|- ${c::cmd_prefix}deluser ${ns}::bot_deluser
bind pub n|- ${c::cmd_prefix}addhost ${ns}::bot_addhost
bind pub n|- ${c::cmd_prefix}nick ${ns}::bot_nick
bind pub m|- ${c::cmd_prefix}rehash ${ns}::bot_rehash
bind pub n|- ${c::cmd_prefix}restart ${ns}::bot_restart
bind pub n|- ${c::cmd_prefix}reload ${ns}::bot_reload
bind pub m|- ${c::cmd_prefix}save ${ns}::bot_save
bind pub n|- ${c::cmd_prefix}backup ${ns}::bot_backup
bind pub n|n ${c::cmd_prefix}jump ${ns}::bot_jump
bind pub n|- ${c::cmd_prefix}die ${ns}::bot_die
bind pub n|- ${c::cmd_prefix}os ${ns}::misc_os
putlog "ChanCmds v$version by $author"
}
proc unload {{keepns 0}} {
set ns [namespace current]
catch { unbind pub m|m +o ${ns}::user_op }
catch { unbind pub m|m ${c::cmd_prefix}o ${ns}::user_op }
catch { unbind pub m|m ${c::cmd_prefix}op ${ns}::user_op }
catch { unbind pub m|m -o ${ns}::user_deop }
catch { unbind pub m|m ${c::cmd_prefix}do ${ns}::user_deop }
catch { unbind pub m|m ${c::cmd_prefix}deop ${ns}::user_deop }
catch { unbind pub v|v +v ${ns}::user_voice }
catch { unbind pub v|v ${c::cmd_prefix}v ${ns}::user_voice }
catch { unbind pub v|v ${c::cmd_prefix}voice ${ns}::user_voice }
catch { unbind pub v|v ${c::cmd_prefix}rv ${ns}::user_rndvoice }
catch { unbind pub v|v ${c::cmd_prefix}rvoice ${ns}::user_rndvoice }
catch { unbind pub v|v -v ${ns}::user_devoice }
catch { unbind pub v|v ${c::cmd_prefix}dv ${ns}::user_devoice }
catch { unbind pub v|v ${c::cmd_prefix}devoice ${ns}::user_devoice }
catch { unbind pub o|o ${c::cmd_prefix}k ${ns}::user_kick }
catch { unbind pub o|o ${c::cmd_prefix}kick ${ns}::user_kick }
catch { unbind pub m|m ${c::cmd_prefix}b ${ns}::user_ban }
catch { unbind pub m|m ${c::cmd_prefix}ban ${ns}::user_ban }
catch { unbind pub m|m ${c::cmd_prefix}kb ${ns}::user_kickban }
catch { unbind pub m|m ${c::cmd_prefix}kickban ${ns}::user_kickban }
catch { unbind pub m|m ${c::cmd_prefix}ub ${ns}::user_unban }
catch { unbind pub m|m ${c::cmd_prefix}unban ${ns}::user_unban }
catch { unbind pub m|m ${c::cmd_prefix}shutup ${ns}::user_shutup }
catch { unbind pub m|m ${c::cmd_prefix}silence ${ns}::user_shutup }
catch { unbind pub m|m ${c::cmd_prefix}quiet ${ns}::user_shutup }
catch { unbind pub m|m ${c::cmd_prefix}stfu ${ns}::user_shutup }
catch { unbind pub o|o ${c::cmd_prefix}msg ${ns}::chan_msg }
catch { unbind pub o|o ${c::cmd_prefix}say ${ns}::chan_msg }
catch { unbind pub o|o ${c::cmd_prefix}notice ${ns}::chan_notice }
catch { unbind pub o|o ${c::cmd_prefix}me ${ns}::chan_action }
catch { unbind pub v|v ${c::cmd_prefix}t ${ns}::chan_topic }
catch { unbind pub v|v ${c::cmd_prefix}topic ${ns}::chan_topic }
catch { unbind pub n|n ${c::cmd_prefix}mode ${ns}::chan_mode }
catch { unbind pub m|m -l ${ns}::chan_ulimit }
catch { unbind pub m|m ${c::cmd_prefix}ul ${ns}::chan_ulimit }
catch { unbind pub m|m ${c::cmd_prefix}ulimit ${ns}::chan_ulimit }
catch { unbind pub m|m ${c::cmd_prefix}unlimit ${ns}::chan_ulimit }
catch { unbind pub n|n ${c::cmd_prefix}cl ${ns}::chan_lock }
catch { unbind pub n|n ${c::cmd_prefix}lock ${ns}::chan_lock }
catch { unbind pub n|n ${c::cmd_prefix}cu ${ns}::chan_unlock }
catch { unbind pub n|n ${c::cmd_prefix}unlock ${ns}::chan_unlock }
catch { unbind pub n|- ${c::cmd_prefix}adduser ${ns}::bot_adduser }
catch { unbind pub n|- ${c::cmd_prefix}deluser ${ns}::bot_deluser }
catch { unbind pub n|- ${c::cmd_prefix}addhost ${ns}::bot_addhost }
catch { unbind pub n|- ${c::cmd_prefix}nick ${ns}::bot_nick }
catch { unbind pub m|- ${c::cmd_prefix}rehash ${ns}::bot_rehash }
catch { unbind pub n|- ${c::cmd_prefix}restart ${ns}::bot_restart }
catch { unbind pub n|- ${c::cmd_prefix}reload ${ns}::bot_reload }
catch { unbind pub m|- ${c::cmd_prefix}save ${ns}::bot_save }
catch { unbind pub n|- ${c::cmd_prefix}backup ${ns}::bot_backup }
catch { unbind pub n|n ${c::cmd_prefix}jump ${ns}::bot_jump }
catch { unbind pub n|- ${c::cmd_prefix}die ${ns}::bot_die }
catch { unbind pub n|- ${c::cmd_prefix}os ${ns}::misc_os }
if {!$keepns} {
namespace delete $ns
}
}
proc uninstall {} {
unload
deludef flag chancmds
}
init
}