Id: 10096; Nick: Dor; Timestamp: 2008-05-06 14:56:41; Pasted as: mIRC
Description: NetBnc corrective request form. 5 stages for requesting.
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
dialog netbnc1 {
  title "NetBnc Dialog - Phase one: make sure you CAN request"
  size -1 -1 300 90
  option dbu
  text "In order to request a FREE BNC fron NetBnc, you must first fulfil a few requirements. These are:", 2, 15 6 257 9
  check "You must be on #NetBnc", 3, 15 19 74 10, disable
  check "You must be authed with Q", 4, 15 29 84 10, disable
  check "You must NOT be with +x set (your host must not be hidden)", 5, 15 39 162 10, disable
  check "You must read and agree to the ", 6, 15 59 87 10
  link "rules", 7, 102 60 22 8
  button "Next Phase - Request", 1, 189 72 101 12, hide
  text "When all of these are checked, press this button", 8, 11 73 133 8
  check "Request on #NetBnc is on.", 9, 15 49 77 10, disable
  text "", 10, 182 25 96 38
  box "Explanations", 11, 177 17 110 50
}
 
on *:signal:netbnc1:{
  if ($1 == checked) {
    set %netbnc.temp.check $addtok(%netbnc.temp.check,$2,32)
  }
  elseif ($1 == unchecked) {
    set %netbnc.temp.check $remtok(%netbnc.temp.check,$2,32)
  }
  did $iif($numtok(%netbnc.temp.check,32) == 5,-v,-h) netbnc1 1
}
on ^*:open:?:{
  if ($nick isop #NetBnc) && ($1 == netbnc.allow) { unset %netbnc.requested }
}
on ^*:text:*:?:{
  if ($nick isop #NetBnc) && ($1 == netbnc.allow) { unset %netbnc.requested }
}
on me:*:part:#NetBnc:if ($dialog(netbnc1)) { did -u $v1 3 | .signal netbnc1 unchecked 3 }
alias netbnc {
  if (%netbnc.requested) { server -m server1.netbnc.uk.to:8100 %netbnc.mypass -i $mnick $anick %netbnc.myuser $+ @blah.com | return }
  join #NetBnc
  .timer 1 1 dialog -md netbnc1 netbnc1
}
on *:dialog:netbnc1:*:*:{
  if ($devent == init) {
    if ($me ison #NetBnc) { did -c $dname 3 | .signal netbnc1 checked 3 }
    .enable #netbnc.authcheck
    who $me % $+ a
    if (x !isincs $usermode) { did -c $dname 5 | .signal netbnc1 checked 5 }
    tokenize 32 $strip($chan(#NetBnc).topic)
    if ($2 == ON) { did -c $dname 9 | .signal netbnc1 checked 9 }
  }
  if ($devent == sclick) {
    if ($did == 1) {
      if ($did(3).state) && ($did(4).state) && ($did(5).state) && ($did(6).state) && ($did(9).state) { netbnc.p2 | dialog -c $dname }
    }
    if ($did == 7) { url -na http://netbnc.uk.to/index.php?topic=4.0 }
    if ($did == 6) { .signal netbnc1 $iif(!$did(6).state,un) $+ checked 6 }
  }
  if ($devent == mouse) {
    if ($did == 5) && ($did($did).state == 0) { did -ra $dname 10 You need to reconnect and not to put +x when you connect. }
    elseif ($did == 4) && ($did($did).state == 0) { did -ra $dname 10 You have to be authed with Q. if you don't have a Q account, go to #help and ask how to get one. }
    elseif ($did == 9) && ($did($did).state == 0) { did -ra $dname 10 Request on NetBnc may not always be on. you can check if it's on or OFF by looking at the #NetBnc topic. This dialog will automatically update if the request goes on. }
    else { did -r $dname 10 }
  }
  if ($devent == close) { unset %netbnc.temp.check }
}
#netbnc.authcheck off
raw 354:*:{
  if ($2 != 0) { did -c netbnc1 4 | set %netbnc.myquser $2 | .signal netbnc1 checked 4 }
  halt
}
raw 315:*:{
  .enable #netbnc.qnoticecheck
  .timer 1 0 .disable #netbnc.authcheck
  halt
}
#netbnc.authcheck end
#netbnc.qnoticecheck off
on *:notice:You are now logged in as*:?:{
  if ($nick == Q) { set %netbnc.myquser $remove($7,.) | did -c netbnc1 4 | .timer 1 0 .disable #netbnc.qnoticecheck | .signal netbnc1 checked 4 }
}
#netbnc.qnoticecheck end
on *:topic:#NetBnc:{
  tokenize 32 $strip($1-)
  if ($dialog(netbnc1)) { did $iif($2 == on,-c,-u) netbnc1 9 | .signal netbnc1 $iif($2 == on,checked,unchecked) 9 } 
}
dialog netbnc2 {
  title "NetBnc Dialog - Phase 2: Request"
  size -1 -1 300 90
  option dbu
  text "Enter the username you want. username can only be lowercase english letters", 1, 7 4 189 8
  check "I have registered on the ", 2, 7 14 70 10
  link "Forum", 3, 77 15 16 8
  text "and my forum username is:", 4, 95 15 67 8
  edit "", 5, 227 3 67 10
  edit "", 6, 227 16 67 10, disable
  button "Send my Request", 7, 112 63 70 12
}
alias -l netbnc.p2 {
  dialog -md netbnc2 netbnc2
}
on *:dialog:netbnc2:*:*:{
  if ($devent == edit) {
    if ($did == 5) && (!$regex($right($did($did),1),[a-z])) { 
      did -ra $dname 5 $mid($did($did),1,-1) 
      var %i = 1
      tokenize 32 $did($dname,1).text
      while (%i <= 9) {
        var %x = $iif(%i != 1,$lower($mid(lowercase,1,$calc(%i -1)))) $+ $upper($mid(lowercase,%i,1)) $+ $iif(%i != 9,$lower($mid(lowercase,$calc(%i +1))))
        .timer -h 1 $calc(%i * 100) did -ra $dname 1 $1-9 %x $11-
 
        inc %i
      }
      .timer -h 1 1000 did -ra $dname 1 $1-
    }
  }
  if ($devent == sclick) {
    if ($did == 2) { did $iif($did(2).state,-e,-b) $dname 6 }
    if ($did == 3) { url -na http://netbnc.uk.to/index.php?action=register }
    if ($did == 7) && ($did(5)) && ($did(6)) {
      set %netbnc.myuser $did(5)
      set %netbnc.myforumuser $did(6)
      netbnc.p3 
      dialog -c $dname
    }
  }
}
alias -l netbnc.p3 {
  .enable #netbnc.notice
  .timer 1 1 msg #NetBnc !request %netbnc.myuser %netbnc.myforumuser
  dialog -md netbnc3 netbnc3
}
dialog netbnc3 {
  title "NetBnc Dialog - Phase 3: Info"
  size -1 -1 300 90
  option dbu
  edit "This box will be filled in with details about your BNC/request errors. You may close this window, it will reopen when needed.", 1, 13 9 274 55, read multi
  button "My request has been recieved. Proceed to Phase 4", 2, 116 70 171 12, hide ok
}
on *:dialog:netbnc3:*:*:{
  if ($devent == sclick) { netbnc.p4 }
}
#netbnc.notice off
on ^*:notice:*:?:{
  if ($nick == NetBnc) {
    haltdef
    dialog $iif($dialog(netbnc3),-v netbnc3,-md netbnc3 netbnc3)
    var %netbnc.temp.block = (NetBnc Service) (*) Blocked by: *
    var %a = did -ra netbnc3 1
    if ($3- == Request system is OFFLINE.) { %a The request system is offline. You may not request until it's online. }
    if ($3- == You can request a username in lower-case only.) { %a You have attempted to request with illegal letters. Only lowercase letters are allowed. usernames like User test123 and wow^ will ne be accepted. }
    if ($3- == Syntax: !request username forum-username) { %a You did not enter all the parameters needed. you must fill in ALL the details on phase 2. }
    if ($3- == You are NOT allowed to request in +x mode.) { %a You have +x set and you must not have +x set. reconnect and when you connect DO NOT put +x usermode. }
    if (%netbnc.temp.blocked iswm $1-) { %a You were blocked. due to abuse or due to a deleted user. }
    if (Username * already exists. iswm $3-) { %a Username $4 already exists. Please choose a different username. }
    if ($1- == (NetBnc Service) Your request has been received. Please wait untill it has been processed. Don't ask about it on the channel.) { %a Your request has been recieved. Press the button to go to Phase 4. | did -v netbnc3 2 }
    .timer 1 1 .disable #netbnc.notice
  }
}
#netbnc.notice end
alias -l netbnc.p4 {
  dialog -md netbnc4 netbnc4
}
dialog netbnc4 {
  title "NetBnc Dialog - Phase 4: Waiting"
  size -1 -1 300 90
  option dbu
  edit "If you made it to this phase, it means you have successfuly requested. Since all requests are checked manually by the admins, this proccess might take time. This dialog will pop up when you recieve the answer, so you may close it if you want. While waiting, do NOT do the following:", 1, 6 5 289 58, read multi
  button "Yey! Continue to Phase 5", 2, 215 70 80 12, hide ok
}
on *:dialog:netbnc4:*:*:{
  if ($devent == init) {
    .enable #netbnc.notice2
    did -a $dname 1 $crlf $+ 1. Do NOT leave #NetBnc. $crlf
    did -a $dname 1 2. Do NOT disconnect from QuakeNet. $crlf
    did -a $dname 1 3. Do NOT abuse the QuakeNet/NetBnc rules.
    did -a $dname 1 4. Do NOT ask in #NetBnc/query to ops (@) or voices (+). $crlf $crlf
    did -a $dname 1 Please wait patiently until this dialog pops up.
  }
  if ($devent == sclick) {
    if ($did == 2) { netbnc.p5 }
  }
}
#netbnc.notice2 off
on ^*:notice:*:?:{
  if ($nick == NetBnc) {
    haltdef
    dialog $iif($dialog(netbnc4),-v $v1,-md netbnc4 netbnc4)
    if (Your request has been rejected. REASON:* iswm $1-) { did -ra netbnc4 1 Your request has been rejected. Reason: $7- }
    elseif (SERVER: server1.netbnc.uk.to -- PORT: 8100 -- IDENT: * -- PASSWORD: * iswm $1-) { did -ra netbnc4 1 Congratulations! Your request has been accepted. $crlf $+ Server: $2: $+ $5 $crlf $+ Username: $8 $crlf $+ Password: $11 | set %netbnc.myuser $8 | set %netbnc.mypass $11 | did -v netbnc4 2 }
  }
}
alias -l netbnc.p5 {
  server -m server1.netbnc.uk.to:8100 %netbnc.mypass -i $mnick $anick %netbnc.myuser $+ @blah.com
  set %netbnc.requested 1
}
 
#netbnc.notice2 end
on *:disconnect:{ if ($network == QuakeNet) { 
    .disable #netbnc.* 
    unset %netbnc.temp.*
    if ($dialog(netbnc1)) { dialog -c $v1 }
    if ($dialog(netbnc2)) { dialog -c $v1 }
    if ($dialog(netbnc3)) { dialog -c $v1 }
    if ($dialog(netbnc4)) { dialog -c $v1 }
  }
}
 
Options: New, Download,
, mIRC Parser;
Copyright © 2006 by Zyberdog - Some rights reserved. (Browse/Disclaimer/Stats/About)