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
|
on 9:text:.privchan:#:{
.notice $nick Usage: $1 on/off/status/hostadd/hostdel/hostlist
}
on 9:text:.privchan *:#:{
if ($2 == help) { .notice $nick Usage: $1 on/off/status/hostadd/hostdel/hostlist | halt }
if ($2 == on) { writeini privchan.ini $chan status on | .notice $nick Done | halt }
if ($2 == off) { writeini privchan.ini $chan status off | .notice $nick Done | halt }
if ($2 == status) { .notice $nick Status on channel $chan $+ : $iif($readini(privchan.ini,$chan,status),$readini(privchan.ini,$chan,status),OFF) | halt }
if ($2 == hostadd) && ($3) { writeini privchan.ini hosts_ $+ $chan $3 on | .notice $nick Done | halt }
if ($2 == hostdel) && ($3) { remini privchan.ini hosts_ $+ $chan $3 | .notice $nick Done | halt }
if ($2 == hostlist) {
var %i = 1
notice $nick Host list:
while (%i <= $ini(privchan.ini,hosts_ $+ $chan,0)) {
notice $nick $ini(privchan.ini,hosts_ $+ $chan,%i)
inc %i
}
.notice $nick End of list
halt
}
.notice $nick Usage: $1 on/off/status/hostadd/hostdel/hostlist
}
on *:join:#:{
if ($readini(privchan.ini,$chan,status) != on) { halt }
var %i = 1
notie $nick Host list:
while (%i <= $ini(privchan.ini,hosts_ $+ $chan,0)) {
if ($ini(privchan.ini,hosts_ $+ $chan,%i) iswm $fulladdress) { halt }
inc %i
}
mode $chan +b $address($nick,2)
timer 1 300 mode $chan -b $address($nick,2)
kick $chan $nick $chan Admins only
}
|