-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathQW.PPA
1092 lines (1042 loc) · 42 KB
/
QW.PPA
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
600
601
602
603
604
605
606
607
608
609
610
611
612
613
614
615
616
617
618
619
620
621
622
623
624
625
626
627
628
629
630
631
632
633
634
635
636
637
638
639
640
641
642
643
644
645
646
647
648
649
650
651
652
653
654
655
656
657
658
659
660
661
662
663
664
665
666
667
668
669
670
671
672
673
674
675
676
677
678
679
680
681
682
683
684
685
686
687
688
689
690
691
692
693
694
695
696
697
698
699
700
701
702
703
704
705
706
707
708
709
710
711
712
713
714
715
716
717
718
719
720
721
722
723
724
725
726
727
728
729
730
731
732
733
734
735
736
737
738
739
740
741
742
743
744
745
746
747
748
749
750
751
752
753
754
755
756
757
758
759
760
761
762
763
764
765
766
767
768
769
770
771
772
773
774
775
776
777
778
779
780
781
782
783
784
785
786
787
788
789
790
791
792
793
794
795
796
797
798
799
800
801
802
803
804
805
806
807
808
809
810
811
812
813
814
815
816
817
818
819
820
821
822
823
824
825
826
827
828
829
830
831
832
833
834
835
836
837
838
839
840
841
842
843
844
845
846
847
848
849
850
851
852
853
854
855
856
857
858
859
860
861
862
863
864
865
866
867
868
869
870
871
872
873
874
875
876
877
878
879
880
881
882
883
884
885
886
887
888
889
890
891
892
893
894
895
896
897
898
899
900
901
902
903
904
905
906
907
908
909
910
911
912
913
914
915
916
917
918
919
920
921
922
923
924
925
926
927
928
929
930
931
932
933
934
935
936
937
938
939
940
941
942
943
944
945
946
947
948
949
950
951
952
953
954
955
956
957
958
959
960
961
962
963
964
965
966
967
968
969
970
971
972
973
974
975
976
977
978
979
980
981
982
983
984
985
986
987
988
989
990
991
992
993
994
995
996
997
998
999
1000
; #= ppqbot -rs
; ########################################
; Peace and Protection
; Q (standard addon)
; ########################################
; Adds Q support to PnP on Quakenet. It has auto-login features.
; Copyright (C) 2022 Sven Roelse
;
;
; This program is free software: you can redistribute it and/or modify
; it under the terms of the GNU General Public License as published by
; the Free Software Foundation, either version 3 of the License, or
; (at your option) any later version.
;
;
; This program is distributed in the hope that it will be useful,
; but WITHOUT ANY WARRANTY; without even the implied warranty of
; MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
; GNU General Public License for more details.
;
;
; You should have received a copy of the GNU General Public License
; along with this program. If not, see <https://www.gnu.org/licenses/>.
#.ppa.info off
[qwcommands]
ADDUSER=/msg Q ADDUSER <#channel> [+<flags>] <nick1|#auth1> [<nick2|#auth2> [...]]
AUTH=/msg [email protected] AUTH <user> <password>
AUTHHISTORY=/msg Q AUTHHISTORY
AUTOLIMIT=/msg Q AUTOLIMIT <#channel> [<threshold>]
BANCLEAR=/msg Q BANCLEAR <#channel>
BANDEL=/msg Q BANDEL <#channel> <#num|banmask>
BANLIST=/msg Q BANLIST <#channel>
BANTIMER=/msg Q BANTIMER <#channel> [<duration>]
CHALLENGE=/msg [email protected] CHALLENGE
CHALLENGEAUTH=/msg [email protected] CHALLENGEAUTH <username> <response> <algorithm>
CHANFLAGS=/msg Q CHANFLAGS <#channel> [+|-<flags>]
CHANLEV=/msg Q CHANLEV <#channel> [<nick|#auth> [+|-<flags>]]
CHANMODE=/msg Q CHANMODE <#channel> [<modes>|none]
CHANOPHISTORY=/msg Q CHANOPHISTORY <#channel>
CHANSTAT=/msg Q CHANSTAT <#channel> [RESET]
CLEARCHAN=/msg Q CLEARCHAN <#channel>
DEOPALL=/msg Q DEOPALL <#channel>
GIVEOWNER=/msg Q GIVEOWNER <#channel> <nick|#authname> [<code>]
HELLO=/msg Q HELLO <[email protected]> <[email protected]>
HELP=/msg Q HELP [<command>]
INVITE=/msg Q INVITE [<#channel>]
NEWPASS=/msg [email protected] NEWPASS <oldpassword> <newpassword> <newpassword>
OP=/msg Q OP [<#channel> [<nick1> [<nick2> [...]]]]
PERMBAN=/msg Q PERMBAN <#channel> <banmask> [<reason>]
RECOVER=/msg Q RECOVER <#channel>
REMOVEUSER=/msg Q REMOVEUSER <#channel> <nick1|#auth1> [<nick2|#auth2> [...]]
REQUESTOWNER=/msg Q REQUESTOWNER <#channel>
REQUESTPASSWORD=/msg Q REQUESTPASSWORD <[email protected]>
RESET=/msg Q RESET <username> <code>
SETTOPIC=/msg Q SETTOPIC <#channel> [<topic>]
SHOWCOMMANDS=/msg Q SHOWCOMMANDS [<mask>]
TEMPBAN=/msg Q TEMPBAN <#channel> <banmask> <duration> [<reason>]
UNBANALL=/msg Q UNBANALL <#channel>
UNBANMASK=/msg Q UNBANMASK <#channel> <mask>
UNBANME=/msg Q UNBANME <#channel>
USERFLAGS=/msg Q USERFLAGS [+|-<flags>]
USERS=/msg Q USERS <#channel>
VERSION=/msg Q VERSION
VOICE=/msg Q VOICE [<#channel> [<nick1> [<nick2> [...]]]]
WELCOME=/msg Q WELCOME <#channel> [<message>]
WHOAMI=/msg Q WHOAMI
WHOIS=/msg Q WHOIS <nick|#authname>
[addon]
name=Q Bot
group=Extras
popup=Q Bot
author=acvxqs
version=1.3
url=
email=
id=ppqbot
ppver=4.22
unload=
hashcid=
dialogs=
[files]
1=qw.ppa
[notes]
1=This addon adds Q support to PnP on Quakenet. It has auto-login features.
[menu]
1=$_qwloginpop
2=%.qwlogin.1 :qw AUTO LOGIN $qwloginas(1)
3=-
4=View all auto-logins:qw AUTO VIEW
5=Clear all auto-logins:_okcancel 1 Delete ALL $_qwall auto-logins? | qw AUTO CLEAR
[query]
1=$_qwall
2=.Whois user:qw WHOIS $1
[interfaces]
bot=
#.ppa.info end
on *:LOAD:{
; PnP check
if (!$_ispnp) {
echo 4 -ati2 *** This addon requires Peace and Protection by pai to use.
echo 4 -ati2 *** You can download Peace and Protection at https://pnp.kristshell.net/
.timer -mio 1 0 .unload -rs " $+ $script $+ "
halt
}
; Invalid load method check
if (!$istok($_cfgx(addons,ids),$readini($script,n,addon,id),32)) {
.timer -mio 1 0 .unload -rs " $+ $script $+ "
dispa Unloading ' $+ $script $+ ' $chr(40) $+ addon is not properly loaded; use /addon to load it $+ $chr(41)
halt
}
if (!$read(script\NETWFEAT.DAT,nts,Quakenet)) {
write -a SCRIPT\NETWFEAT.DAT Quakenet qw u [email protected]
dispa Updated SCRIPT\NETWFEAT.DAT...
}
if (($level([email protected]) == $null) || ($v1 < 50)) {
_okcancel 1 Would you like to add Qbot to your userlist with access level 50 (safe from protections)?
user [email protected] * 50
}
}
alias -l _qwcmd if ($_isserv(qw)) return /qw
alias _qwall if ($_isserv(qw)) return $hget(pnp. $+ $cid,-servnick)
; /qw command [#chan|?] [params]
alias qw {
if (($_isserv(qw) == $false) && (($1 != AUTO) || ($istok(ADD DEL VIEW CLEAR,$2,32) == $false))) { _error You cannot use /qw on this network. $+ /qw only works on networks with Q bot (Quakenet). }
var %chan, %param, %qw = $hget(pnp. $+ $cid,-servnick), %pw, %send, %who, %new, %old
if ($1 == $null) { var %cmd = $_qwcmd +command -#channel -parameters * ! $+ $_qwall command to perform | _qhelp $_s2f(%cmd) }
elseif (($_qwischan($2)) && (!$istok(RESET WHOIS,$1,32))) { %chan = $2 | %param = $3- }
; commands with parameters (no channel) or commands without parameters (AUTHHISTORY VERSION WHOAMI CHALLENGE)
elseif ($istok(AUTO HELLO HELP SHOWCOMMANDS USERFLAGS EMAIL NEWPASS RESET REQUESTPASSWORD WHOIS AUTHHISTORY VERSION WHOAMI CHALLENGE CHALLENGEAUTH,$1,32)) { %param = $2- }
elseif ($active ischan) { %chan = $active | %param = $2- }
elseif ($2 == ?) { %chan = $_patch($_entry(-1,$null,Channel for $upper($1) command?)) | %param = $3- }
elseif (($2 == *) && ($istok(OP VOICE INVITE,$1,32))) { msgqw %qw $upper($1) | halt }
else { _error You must use $_qwcmd in a channel $+ $chr(40) $+ or specify a target channel $+ $chr(41) }
; no channel or param required
;/msg Q AUTHHISTORY|VERSION|WHOAMI|CHALLENGE
;https://www.quakenet.org/help/q-commands/authhistory
;https://www.quakenet.org/help/q-commands/version
;https://www.quakenet.org/help/q-commands/whoami
;https://www.quakenet.org/help/q-commands/challenge
if ($istok(AUTHHISTORY VERSION WHOAMI CHALLENGE,$1,32)) { msgqw %qw $upper($1) }
; commands with parameters (no channel)
elseif ($istok(AUTO HELLO HELP SHOWCOMMANDS USERFLAGS EMAIL NEWPASS RESET REQUESTPASSWORD WHOIS CHALLENGEAUTH,$1,32)) {
%send = msgqw %qw $upper($1)
goto $1
:AUTO
if ($gettok(%param,1,32) == VIEW) {
var %nets = $readini($_cfg(pw.ini),n,qw,nets)
if (%nets == $null) dispa No $_qwall auto-logins have been defined.
else {
_info $_qwcmd
dispr @Info $_qwall logins $+ -
:vloop1
var %net = $gettok(%nets,1,32)
var %param = $readini($_cfg(pw.ini),n,qw- $+ %net,qwaccount)
var %item = $gettok(%param,1,32)
%pw = $readini($_cfg(pw.ini),n,qw- $+ %net,%item)
dispr @Info - Login to $:t($gettok(%pw,1,32)) as $:s(%item) $chr(40) $+ on %net $+ $chr(41)
%nets = $gettok(%nets,2-,32)
if (%nets) goto vloop1
}
}
elseif ($gettok(%param,1,32) == CLEAR) {
var %nets = $readini($_cfg(pw.ini),n,qw,nets)
if (%nets == $null) dispa Cannot delete entries as no $_qwall auto-logins have been defined.
else {
:vloop2
var %net = $gettok(%nets,1,32)
remini $_cfg(pw.ini) qw- $+ %net
%nets = $gettok(%nets,2-,32)
if (%nets) goto vloop2
remini $_cfg(pw.ini) qw
dispa All $_qwall auto-logins have been deleted.
}
}
elseif ($gettok(%param,1,32) == ADD) {
if ($gettok(%param,2,32)) %who = $ifmatch
else %who = $_entry(-1,$me,Username for auto-login? $+ $chr(40) $+ Enter the username you used to register. $+ $chr(41))
if ($gettok(%param,3,32)) %pw = $ifmatch
else {
_ssplay Question
%pw = $$input(Password for auto-login to %qw as %who $+ ?,2)
if ($$input(Please retype password to confirm:,2) !=== %pw) _error Passwords do not match.You must enter the password exactly the same each time.
}
writeini $_cfg(pw.ini) qw- $+ $hget(pnp. $+ $cid,net) %who %qw $_pw.enc(%pw)
dispa Auto-login to $:t(%qw) as $:s(%who) added. $chr(40) $+ on $hget(pnp. $+ $cid,net) $+ $chr(41)
%old = $readini($_cfg(pw.ini),n,qw- $+ $hget(pnp. $+ $cid,net),qwaccount)
writeini $_cfg(pw.ini) qw- $+ $hget(pnp. $+ $cid,net) qwaccount $addtok(%old,%who,32)
%old = $readini($_cfg(pw.ini),n,qw,nets)
writeini $_cfg(pw.ini) qw nets $addtok(%old,$hget(pnp. $+ $cid,net),32)
}
elseif ($gettok(%param,1,32) == DEL) {
if ($gettok(%param,2,32)) %who = $ifmatch
else %who = $_entry(-1,$me,Username of auto-login to delete? $+ $chr(40) $+ Enter the username you used to register. $+ $chr(41))
%pw = $readini($_cfg(pw.ini),n,qw- $+ $hget(pnp. $+ $cid,net),%who)
if (%pw) {
%old = $readini($_cfg(pw.ini),n,qw- $+ $hget(pnp. $+ $cid,net),qwaccount)
%new = $remtok(%old,%who,1,32)
if (%new == $null) {
remini $_cfg(pw.ini) qw- $+ $hget(pnp. $+ $cid,net)
%old = $readini($_cfg(pw.ini),n,qw,nets)
%old = $remtok(%old,$hget(pnp. $+ $cid,net),1,32)
if (%old == $null) remini $_cfg(pw.ini) qw
else writeini $_cfg(pw.ini) qw nets %old
}
else writeini $_cfg(pw.ini) qw- $+ $hget(pnp. $+ $cid,net) qwaccount %new
remini $_cfg(pw.ini) qw- $+ $hget(pnp. $+ $cid,net) %who
dispa Auto-login for $:s(%who) deleted. $chr(40) $+ on $hget(pnp. $+ $cid,net) $+ $chr(41)
}
else dispa No auto-login has been defined for $:s(%who) $+ . $chr(40) $+ on $hget(pnp. $+ $cid,net) $+ $chr(41)
}
elseif ($gettok(%param,1,32) == LOGIN) {
%who = $gettok(%param,2,32)
if (!%who) {
%who = $readini($_cfg(pw.ini),n,qw- $+ $hget(pnp. $+ $cid,net),qwaccount)
%who = $gettok(%who,1,32)
if (!%who) _error No $_qwall logins have been defined!You can add auto-logins through popups.
}
%pw = $readini($_cfg(pw.ini),n,qw- $+ $hget(pnp. $+ $cid,net),%who)
if (%pw) {
%qw = $gettok(%pw,1,32)
%pw = $_pw.enc($gettok(%pw,2,32))
.msgqw %qw AUTH %who %pw
dispa Logging into $:t(%qw) as $:s(%who) $+ ...
}
else _error No $_qwall login defined for %who $+ .You can add an auto-login through popups.
}
return
;/msg Q HELLO <[email protected]> <[email protected]>
;https://www.quakenet.org/help/q-commands/hello
:HELLO
%param = $gettok(%param,1-2,32)
if (%param) {
if ($gettok(%param,1,32) === $gettok(%param,2,32)) %send %param
else _error Invalid parameter!You must enter the email address exactly the same each time.
}
else {
_ssplay Question
%new = $_entry(-1,$null,Enter your email address:)
if (%new !=== $_entry(-1,$null,Please retype your email address to confirm:) _error Email addresses do not match.You must enter your email address exactly the same each time.
%send %new %new
}
return
;/msg Q HELP [<command>]
;https://www.quakenet.org/help/q-commands/help
:HELP
%param = $gettok(%param,1,32)
if ((%param) && ($readini($script,n,qwcommands,%param))) %send %param
elseif (%param) _error Entry not found!No help available for command: %param
else %send
return
;/msg Q SHOWCOMMANDS [<mask>]
;https://www.quakenet.org/help/q-commands/showcommands
:SHOWCOMMANDS
%param = $gettok(%param,1,32)
if (%param) %send %param
else %send
return
;/msg Q USERFLAGS [+|-<flags>]
;https://www.quakenet.org/help/q-commands/userflags
:USERFLAGS
%param = $gettok(%param,1,32)
if (%param) _qwisflags user %param | %send %param
else %send
return
;https://www.quakenet.org/help/q-commands/email
:EMAIL
%param = $gettok(%param,1-3,32)
if (%param) {
if ($gettok(%param,2,32) === $gettok(%param,3,32)) %send %param
else _error Syntax error!Please type: $_qwcmd EMAIL <password> <[email protected]> <[email protected]>
}
else {
_ssplay Question
%pw = $$input(Old %qw password?,2)
%new = $_entry(-1,$null,New email address for %qw $+ ?)
if (%new !=== $_entry(-1,$null,Please retype email address to confirm:)) _error Email addresses do not match.You must enter your email address exactly the same each time.
%send %pw %new %new
}
return
;/msg [email protected] NEWPASS <oldpassword> <newpassword> <newpassword>
;https://www.quakenet.org/help/q-commands/newpass
:NEWPASS
%param = $gettok(%param,1-3,32)
if (%param) {
if ($gettok(%param,2,32) === $gettok(%param,3,32)) %send %param
else _error Syntax error!Please type: $_qwcmd NEWPASS <oldpassword> <newpassword> <newpassword>
}
else {
_ssplay Question
%pw = $$input(Old %qw password?,2)
%new = $$input(New %qw password?,2)
if (%new !=== $$input(Please retype password to confirm:,2)) _error Passwords do not match.You must enter the password exactly the same each time.
%send %pw %new %new
}
return
;/msg Q RESET <username> <code>
;https://www.quakenet.org/help/q-commands/reset
:RESET
%param = $gettok(%param,1-2,32)
if (%param) {
if ($numtok(%param,32) == 2) %send %param
else _error Syntax error!Please type: $_qwcmd RESET <username> <code>
}
else {
_ssplay Question
%who = $_entry(-1,$null,$_qwall username?)
%pw = $_entry(-1,$null,$_qwall code?)
%send %who %pw
}
return
;/msg Q REQUESTPASSWORD <[email protected]>
;https://www.quakenet.org/help/q-commands/requestpassword
:REQUESTPASSWORD
%param = $gettok(%param,1,32)
if (%param) %send %param
else {
_ssplay Question
%new = $_entry(-1,$null,Email address to send password to?)
%send %new
}
return
;/msg Q WHOIS <nick|#authname>
;https://www.quakenet.org/help/q-commands/whois
:WHOIS
%param = $gettok(%param,1,32)
if (!%param) %param = $me
if (!$hget(pnp. $+ $cid,-qwacc.whois)) {
hadd -u2 pnp. $+ $cid -qwacc.whois 1
%send %param
}
else dispa This command is rate limited.
return
;/msg [email protected] CHALLENGEAUTH <username> <response> <algorithm>
;https://www.quakenet.org/help/q-commands/challengeauth
;https://www.quakenet.org/development/challengeauth
:CHALLENGEAUTH
return
}
; commands with channel as required parameter
elseif ($istok(ADDUSER AUTOLIMIT BANCLEAR BANDEL BANLIST BANTIMER CHANFLAGS CHANLEV CHANMODE CHANOPHISTORY CHANSTAT CLEARCHAN DEOPALL GIVEOWNER PERMBAN RECOVER REMOVEUSER REQUESTOWNER SETTOPIC TEMPBAN UNBANALL UNBANMASK UNBANME USERS WELCOME,$1,32)) {
%send = msgqw %qw $upper($1) %chan
goto $1
;/msg Q ADDUSER <#channel> [+<flags>] <nick1|#auth1> [<nick2|#auth2> [...]]
;https://www.quakenet.org/help/q-commands/adduser
:ADDUSER
if ($left($gettok(%param,1,32),1) == +) var %flags = $gettok(%param,1,32),%who = $gettok(%param,2-,32)
else var %flags = +aot,%who = $gettok(%param,1-,32)
if (%who) %send %flags %who
else _error Invalid parameter!Please specify one or more usernames.
return
;/msg Q AUTOLIMIT <#channel> [<threshold>]
;https://www.quakenet.org/help/q-commands/autolimit
:AUTOLIMIT
%param = $gettok(%param,1,32)
if (%param isnum) %send %param
else %send
return
;/msg Q BANCLEAR <#channel>
;https://www.quakenet.org/help/q-commands/banclear
;/msg Q BANLIST <#channel>
;https://www.quakenet.org/help/q-commands/banlist
;/msg Q CHANOPHISTORY <#channel>
;https://www.quakenet.org/help/q-commands/chanophistory
;/msg Q CLEARCHAN <#channel>
;https://www.quakenet.org/help/q-commands/clearchan
;/msg Q DEOPALL <#channel>
;https://www.quakenet.org/help/q-commands/deopall
;/msg Q RECOVER <#channel>
;https://www.quakenet.org/help/q-commands/recover
;/msg Q REQUESTOWNER <#channel>
;https://www.quakenet.org/help/q-commands/requestowner
;/msg Q UNBANALL <#channel>
;https://www.quakenet.org/help/q-commands/unbanall
;/msg Q UNBANME <#channel>
;https://www.quakenet.org/help/q-commands/unbanme
;/msg Q USERS <#channel>
;https://www.quakenet.org/help/q-commands/users
:BANCLEAR | :BANLIST | :CHANOPHISTORY | :CLEARCHAN | :DEOPALL | :RECOVER |:REQUESTOWNER | :UNBANALL | :UNBANME | :USERS
%send
return
;/msg Q BANDEL <#channel> <#num|banmask>
;https://www.quakenet.org/help/q-commands/bandel
:BANDEL
var %unbanmask = $gettok(%param,1,32)
if (!%unbanmask) var %unbanmask = $_entry(-1,$null,Please enter a valid bannumber or banmask to unban. For example: *!*@*.be or #1)
if (($_isaddr(%unbanmask)) || (($left(%unbanmask,1) == $chr(35)) && ($right(%unbanmask,-1) isnum))) %send %unbanmask
else _error Invalid parameter! $+ %unbanmask is not a valid mask.
return
;/msg Q BANTIMER <#channel> [<duration>]
;https://www.quakenet.org/help/q-commands/bantimer
:BANTIMER
%param = $gettok(%param,1,32)
if ((%param == 0) || (($removecs(%param,m,h,d,w,M,y)) && ($v1 isnum))) %send %param
else %send
return
;/msg Q CHANFLAGS <#channel> [+|-<flags>]
;https://www.quakenet.org/help/q-commands/chanflags
:CHANFLAGS
if (%param == edit) {
editbox -ap $_qwcmd $upper($1) %chan
dispa Specify one or more of the following channel flags: $:l(+|-abcefghjkptvw)
}
elseif (%param) {
_qwisflags chan %param
%send %param
}
else %send
return
;/msg Q CHANLEV <#channel> [<nick|#auth>] [edit|+|-<flags>]]
;https://www.quakenet.org/help/q-commands/chanlev
:CHANLEV
var %who = $gettok(%param,1,32), %flags = $gettok(%param,2,32)
if ((%who) && (!%flags)) {
if (%who == $me) hadd pnp. $+ $cid $+(-qwacc.chanlev.,%chan,.,%who) 2
else hadd pnp. $+ $cid $+(-qwacc.chanlev.,%chan,.,%who) 1
%send %who
}
elseif ((%who) && (%flags)) {
if (%flags == edit) {
if (%who == $me) {
editbox -ap $_qwcmd $upper($1) %chan %who
dispa Specify one or more of the following chanlev flags: $:l(+|-abdgjkmnoptvw)
}
else {
editbox -ap $_qwcmd $upper($1) %chan %who
dispa Specify one or more of the following chanlev flags: $:l(+|-abdgkmnoptv)
}
}
else {
_qwisflags chanlev %flags
%send %who %flags
}
}
else %send
return
;/msg Q CHANMODE <#channel> [<modes>|none|edit]
;https://www.quakenet.org/help/q-commands/chanmode
:CHANMODE
if (%param == none) %send none
elseif (%param == edit) {
editbox -ap $_qwcmd $upper($1) %chan
dispa Specify one or more of the following channel modes to enforce or forbid: $:l(+|-bcCdDiklmMnNoprstTuv)
}
elseif (%param) {
_qwischanmode %param
%send %param
}
else %send
return
;/msg Q CHANSTAT <#channel> [RESET]
;https://www.quakenet.org/help/q-commands/chanstat
:CHANSTAT
if (%param === RESET) %send %param
else %send
return
;/msg Q GIVEOWNER <#channel> <nick|#authname> [<code>]
;https://www.quakenet.org/help/q-commands/giveowner
:GIVEOWNER
if ($numtok(%param,32) == 2) %send $gettok(%param,1,32) $gettok(%param,2,32)
elseif ($numtok(%param,32) == 1) %send $gettok(%param,1,32) | editbox -ap $_qwcmd $upper($1) %chan
else _error Invalid syntax for this command!!Parameters are missing!
return
;/msg Q PERMBAN <#channel> <banmask> [<reason>]
;https://www.quakenet.org/help/q-commands/permban
:PERMBAN
if ($numtok(%param,32) > 1) var %banmask = $gettok(%param,1,32),%reason = $gettok(%param,2-,32)
elseif ($numtok(%param,32) == 1) var %reason = $_entry(2,$null,Reason for PERM ban:),%banmask = $gettok(%param,1,32)
else var %banmask = $_entry(-1,$null,Please enter a valid banmask. For example: *!*@*.be),%reason = $_entry(2,$null,Reason for ban:)
if (!%reason) %reason = Banned.
if ($_isaddr(%banmask)) %send %banmask %reason
else _error Invalid parameter!Please enter a valid banmask.
return
;/msg Q REMOVEUSER <#channel> <nick1|#auth1> [<nick2|#auth2> [...]]
;https://www.quakenet.org/help/q-commands/removeuser
:REMOVEUSER
if (%param) %who = $_nccs(32,%chan,$_c2s(%param))
else %who = $_c2s($_entry(0,$null,User $+ $chr(40) $+ s $+ $chr(41) to remove? $+ $chr(40) $+ You may specify multiple users $+ $chr(41)))
%send %who
return
;/msg Q SETTOPIC <#channel> [<topic>]
;https://www.quakenet.org/help/q-commands/settopic
:SETTOPIC
if (%param == ?) var %settopic = $_entry(0,$null,Set the topic to:)
elseif (%param) var %settopic = %param
if (%settopic) { %send %settopic }
else { %send }
return
;/msg Q TEMPBAN <#channel> <banmask> <duration> [<reason>]
;https://www.quakenet.org/help/q-commands/tempban
:TEMPBAN
if ($numtok(%param,32) > 2) var %banmask = $gettok(%param,1,32),%duration = $gettok(%param,2,32),%reason = $gettok(%param,3-,32)
elseif ($numtok(%param,32) == 2) var %reason = $_entry(2,$null,Reason for TEMP ban:),%banmask = $gettok(%param,1,32),%duration = $gettok(%param,2,32)
elseif ($numtok(%param,32) == 1) var %duration = $_entry(-1,$null,Please enter duration for the ban. For example: 1h30m 3d 1M 1y2w),%reason = $_entry(2,$null,Reason for TEMP ban:),%banmask = $gettok(%param,1,32)
else var %banmask = $_entry(-1,$null,Please enter a valid banmask. For example: *!*@*.be),%duration = $_entry(-1,$null,Please enter duration for the ban. For example: 1h30m 3d 1M 1y2w),%reason = $_entry(2,$null,Reason for TEMP ban:)
if (!%reason) %reason = Banned.
if ($_isaddr(%banmask)) %send %banmask %duration %reason
else _error Invalid parameter!Please enter a valid banmask.
return
;/msg Q UNBANMASK <#channel> <mask>
;https://www.quakenet.org/help/q-commands/unbanmask
:UNBANMASK
var %unbanmask = $gettok(%param,1,32)
if (!%unbanmask) var %unbanmask = $_entry(-1,$null,Please enter a valid banmask to unban. For example: *!*@*.be)
if ($_isaddr(%unbanmask)) %send %unbanmask
else _error Invalid parameter! $+ %unbanmask is not a valid mask.
return
;/msg Q WELCOME <#channel> [<message>]
https://www.quakenet.org/help/q-commands/welcome
:WELCOME
if (%param) %send %param
else %send
return
}
; channel may not be required, but that is dealt with at the start, for example: '/qw INVITE *' runs /msgqw %qw INVTE
; channel param is filled now:
elseif ($istok(INVITE OP VOICE,$1,32)) {
%send = msgqw %qw $upper($1) %chan
goto $1
;/msg Q INVITE [<#channel>]
;https://www.quakenet.org/help/q-commands/invite
;/msg Q OP [<#channel> [<nick1> [<nick2> [...]]]]
;https://www.quakenet.org/help/q-commands/op
;/msg Q VOICE [<#channel> [<nick1> [<nick2> [...]]]]
;https://www.quakenet.org/help/q-commands/voice
:INVITE
%send
return
:OP | :VOICE
if (%param) %who = $_nccs(32,%chan,$_c2s(%param))
else %who = $_c2s($_entry(0,$me,$iif($1 == OP,User $+ $chr(40) $+ s $+ $chr(41) to op? $+ $chr(40) $+ You may specify multiple users $+ $chr(41),User $+ $chr(40) $+ s $+ $chr(41) to voice? $+ $chr(40) $+ You may specify multiple users $+ $chr(41))))
%send %who
return
}
}
; /msgqw bot full command
alias msgqw {
_linedance . $+ $_botacc($1) $2-
if ($2 == NEWPASS) {
dispr $iif($3 ischan,$3,-ai2) Using $:t($upper($1)) for command: $:h(NEWPASS ????? ????? ?????)
}
else dispr $iif($3 ischan,$3,-ai2) Using $:t($upper($1)) for command: $:h($2-)
}
on ^*:TEXT:*:?:qwparse $1-
on ^*:NOTICE:*:?:qwparse $1-
alias -l qwparse {
if (!$_isbot($nick)) return
var %text $1-
if ($regex(%text,(\w+) version (\d+\.\d+) \(Compiled on (\w+ \d \d+)\) \(C\) \d+-\d+ ([^.]+)\.)) {
set -u1 %:qw.bver $regml(1)
set -u1 %:qw.ver $regml(2)
set -u1 %:qw.compiled $regml(3)
set -u1 %:qw.authors $regml(4)
halt
}
elseif ($regex(%text,Built on (\w+)\. \(C\) \d+-\d+ ([^.]+)\.)) {
set -u1 %:qw.builton $regml(1)
dispa $:t(%:qw.bver) version $:t(%:qw.ver) - Compiled on $:t(%:qw.compiled) - Built on $:t(%:qw.builton) - Built by: $:t(%:qw.authors)
halt
}
elseif ($regex(%text,Current forced modes on (\#.+): (.+))) {
dispa Current forced modes on $:t($regml(1)) $+ : $:t($regml(2))
halt
}
elseif ($regex(%text,Flags for (\w+) on (\#.+): (.+))) {
var %who = $regml(1), %chan = $regml(2), %flags = $regml(3), %goto $hget(pnp. $+ $cid,$+(-qwacc.chanlev.,%chan,.,%who))
if ($istok(1 2,%goto,32)) goto %goto
else return
:2
hdel pnp. $+ $cid $+(-qwacc.chanlev.,%chan,.,%who)
qwa %chan %flags
halt
:1
hdel pnp. $+ $cid $+(-qwacc.chanlev.,%chan,.,%who)
dispa $:l(Q) flags for $:l( %who ) on $:l( %chan ) are: $:l( %flags )
halt
}
elseif ($regex(%text,User (.+) is not authed\.)) {
hdel -w pnp. $+ $cid -qwacc.chanlev.*
halt
}
elseif ($regex(%text,You do not have sufficient access on (\#.+) to use (\w+)\.)) {
hdel -w pnp. $+ $cid -qwacc. $+ $regml(2) + .*
dispa Insufficient access on $regml(1) to use $regml(2)
if (($regml(2) == CHANLEV) && ($readini($_cfg(pw.ini),n,qw- $+ $hget(pnp. $+ $cid,net),a $+ $regml(1)) != $null)) remini $_cfg(pw.ini) qw- $+ $hget(pnp. $+ $cid,net) a $+ $regml(1)
halt
}
elseif ($regex(%text,You are now logged in as (.+)\.)) {
.qw WHOAMI
halt
}
elseif ($regex(%text,Done. Flags for (.+) on (\#.+) are now: (\+.+)\.)) {
var %chan $regml(2), %flags $regml(3)
qwa %chan %flags
halt
}
elseif ($regex(%text,Done\. User (.+) is no longer known on (\#.+)\.)) {
var %chan $regml(2), %who $regml(1)
hdel pnp. $+ $cid -qwacc. $+ %chan
remini $_cfg(pw.ini) qw- $+ $hget(pnp. $+ $cid,net) a $+ %chan
halt
}
;elseif ($regex(%text,[PLACEHOLDER FOR WHEN YOU HAVE SUCCEEDED IN CHANGING YOUR PASSWORD])) {
; var %from = $hget(pnp. $+ $cid,-qwacc.username)
; var %pw = $readini($_cfg(pw.ini),n,qw- $+ $hget(pnp. $+ $cid,net),%from)
; if (%pw) writeini $_cfg(pw.ini) qw- $+ $hget(pnp. $+ $cid,net) %from $gettok(%pw,1,32) $_pw.enc($gettok($1-,-1,32))
;}
elseif ($regex(%text,(Remember: .+))) {
dispa $regml(1)
halt
}
elseif ($regex(%text,(AUTH is not available once you have authed.))) {
.qw WHOAMI
halt
}
elseif ($regex(%text,User flags for (.+): (\+[cn]))) {
hadd pnp. $+ $cid -qwacc.userflags $regml(2)
dispa Updated userflags (on $hget(pnp. $+ $cid,net) $+ )
halt
}
elseif ($regex(%text,-Information for user (.+) \(using account (.+)\):)) {
if ($regml(1) == $me) {
set -u1 %:qw.whoami 1
hadd pnp. $+ $cid -qwacc.username $regml(2)
}
else dispa Information for user $regml(1) (using account $regml(2) $+ )
halt
}
elseif ($regex(%text,User ID : (\d+))) {
if (%:qw.whoami) {
set -u1 %:qw.whoami 1
hadd pnp. $+ $cid -qwacc.userid $regml(1)
}
halt
}
elseif ($regex(%text,User flags : (\+[cn]))) {
if (%:qw.whoami) {
set -u1 %:qw.whoami 1
hadd pnp. $+ $cid -qwacc.userflags $regml(1)
}
halt
}
elseif ($regex(%text,Account users : (.+))) {
if (%:qw.whoami) {
set -u1 %:qw.whoami 1
hadd pnp. $+ $cid -qwacc.users $regml(1)
}
else dispa Account users : $:t($regml(1))
halt
}
elseif ($regex(%text,User created : (.+))) {
if (%:qw.whoami) {
set -u1 %:qw.whoami 1
hadd pnp. $+ $cid -qwacc.usercreated $regml(1)
}
else dispa User created : $:t($regml(1))
halt
}
elseif ($regex(%text,Last auth : (.+))) {
if (%:qw.whoami) {
set -u1 %:qw.whoami 1
hadd pnp. $+ $cid -qwacc.lastauth $regml(1)
}
else dispa Last auth : $:t($regml(1))
halt
}
elseif ($regex(%text,Last user@host : (.+))) {
if (%:qw.whoami) {
set -u1 %:qw.whoami 1
hadd pnp. $+ $cid -qwacc.lastuserhost $regml(1)
}
halt
}
elseif ($regex(%text,Email address : (.+))) {
if (%:qw.whoami) {
set -u1 %:qw.whoami 1
hadd pnp. $+ $cid -qwacc.emailaddress $regml(1)
}
halt
}
elseif ($regex(%text,Email last set : (.+))) {
if (%:qw.whoami) {
set -u1 %:qw.whoami 1
hadd pnp. $+ $cid -qwacc.emaillastset $regml(1)
}
halt
}
elseif ($regex(%text,Pass last set : (.+))) {
if (%:qw.whoami) {
set -u1 %:qw.whoami 1
hadd pnp. $+ $cid -qwacc.passlastset $regml(1)
}
halt
}
elseif ($regex(%text,Last auth : (.+))) {
if (%:qw.whoami) {
set -u1 %:qw.whoami 1
hadd pnp. $+ $cid -qwacc.lastauth $regml(1)
}
halt
}
elseif ($regex(%text,Known on the following channels:)) {
if (%:qw.whoami) {
set -u1 %:qw.whoami 1
}
halt
}
elseif ($regex(%text,Channel Flags)) {
if (%:qw.whoami) {
set -u1 %:qw.whoami 1
}
halt
}
elseif ($regex(%text,(.+)\s(\+.+))) {
if (%:qw.whoami) {
set -u1 %:qw.whoami 1
if ($_qwischan($regml(1))) hadd pnp. $+ $cid -qwacc. $+ $regml(1) $regml(2)
}
halt
}
elseif ($regex(%text,End of list\.)) {
if (%:qw.whoami) {
unset %:qw.whoami
dispa WHOAMI has been updated (on $hget(pnp. $+ $cid,net) $+ )
}
halt
}
elseif ($regex(%text,(Nothing changed\. Your requested flag combination change was either the same as the existing flags, impossible, or you don't have enough access\.))) {
dispa $regml(1)
halt
}
elseif ($regex(%text,(.+) is already (voiced|opped) on (\#.+)\.)) {
dispa User $:t($regml(1)) is already $regml(2) on $:t($regml(3)) $+ !
halt
}
elseif ($regex(%text,Done\.)) halt
; else halt
}
on me:*:JOIN:#:if (($_isserv(qw)) && ($hget(pnp. $+ $cid,-qwacc.username)) && ($hget(pnp. $+ $cid,-qwacc. $+ $chan))) .qw CHANLEV $chan $hget(pnp. $+ $cid,-qwacc.username)
alias -l qwpop {
unset %.qw*
if ($_isserv(qw)) {
set -u1 %.qwaccessstored $readini($_cfg(pw.ini),n,qw- $+ $hget(pnp. $+ $cid,net),a $+ $active)
if ($_chanbot($active)) { set -u1 %.qw $ifmatch }
set -u1 %.qwlogin $iif($readini($_cfg(pw.ini),n,qw- $+ $hget(pnp. $+ $cid,net),$active),1,0)
return $_popssep
}
}
alias -l _qwloginpop {
unset %.qwlogin.*
var %who = $readini($_cfg(pw.ini),n,qw- $+ $hget(pnp. $+ $cid,net),qwaccount)
var %pos = 1
var %popup = 1
:loop
var %un = $gettok(%who,%pos,32)
if (%un) {
if (!$_qwischan(%un)) { set -u1 %.qwlogin. [ $+ [ %popup ] ] Login as %un | inc %popup }
inc %pos
goto loop
}
if ($_qwall) return $_popssep
}
alias -l qwloginas {
var %who = $readini($_cfg(pw.ini),n,qw- $+ $hget(pnp. $+ $cid,net),qwaccount)
var %pos = 1
var %popup = 1
:loop
var %un = $gettok(%who,%pos,32)
if (%un) {
if (!$_qwischan(%un)) { if (%popup == $1) return %un | inc %popup }
inc %pos
goto loop
}
return
}
alias _qwrequest {
if ($istok(begin end,$1,32)) return -
if ($me isop $chan($1)) return $iif($_qwall isop $chan($1),$style(2)) Request $_qwall for $replace($chan($1),&,&&) : msg R REQUESTBOT $chan($1)
}
menu status {
$_qwloginpop
$_qwall
.$iif(!$hget(pnp. $+ $cid,-qwacc.username),Register an account):qw HELLO
.-
.Request Q
..$submenu($_qwrequest($1))
.-
.Login
..$iif($hget(pnp. $+ $cid,-qwacc.username),$style(3)) %.qwlogin.1 : qw AUTO LOGIN $qwloginas(1)
..-
..$iif($hget(pnp. $+ $cid,-qwacc.username),$style(2)) Add auto-login:qw AUTO ADD
..$iif(!$hget(pnp. $+ $cid,-qwacc.username),$style(2)) Delete auto-login:qw AUTO DEL
..-
..View all auto-logins:qw AUTO VIEW
..Clear all auto-logins:_okcancel 1 Delete ALL $_qwall auto-logins? | qw AUTO CLEAR
..-
..$iif($hget(pnp. $+ $cid,-qwacc.username),Change password):qw NEWPASS
..$iif($hget(pnp. $+ $cid,-qwacc.username),Change email):qw EMAIL
..-
..$iif($hget(pnp. $+ $cid,-qwacc.username),Auth history):qw AUTHHISTORY
.-
.$iif($hget(pnp. $+ $cid,-qwacc.username),Recovery)
..Unban yourself (?) $+ $chr(9) $+ [+o/+m]:qw UNBANME ?
..-
..Invite yourself (?) $+ $chr(9) $+ [+k]: qw INVITE ?
..Invite yourself (All) $+ $chr(9) $+ [+k]: qw INVITE *
..-
..Clear channel (?) $+ $chr(9) $+ [+m]:qw CLEARCHAN ?
..Recover channel (?) $+ $chr(9) $+ [+m]:qw RECOVER ?
.$iif($hget(pnp. $+ $cid,-qwacc.username),Commands)
..Ban (temp) (?) $+ $chr(9) $+ [+m]:qw TEMPBAN ?
..Ban (perm) (?) $+ $chr(9) $+ [+m]:qw PERMBAN ?
..Unban (?) $+ $chr(9) $+ [+o/+m]:qw BANDEL ?
..-
..Op (?) $+ $chr(9) $+ [+o]:qw OP ?
..Op (All) $+ $chr(9) $+ [+o]:qw OP *
..-
..De-Op all users (?) $+ $chr(9) $+ [+m]:qw DEOPALL ?
..-
..Voice (?) $+ $chr(9) $+ [+v]:qw VOICE ?
..Voice (All) $+ $chr(9) $+ [+v]:qw VOICE *
.-
.$iif($hget(pnp. $+ $cid,-qwacc.username),Info)
..Op history (?) $+ $chr(9) $+ [+o]:qw CHANOPHISTORY ?
..Statistics (?) $+ $chr(9) $+ [+m]:qw CHANSTAT ?
..-
..My userflags:qw USERFLAGS
..Who am I: qw WHOAMI
.-
.Reset:qw RESET
.-
.Q version:qw VERSION
}
menu nicklist {
$qwpop
%.qw
.$iif((($hget(pnp. $+ $cid,-qwacc.username)) && ($_qwchanlev(#,m))),Add user (+aot) $+ $chr(9) $+ [+m]):qw ADDUSER # $$snicks
.$iif((($hget(pnp. $+ $cid,-qwacc.username)) && ($_qwchanlev(#,m))),Add user (+gv) $+ $chr(9) $+ [+m]):qw ADDUSER # +gv $$snicks
.$iif((($hget(pnp. $+ $cid,-qwacc.username)) && ($_qwchanlev(#,m))),Remove user):qw REMOVEUSER # $$snicks
.-
.$iif((($hget(pnp. $+ $cid,-qwacc.username)) && ($snick(#,$snick(#,0)) !isop #) && ($_qwchanlev(#,o))),Op $+ $chr(9) $+ [+o]):qw OP # $$snicks
.$iif((($hget(pnp. $+ $cid,-qwacc.username)) && ($snick(#,$snick(#,0)) isreg #) && ($_qwchanlev(#,v))),Voice $+ $chr(9) $+ [+v]):qw VOICE # $$snicks
.-
.$iif((($hget(pnp. $+ $cid,-qwacc.username)) && (($_qwchanlev(#,k))) || ($_qwchanlev(#,o))),Chanlev)
..$iif((($_qwchanlev(#,k)) || ($_qwchanlev(#,o))),View $+ $chr(9) $+ [+k/+o]):qw CHANLEV # $$1
..$iif($_qwchanlev(#,m),Editbox $+ $chr(9) $+ [+m]):qw CHANLEV # $$1 edit
..-
..$iif($1 == $me,AUTO-INVITE $+ $chr(9) $+ [+j]):qw CHANLEV # $1 +j
..$iif($1 == $me,$+ $chr(9) $+ [-j]):qw CHANLEV # $1 -j
..-
..$iif($1 == $me,HIDEWELCOME $+ $chr(9) $+ [+w]):qw HIDEWELCOME # $1 +w
..$iif($1 == $me,$+ $chr(9) $+ [-w]):qw HIDEWELCOME # $1 -w
.-
.$iif((($hget(pnp. $+ $cid,-qwacc.username)) && ($_qwchanlev(#,n))),Give ownership $+ $chr(9) $+ [+n]):qw GIVEOWNER # $$1
.-
.$iif($hget(pnp. $+ $cid,-qwacc.username),Whois):qw WHOIS $$1
}
menu channel {
$qwpop
%.qw
.$iif((($hget(pnp. $+ $cid,-qwacc.username)) && ($_qwchanlev(#,m))),Topic)
..Edit $+ $chr(9) $+ [m]:qw SETTOPIC # ?
..Restore $+ $chr(9) $+ [m]:qw SETTOPIC #
.$iif((($hget(pnp. $+ $cid,-qwacc.username)) && ($_qwchanlev(#,o))),Modes)
..$iif($_qwchanlev(#,o),View $+ $chr(9) $+ [+o]):qw CHANMODE #
..$iif($_qwchanlev(#,m),Editbox $+ $chr(9) $+ [+m]):qw CHANMODE # edit
..-
..$iif($_qwchanlev(#,m),Set $+ $chr(9) $+ [+m])
...$iif($_qwchanlev(#,m),Set default $+ $chr(9) $+ [+ntCN]):qw CHANMODE # +ntCN
...-
...$iif($_qwchanlev(#,m),Clear all $+ $chr(9) $+ [none]):qw CHANMODE # none
..-
..Webpage CHANMODES: http https://www.quakenet.org/help/general/what-channel-modes-are-available-on-quakenet
.$iif((($hget(pnp. $+ $cid,-qwacc.username)) && ($_qwchanlev(#,o))),Flags)
..$iif($_qwchanlev(#,o),View $+ $chr(9) $+ [o]):qw CHANFLAGS #
..$iif($_qwchanlev(#,m),Editbox $+ $chr(9) $+ [m]):qw CHANFLAGS # edit
..-
..$iif($_qwchanlev(#,m),Set $+ $chr(9) $+ [m])
...AUTO-OP $+ $chr(9) $+ [+a]:qw CHANFLAGS # +a
...$+ $chr(9) $+ [-a]:qw CHANFLAGS # -a
...-
...BITCH $+ $chr(9) $+ [+b]:qw CHANFLAGS # +b
...$+ $chr(9) $+ [-b]:qw CHANFLAGS # -b
...-
...AUTO-LIMIT $+ $chr(9) $+ [+c]:qw CHANFLAGS # +c
...$+ $chr(9) $+ [-c]:qw CHANFLAGS # -c
...-
...ENFORCE BANS $+ $chr(9) $+ [+e]:qw CHANFLAGS # +e
...$+ $chr(9) $+ [-e]:qw CHANFLAGS # -e
...-
...FORCE TOPIC $+ $chr(9) $+ [+f]:qw CHANFLAGS # +f
...$+ $chr(9) $+ [-f]:qw CHANFLAGS # -f
...-
...AUTO-VOICE $+ $chr(9) $+ [+g]:qw CHANFLAGS # +g
...$+ $chr(9) $+ [-g]:qw CHANFLAGS # -g
...-
...ACHIEVEMENTS $+ $chr(9) $+ [+h]:qw CHANFLAGS # +h
...$+ $chr(9) $+ [-h]:qw CHANFLAGS # -h
...-
...JOINED $+ $chr(9) $+ [+j]:qw CHANFLAGS # +j
...$+ $chr(9) $+ [-j]:qw CHANFLAGS # -j
...-
...KNOWN ONLY $+ $chr(9) $+ [+k]:qw CHANFLAGS # +k
...$+ $chr(9) $+ [-k]:qw CHANFLAGS # -k
...-
...PROTECT $+ $chr(9) $+ [+p]:qw CHANFLAGS # +p
...$+ $chr(9) $+ [-p]:qw CHANFLAGS # -p
...-
...TOPIC SAVE $+ $chr(9) $+ [+t]:qw CHANFLAGS # +t
...$+ $chr(9) $+ [-t]:qw CHANFLAGS # -t
...-
...VOICEALL $+ $chr(9) $+ [+v]:qw CHANFLAGS # +v
...$+ $chr(9) $+ [-v]:qw CHANFLAGS # -v
...-
...WELCOME $+ $chr(9) $+ [+w]:qw CHANFLAGS # +w
...$+ $chr(9) $+ [-w]:qw CHANFLAGS # -w
..-
..Webpage CHANFLAGS:http https://www.quakenet.org/help/q-commands/chanflags
.-
.$iif((($hget(pnp. $+ $cid,-qwacc.username)) && ($_qwchanlev(#,v))),Commands)
..$iif($_qwchanlev(#,m),Ban (temp) $+ $chr(9) $+ [+m]):qw TEMPBAN #
..$iif($_qwchanlev(#,m),Ban (perm) $+ $chr(9) $+ [+m]):qw PERMBAN #
..$iif($_qwchanlev(#,o),Unban $+ $chr(9) $+ [+o/+m]):qw BANDEL #
..-
..$iif($_qwchanlev(#,o),Op $+ $chr(9) $+ [+o]):qw OP #
..-
..$iif($_qwchanlev(#,m),De-Op all users $+ $chr(9) $+ [+m]):qw DEOPALL #
..-
..$iif($_qwchanlev(#,v),Voice $+ $chr(9) $+ [+v]):qw VOICE #
.-
.$iif(($hget(pnp. $+ $cid,-qwacc.username) && ($_qwchanlev(#,o))),Info)
..$iif($_qwchanlev(#,o),Op history $+ $chr(9) $+ [+o]):qw CHANOPHISTORY #
..$iif($_qwchanlev(#,m),Statistics $+ $chr(9) $+ [+m])
...View:qw CHANSTAT #
...-
...Reset:qw CHANSTAT # RESET
.-
.$iif($_qwchanlev(#,o),Welcome message)
..$iif($_qwchanlev(#,o),View $+ $chr(9) $+ [+o]):qw WELCOME #
..$iif($_qwchanlev(#,m),Edit $+ $chr(9) $+ [+m]):qw WELCOME # $_entry(0,$null,Enter your welcome message for #)
}
; $_qwchanlev(%yourchanlevels,%requiredlevel)
; tests required %level against levels stored for %chan
alias -l _qwchanlev {
var %chanlev = $hget(pnp. $+ $cid,-qwacc. $+ $1)
if (!%chanlev) return 0
if (n isincs %chanlev) return 1
if ($istok(k v o m,$2,32)) {
goto $2