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
|
; Q Chanlev by Teppuli (#AndRew @ QuakeNet). Copyright (C) 2008 Teppuli & AndRew
on 9:text:.chanlev *:#:{
if (!$3) {
if (%qchanlevpending) { notice $nick Another request in process, please try again. | halt }
if ($left($2,1) == $chr(35)) { processchanlevauth $chan $2 | halt }
if ($2 !ison $chan) { msg $chan Nickname $2 isnt on this channel | halt }
processchanlev $chan $2
halt
}
if ($3) {
if (%qchanlevpending) { notice $nick Another request in process, please try again. | halt }
if ($left($2,1) == $chr(35)) { processchangechanlevauth $chan $2 $3 | halt }
if ($2 !ison $chan) { msg $chan Nickname $2 isnt on this channel | halt }
processchangechanlev $chan $2 $3
halt
}
}
on 9:text:.chanlev:#:{
if (%qchanlevpending) { notice $nick Another request in process, please try again. | halt }
if (Q !ison $chan) { notice $nick No Q on this channel | halt }
set -u10 %qchanlevpending $chan
msg q chanlev $chan
}
on *:text:.chanlevversion:#:{
notice $nick Script file $+(",$remove($script,$scriptdir),") loaded. Q chanlev script by Teppuli (#teppuli & #AndRew @ QuakeNet) (Linecount: $lines($script) $+ ) Copyright (C) 2008 Teppuli & AndRew
}
on *:notice:*:?:{
if ($nick != Q) { halt }
if (!%qchanlevpending) { halt }
if (User #* is not known on #*. iswm $1-) {
msg %qchanlevpending Auth $remove($2,$chr(35)) is not known on this channel.
unset %qchanlevpending
halt
}
if (Done. User #* is no longer known on #*. iswm $1-) {
msg %qchanlevpending Auth $remove($3,$chr(35)) is not longer known on this channel.
unset %qchanlevpending
halt
}
if (Done. User * is no longer known on #*. iswm $1-) {
msg %qchanlevpending Nickname $remove($3,$chr(35)) is not longer known on this channel.
unset %qchanlevpending
halt
}
if (User * is not known on #*. iswm $1-) {
msg %qchanlevpending Nickname $remove($2,$chr(35)) is not known on this channel.
unset %qchanlevpending
halt
}
if (Done. Flags for #* on #* are now: *. iswm $1-) {
msg %qchanlevpending New flags for auth $remove($4,$chr(35)) are: $remove($9,$chr(46))
unset %qchanlevpending
halt
}
if (Done. Flags for * on #* are now: *. iswm $1-) {
msg %qchanlevpending New flags for nick $4 are: $remove($9,$chr(46))
unset %qchanlevpending
halt
}
if (Can't find user #*. iswm $1-) {
msg %qchanlevpending Can't find auth $remove($remove($4,$chr(35)),$chr(46))
unset %qchanlevpending
halt
}
if (Can't find user *. iswm $1-) {
msg %qchanlevpending Can't find nickname $remove($remove($4,$chr(35)),$chr(46))
unset %qchanlevpending
halt
}
if (Nothing changed. Your requested flag combination change was either the same as the existing flags, impossible, or you don't have enough access. iswm $1-) {
msg %qchanlevpending Nothing changed. I maybe dont have enough address, or requested flags are same as existing flags, or requested flag combination is impossible
unset %qchanlevpending
halt
}
if (Flags for #* on #*: * iswm $1-) {
msg %qchanlevpending Flags for auth $remove($3,$chr(35)) are: $6
unset %qchanlevpending
halt
}
if (Flags for * on #*: * iswm $1-) {
msg %qchanlevpending Flags for nick $3 are: $6
unset %qchanlevpending
halt
}
if (You do not have sufficient access on * to use chanlev. iswm $1-) { msg %qchanlevpending I dont have sufficient access on Q. | unset %qchanlevpending | halt }
if (Total: * (owner: * master: * op: * voice: * known: * ban: *). !iswm $1-) { halt }
msg %qchanlevpending Q chanlev info. Total: $2 $+ . Owners: $remove($4,$chr(44)) $+ . Masters: $remove($6,$chr(44)) $+ . Ops: $remove($8,$chr(44)) $+ . Voices: $remove($10,$chr(44)) $+ . Known: $remove($12,$chr(44)) $+ . Bans: $remove($14,$chr(41) $+ .) $+ .
unset %qchanlevpending
}
alias -l auth {
if (!$ial($1).mark) {
who $1 n%nat,465
return 0
halt
}
return $ial($1).mark
}
raw 354:& 465 & *: {
ialmark $3 $4
halt
}
alias -l processchanlev {
set -u10 %qchanlevpending $1
msg Q chanlev $1 $2
}
alias -l processchanlevauth {
set -u10 %qchanlevpending $1
msg Q chanlev $1 $2
}
alias -l processchangechanlev {
set -u10 %qchanlevpending $1
msg Q chanlev $1 $2 $3
}
alias -l processchangechanlevauth {
set -u10 %qchanlevpending $1
msg Q chanlev $1 $2 $3
}
|