1
# Diatheke/Tcl 3.0 by Chris Little <chrislit@gotjesus.org>
2
# Based on code schema of <cking@acy.digex.net>
5
# * Copyright 1999-2009 CrossWire Bible Society (http://www.crosswire.org)
6
# * CrossWire Bible Society
8
# * Tempe, AZ 85280-2528
10
# * This program is free software; you can redistribute it and/or modify it
11
# * under the terms of the GNU General Public License as published by the
12
# * Free Software Foundation version 2.
14
# * This program is distributed in the hope that it will be useful, but
15
# * WITHOUT ANY WARRANTY; without even the implied warranty of
16
# * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
17
# * General Public License for more details.
21
# This script is intended for use with libraries and modules from
22
# the SWORD Project, available at http://www.crosswire.org/
24
# To install Diatheke/Tcl, install an eggdrop IRC bot, copy the
25
# Diatheke/Tcl .tcl file to your eggdrop scripts directory, and
26
# add a line to the end of your bot startup script to load the
27
# Diatheke/Tcl script. This script has been tested with eggdrop 1.3.23
28
# but should function fine in later versions.
30
# This is script assumes you have every single SWORD module installed
31
# that was available at the time of release. Since you probably do not,
32
# remove all modules listed in the pub_books function that you do not
33
# have installed to hide them from end-users.
35
# The !history command only works if you have LOGGING turned on in
36
# diatheke (the command line C program). This command is commented out
37
# of the help function and must be uncommented to make it show up for
40
# When you get the script loaded, type !biblehelp in a channel where
41
# the bot is present and it will give you a full list of commands.
42
# More commands will appear to you depending upon which mode the bot is
43
# in and whether you are an op on the bot or voiced in the channel.
47
#modify this to reflect actual location of diatheke and dict binaries
48
set diatheke "/usr/bin/diatheke"
49
set dict "/usr/bin/dict"
51
proc publookupverse {vlookup} {
52
global botnick chan bibver diatheke
55
set n [string first "@" $vlookup]
56
if {$n > -1 && $n < 2} {
60
set n [string first "#" $vlookup]
61
if {$n > -1 && $n < 2} {
64
set vlookup [string trimleft $vlookup "#"]
65
set vlookup [string trimleft $vlookup "@"]
66
set vlookup [string trimleft $vlookup "#"]
68
catch {exec $diatheke -f plaintext -o $arg -b $bibver -k "$vlookup" >& /tmp/fooout.$botnick}
69
catch {set foofile [open /tmp/fooout.$botnick]}
70
while {[gets $foofile fooverse] >= 0} {
71
set len [string length $fooverse]
75
if {[regexp ">" $fooverse]} {
76
while {[string index $fooverse $j] != ">" && [string index $fooverse $j] != "\n"} {set j [expr $j - 1]}
78
while {[string index $fooverse $j] != " " && [string index $fooverse $j] != "\n"} {set j [expr $j - 1]}
80
set foo2 [string range $fooverse $i $j]
81
set foo2 [string trim $foo2]
82
regsub -all -nocase {(<FI>|<CM>|<FB>)} $foo2 {} foo2
83
regsub -all {<RF>} $foo2 {(footnote: } foo2
84
regsub -all {<Rf>} $foo2 {)} foo2
88
if {$j > $len} {set j $len}
90
set foo2 [string range $fooverse $i end]
91
set foo2 [string trim $foo2]
92
regsub -all -nocase {(<FI>|<CM>|<FB>)} $foo2 {} foo2
93
regsub -all {<RF>} $foo2 {(footnote: } foo2
94
regsub -all {<Rf>} $foo2 {)} foo2
98
catch {close $foofile}
99
exec rm /tmp/fooout.$botnick
104
proc pub_lookup {nick uhost hand channel arg} {
105
global von chan bibver
108
putmsg $nick "Verse display is currently off."
111
if {($von==2) && (![matchattr $hand 3]) && (![matchattr $hand o])} {
112
putmsg $nick "Only ops can display verses at this time."
120
bind pub - !kjv setver_kjv
121
bind pub - !english setver_kjv
123
proc setver_kjv {nick uhost hand channel arg} {
124
global botnick chan bibver
126
pub_lookup $nick $uhost $hand $channel $arg
130
bind pub - !niv setver_niv
132
proc setver_niv {nick uhost hand channel arg} {
133
global botnick chan bibver
135
pub_lookup $nick $uhost $hand $channel $arg
138
bind pub - !dr setver_dr
139
bind pub - !douayrheims setver_dr
140
bind pub - !dre setver_dr
142
proc setver_dr {nick uhost hand channel arg} {
143
global botnick chan bibver
145
pub_lookup $nick $uhost $hand $channel $arg
148
bind pub - !nas setver_nasb
149
bind pub - !nasb setver_nasb
151
proc setver_nasb {nick uhost hand channel arg} {
152
global botnick chan bibver
154
pub_lookup $nick $uhost $hand $channel $arg
157
bind pub - !hnv setver_hnv
159
proc setver_hnv {nick uhost hand channel arg} {
160
global botnick chan bibver
162
pub_lookup $nick $uhost $hand $channel $arg
165
bind pub - !web setver_web
167
proc setver_web {nick uhost hand channel arg} {
168
global botnick chan bibver
170
pub_lookup $nick $uhost $hand $channel $arg
173
bind pub - !akjv setver_akjv
175
proc setver_akjv {nick uhost hand channel arg} {
176
global botnick chan bibver
178
pub_lookup $nick $uhost $hand $channel $arg
181
bind pub - !bbe setver_bbe
183
proc setver_bbe {nick uhost hand channel arg} {
184
global botnick chan bibver
186
pub_lookup $nick $uhost $hand $channel $arg
189
bind pub - !webster setver_webster
191
proc setver_webster {nick uhost hand channel arg} {
192
global botnick chan bibver
194
pub_lookup $nick $uhost $hand $channel $arg
197
bind pub - !jbc setver_jbc
199
proc setver_jbc {nick uhost hand channel arg} {
200
global botnick chan bibver
202
pub_lookup $nick $uhost $hand $channel $arg
205
bind pub - !rva setver_rva
206
bind pub - !spanish setver_rva
208
proc setver_rva {nick uhost hand channel arg} {
209
global botnick chan bibver
211
pub_lookup $nick $uhost $hand $channel $arg
214
bind pub - !lsg setver_lsg
215
bind pub - !french setver_lsg
217
proc setver_lsg {nick uhost hand channel arg} {
218
global botnick chan bibver
220
pub_lookup $nick $uhost $hand $channel $arg
223
bind pub - !bis setver_bis
224
bind pub - !indonesian setver_bis
226
proc setver_bis {nick uhost hand channel arg} {
227
global botnick chan bibver
229
pub_lookup $nick $uhost $hand $channel $arg
232
bind pub - !tb setver_tb
234
proc setver_tb {nick uhost hand channel arg} {
235
global botnick chan bibver
237
pub_lookup $nick $uhost $hand $channel $arg
240
bind pub - !sve setver_sve
241
bind pub - !swedish setver_sve
243
proc setver_sve {nick uhost hand channel arg} {
244
global botnick chan bibver
246
pub_lookup $nick $uhost $hand $channel $arg
249
bind pub - !vnt setver_vnt
251
proc setver_vnt {nick uhost hand channel arg} {
252
global botnick chan bibver
254
pub_lookup $nick $uhost $hand $channel $arg
257
bind pub - !asv setver_asv
259
proc setver_asv {nick uhost hand channel arg} {
260
global botnick chan bibver
262
pub_lookup $nick $uhost $hand $channel $arg
265
bind pub - !rsv setver_rsv
267
proc setver_rsv {nick uhost hand channel arg} {
268
global botnick chan bibver
270
pub_lookup $nick $uhost $hand $channel $arg
273
bind pub - !alt setver_alt
275
proc setver_alt {nick uhost hand channel arg} {
276
global botnick chan bibver
278
pub_lookup $nick $uhost $hand $channel $arg
281
bind pub - !dby setver_dby
282
bind pub - !darby setver_dby
284
proc setver_dby {nick uhost hand channel arg} {
285
global botnick chan bibver
287
pub_lookup $nick $uhost $hand $channel $arg
290
bind pub - !pr setver_pr
291
bind pub - !finnish setver_pr
293
proc setver_pr {nick uhost hand channel arg} {
294
global botnick chan bibver
296
pub_lookup $nick $uhost $hand $channel $arg
299
bind pub - !lsg setver_lsg
300
bind pub - !french setver_lsg
302
proc setver_lsg {nick uhost hand channel arg} {
303
global botnick chan bibver
305
pub_lookup $nick $uhost $hand $channel $arg
308
bind pub - !lut setver_lut
309
bind pub - !luther setver_lut
310
bind pub - !german setver_lut
312
proc setver_lut {nick uhost hand channel arg} {
313
global botnick chan bibver
315
pub_lookup $nick $uhost $hand $channel $arg
318
bind pub - !sch setver_sch
320
proc setver_sch {nick uhost hand channel arg} {
321
global botnick chan bibver
323
pub_lookup $nick $uhost $hand $channel $arg
327
bind pub - !kar setver_kar
328
bind pub - !hungarian setver_kar
330
proc setver_kar {nick uhost hand channel arg} {
331
global botnick chan bibver
333
pub_lookup $nick $uhost $hand $channel $arg
336
bind pub - !nrv setver_nrv
337
bind pub - !italian setver_nrv
339
proc setver_nrv {nick uhost hand channel arg} {
340
global botnick chan bibver
342
pub_lookup $nick $uhost $hand $channel $arg
345
bind pub - !jps setver_jps
347
proc setver_jps {nick uhost hand channel arg} {
348
global botnick chan bibver
350
pub_lookup $nick $uhost $hand $channel $arg
353
bind pub - !brp setver_brp
354
bind pub - !portuguese setver_brp
356
proc setver_brp {nick uhost hand channel arg} {
357
global botnick chan bibver
359
pub_lookup $nick $uhost $hand $channel $arg
362
bind pub - !sev setver_sev
364
proc setver_sev {nick uhost hand channel arg} {
365
global botnick chan bibver
367
pub_lookup $nick $uhost $hand $channel $arg
370
bind pub - !swahili setver_swahili
372
proc setver_swahili {nick uhost hand channel arg} {
373
global botnick chan bibver
375
pub_lookup $nick $uhost $hand $channel $arg
378
bind pub - !wey setver_wey
379
bind pub - !weymouth setver_wey
381
proc setver_wey {nick uhost hand channel arg} {
382
global botnick chan bibver
384
pub_lookup $nick $uhost $hand $channel $arg
387
bind pub - !ylt setver_ylt
389
proc setver_ylt {nick uhost hand channel arg} {
390
global botnick chan bibver
392
pub_lookup $nick $uhost $hand $channel $arg
395
bind pub - !alb setver_alb
396
bind pub - !albanian setver_alb
398
proc setver_alb {nick uhost hand channel arg} {
399
global botnick chan bibver
401
pub_lookup $nick $uhost $hand $channel $arg
404
bind pub - !gnpu setver_gnpu
405
bind pub - !chinese setver_gnpu
407
proc setver_gnpu {nick uhost hand channel arg} {
408
global botnick chan bibver
410
pub_lookup $nick $uhost $hand $channel $arg
413
bind pub - !dan setver_dan
414
bind pub - !danish setver_dan
416
proc setver_dan {nick uhost hand channel arg} {
417
global botnick chan bibver
419
pub_lookup $nick $uhost $hand $channel $arg
422
bind pub - !lei setver_lei
423
bind pub - !dutch setver_lei
425
proc setver_lei {nick uhost hand channel arg} {
426
global botnick chan bibver
428
pub_lookup $nick $uhost $hand $channel $arg
431
bind pub - !lu setver_lu
433
proc setver_lu {nick uhost hand channel arg} {
434
global botnick chan bibver
436
pub_lookup $nick $uhost $hand $channel $arg
439
bind pub - !svv setver_svv
441
proc setver_svv {nick uhost hand channel arg} {
442
global botnick chan bibver
444
pub_lookup $nick $uhost $hand $channel $arg
447
bind pub - !shr setver_shr
448
bind pub - !equadoran setver_shr
450
proc setver_shr {nick uhost hand channel arg} {
451
global botnick chan bibver
453
pub_lookup $nick $uhost $hand $channel $arg
456
bind pub - !crl setver_crl
457
bind pub - !creole setver_crl
459
proc setver_crl {nick uhost hand channel arg} {
460
global botnick chan bibver
462
pub_lookup $nick $uhost $hand $channel $arg
465
bind pub - !fredrb setver_fredrb
467
proc setver_fredrb {nick uhost hand channel arg} {
468
global botnick chan bibver
470
pub_lookup $nick $uhost $hand $channel $arg
473
bind pub - !ben setver_ben
475
proc setver_ben {nick uhost hand channel arg} {
476
global botnick chan bibver
478
pub_lookup $nick $uhost $hand $channel $arg
481
bind pub - !elb setver_elb
483
proc setver_elb {nick uhost hand channel arg} {
484
global botnick chan bibver
486
pub_lookup $nick $uhost $hand $channel $arg
489
bind pub - !kj21 setver_kj21
491
proc setver_kj21 {nick uhost hand channel arg} {
492
global botnick chan bibver
494
pub_lookup $nick $uhost $hand $channel $arg
497
bind pub - !litv setver_litv
499
proc setver_litv {nick uhost hand channel arg} {
500
global botnick chan bibver
502
pub_lookup $nick $uhost $hand $channel $arg
505
bind pub - !lo setver_lo
507
proc setver_lo {nick uhost hand channel arg} {
508
global botnick chan bibver
510
pub_lookup $nick $uhost $hand $channel $arg
513
bind pub - !maori setver_maori
515
proc setver_maori {nick uhost hand channel arg} {
516
global botnick chan bibver
518
pub_lookup $nick $uhost $hand $channel $arg
521
bind pub - !mkjv setver_mkjv
523
proc setver_mkjv {nick uhost hand channel arg} {
524
global botnick chan bibver
526
pub_lookup $nick $uhost $hand $channel $arg
529
bind pub - !nkj setver_nkjv
530
bind pub - !nkjv setver_nkjv
532
proc setver_nkjv {nick uhost hand channel arg} {
533
global botnick chan bibver
535
pub_lookup $nick $uhost $hand $channel $arg
538
bind pub - !ceb setver_ceb
539
bind pub - !filipino setver_ceb
541
proc setver_ceb {nick uhost hand channel arg} {
542
global botnick chan bibver
544
pub_lookup $nick $uhost $hand $channel $arg
547
bind pub - !rwebster setver_rwebster
549
proc setver_rwebster {nick uhost hand channel arg} {
550
global botnick chan bibver
552
pub_lookup $nick $uhost $hand $channel $arg
555
bind pub - !rv setver_rv
557
proc setver_rv {nick uhost hand channel arg} {
558
global botnick chan bibver
560
pub_lookup $nick $uhost $hand $channel $arg
563
bind pub - !turkish setver_turkish
565
proc setver_turkish {nick uhost hand channel arg} {
566
global botnick chan bibver
568
pub_lookup $nick $uhost $hand $channel $arg
571
bind pub - !uma setver_uma
573
proc setver_uma {nick uhost hand channel arg} {
574
global botnick chan bibver
576
pub_lookup $nick $uhost $hand $channel $arg
579
bind pub - !vulgate setver_vulgate
580
bind pub - !vulg setver_vulgate
581
bind pub - !latin setver_vulgate
583
proc setver_vulgate {nick uhost hand channel arg} {
584
global botnick chan bibver
586
pub_lookup $nick $uhost $hand $channel $arg
589
bind pub - !nasb95 setver_nasb95
590
bind pub - !nas95 setver_nasb95
591
bind pub - !nau setver_nasb95
593
proc setver_nasb95 {nick uhost hand channel arg} {
594
global botnick chan bibver
596
pub_lookup $nick $uhost $hand $channel $arg
599
bind pub - !nivbr setver_nivbr
600
bind pub - !nib setver_nivbr
602
proc setver_nivbr {nick uhost hand channel arg} {
603
global botnick chan bibver
605
pub_lookup $nick $uhost $hand $channel $arg
608
bind pub - !nlt setver_nlt
610
proc setver_nlt {nick uhost hand channel arg} {
611
global botnick chan bibver
613
pub_lookup $nick $uhost $hand $channel $arg
616
bind pub - !nrsv setver_nrsv
618
proc setver_nrsv {nick uhost hand channel arg} {
619
global botnick chan bibver
621
pub_lookup $nick $uhost $hand $channel $arg
624
bind pub - !neg setver_neg
626
proc setver_neg {nick uhost hand channel arg} {
627
global botnick chan bibver
629
pub_lookup $nick $uhost $hand $channel $arg
632
bind pub - !lnd setver_lnd
634
proc setver_lnd {nick uhost hand channel arg} {
635
global botnick chan bibver
637
pub_lookup $nick $uhost $hand $channel $arg
640
bind pub - !mel setver_mel
641
bind pub - !melanesian setver_mel
643
proc setver_mel {nick uhost hand channel arg} {
644
global botnick chan bibver
646
pub_lookup $nick $uhost $hand $channel $arg
649
bind pub - !norsk setver_norsk
651
proc setver_norsk {nick uhost hand channel arg} {
652
global botnick chan bibver
654
pub_lookup $nick $uhost $hand $channel $arg
657
bind pub - !cor setver_cor
659
proc setver_cor {nick uhost hand channel arg} {
660
global botnick chan bibver
662
pub_lookup $nick $uhost $hand $channel $arg
665
bind pub - !lba setver_lba
667
proc setver_lba {nick uhost hand channel arg} {
668
global botnick chan bibver
670
pub_lookup $nick $uhost $hand $channel $arg
673
bind pub - !byz setver_byz
675
proc setver_byz {nick uhost hand channel arg} {
676
global botnick chan bibver
678
pub_lookup $nick $uhost $hand $channel $arg
681
bind pub - !lxx setver_lxx
683
proc setver_lxx {nick uhost hand channel arg} {
684
global botnick chan bibver
686
pub_lookup $nick $uhost $hand $channel $arg
689
bind pub - !na26 setver_na26
690
bind pub - !greek setver_na26
692
proc setver_na26 {nick uhost hand channel arg} {
693
global botnick chan bibver
695
pub_lookup $nick $uhost $hand $channel $arg
698
bind pub - !scrivner setver_scrivner
700
proc setver_scrivner {nick uhost hand channel arg} {
701
global botnick chan bibver
703
pub_lookup $nick $uhost $hand $channel $arg
706
bind pub - !stephanus setver_stephanus
708
proc setver_stephanus {nick uhost hand channel arg} {
709
global botnick chan bibver
710
set bibver StephanusX
711
pub_lookup $nick $uhost $hand $channel $arg
714
bind pub - !tischendorf setver_tisch
715
bind pub - !tisch setver_tisch
717
proc setver_tisch {nick uhost hand channel arg} {
718
global botnick chan bibver
720
pub_lookup $nick $uhost $hand $channel $arg
723
bind pub - !wh setver_wh
725
proc setver_wh {nick uhost hand channel arg} {
726
global botnick chan bibver
728
pub_lookup $nick $uhost $hand $channel $arg
731
bind pub - !whnu setver_whnu
733
proc setver_whnu {nick uhost hand channel arg} {
734
global botnick chan bibver
736
pub_lookup $nick $uhost $hand $channel $arg
739
bind pub - !grkbyz setver_grkbyz
741
proc setver_grkbyz {nick uhost hand channel arg} {
742
global botnick chan bibver
744
pub_lookup $nick $uhost $hand $channel $arg
747
bind pub - !grklxx setver_grklxx
749
proc setver_grklxx {nick uhost hand channel arg} {
750
global botnick chan bibver
752
pub_lookup $nick $uhost $hand $channel $arg
755
bind pub - !grkna26 setver_grkna26
756
bind pub - !grkgreek setver_na26
758
proc setver_grkna26 {nick uhost hand channel arg} {
759
global botnick chan bibver
761
pub_lookup $nick $uhost $hand $channel $arg
764
bind pub - !grkscrivner setver_grkscrivner
766
proc setver_grkscrivner {nick uhost hand channel arg} {
767
global botnick chan bibver
769
pub_lookup $nick $uhost $hand $channel $arg
772
bind pub - !grkstephanus setver_grkstephanus
774
proc setver_grkstephanus {nick uhost hand channel arg} {
775
global botnick chan bibver
777
pub_lookup $nick $uhost $hand $channel $arg
780
bind pub - !grktischendorf setver_grktisch
781
bind pub - !grktisch setver_grktisch
783
proc setver_grktisch {nick uhost hand channel arg} {
784
global botnick chan bibver
786
pub_lookup $nick $uhost $hand $channel $arg
789
bind pub - !grkwh setver_grkwh
791
proc setver_grkwh {nick uhost hand channel arg} {
792
global botnick chan bibver
794
pub_lookup $nick $uhost $hand $channel $arg
797
bind pub - !grkwhnu setver_grkwhnu
799
proc setver_grkwhnu {nick uhost hand channel arg} {
800
global botnick chan bibver
802
pub_lookup $nick $uhost $hand $channel $arg
805
bind pub - !bhs setver_bhs
806
bind pub - !hebrew setver_bhs
808
proc setver_bhs {nick uhost hand channel arg} {
809
global botnick chan bibver
811
pub_lookup $nick $uhost $hand $channel $arg
814
bind pub - !rst setver_rst
816
proc setver_rst {nick uhost hand channel arg} {
817
global botnick chan bibver
819
pub_lookup $nick $uhost $hand $channel $arg
822
bind pub - !ukrainian setver_ukrainian
824
proc setver_ukrainian {nick uhost hand channel arg} {
825
global botnick chan bibver
827
pub_lookup $nick $uhost $hand $channel $arg
830
bind pub - !arabic setver_arabic
832
proc setver_arabic {nick uhost hand channel arg} {
833
global botnick chan bibver
835
pub_lookup $nick $uhost $hand $channel $arg
838
bind pub - !n27u4 setver_n27u4
839
bind pub - !nu setver_n27u4
840
bind pub - !bgreek setver_n27u4
842
proc setver_n27u4 {nick uhost hand channel arg} {
843
global botnick chan bibver
845
pub_lookup $nick $uhost $hand $channel $arg
848
bind pub - !umgreek setver_ukgreek
850
proc setver_umgreek {nick uhost hand channel arg} {
851
global botnick chan bibver
853
pub_lookup $nick $uhost $hand $channel $arg
856
bind pub - !viet setver_viet
857
bind pub - !vietnamese setver_viet
859
proc setver_viet {nick uhost hand channel arg} {
860
global botnick chan bibver
862
pub_lookup $nick $uhost $hand $channel $arg
866
# ----------------------------------------------------------------------
868
proc pubsearchword {vlookup} {
869
global botnick chan bibver diatheke
870
catch {exec $diatheke -s $bibver "$vlookup" >& /tmp/fooout.$botnick}
871
catch {set foofile [open /tmp/fooout.$botnick]}
873
while {[gets $foofile fooverse] >= 0} {
874
set len [string length $fooverse]
878
while {[string index $fooverse $j] != ";" && [string index $fooverse $j] != ")" && [string index $fooverse $j] != "\n"} {set j [expr $j + 1]}
879
set foo2 [string range $fooverse $i $j]
880
set foo2 [string trim $foo2]
884
if {$j > $len} {set j $len}
886
set foo2 [string range $fooverse $i end]
887
set foo2 [string trim $foo2]
890
catch {close $foofile}
892
putmsg $chan "$fooverse"
893
exec rm /tmp/fooout.$botnick
898
proc pub_lookups {nick uhost hand channel arg} {
899
global von chan bibver
902
putmsg $nick "Verse display is currently off."
905
if {($von==3) && (![matchattr $hand 3]) && (![matchattr $hand o]) && (![isvoice $nick $chan])} {
906
putmsg $nick "Sorry, only ops and voiced users can do searches right now."
909
if {($von==2) && (![matchattr $hand 3]) && (![matchattr $hand o])} {
910
putmsg $nick "Sorry, only ops can do searches right now."
917
bind pub - !skjv setver_kjvs
918
bind pub - !senglish setver_kjvs
920
proc setver_kjvs {nick uhost hand channel arg} {
921
global botnick chan bibver
923
pub_lookups $nick $uhost $hand $channel $arg
927
bind pub - !sniv setver_nivs
929
proc setver_nivs {nick uhost hand channel arg} {
930
global botnick chan bibver
932
pub_lookups $nick $uhost $hand $channel $arg
935
bind pub - !sdr setver_drs
936
bind pub - !sdouayrheims setver_drs
937
bind pub - !sdre setver_drs
939
proc setver_drs {nick uhost hand channel arg} {
940
global botnick chan bibver
942
pub_lookups $nick $uhost $hand $channel $arg
945
bind pub - !snas setver_nasbs
946
bind pub - !snasb setver_nasbs
948
proc setver_nasbs {nick uhost hand channel arg} {
949
global botnick chan bibver
951
pub_lookups $nick $uhost $hand $channel $arg
954
bind pub - !shnv setver_hnvs
956
proc setver_hnvs {nick uhost hand channel arg} {
957
global botnick chan bibver
959
pub_lookups $nick $uhost $hand $channel $arg
962
bind pub - !sweb setver_webs
964
proc setver_webs {nick uhost hand channel arg} {
965
global botnick chan bibver
967
pub_lookups $nick $uhost $hand $channel $arg
970
bind pub - !sbbe setver_bbes
972
proc setver_bbes {nick uhost hand channel arg} {
973
global botnick chan bibver
975
pub_lookups $nick $uhost $hand $channel $arg
978
bind pub - !swebster setver_websters
980
proc setver_websters {nick uhost hand channel arg} {
981
global botnick chan bibver
983
pub_lookups $nick $uhost $hand $channel $arg
986
bind pub - !sjbc setver_jbcs
988
proc setver_jbcs {nick uhost hand channel arg} {
989
global botnick chan bibver
991
pub_lookups $nick $uhost $hand $channel $arg
994
bind pub - !srva setver_rvas
995
bind pub - !sspanish setver_rvas
997
proc setver_rvas {nick uhost hand channel arg} {
998
global botnick chan bibver
1000
pub_lookups $nick $uhost $hand $channel $arg
1003
bind pub - !sbis setver_biss
1004
bind pub - !sindonesian setver_biss
1006
proc setver_biss {nick uhost hand channel arg} {
1007
global botnick chan bibver
1009
pub_lookups $nick $uhost $hand $channel $arg
1012
bind pub - !stb setver_tbs
1014
proc setver_tbs {nick uhost hand channel arg} {
1015
global botnick chan bibver
1017
pub_lookups $nick $uhost $hand $channel $arg
1020
bind pub - !ssve setver_sves
1021
bind pub - !sswedish setver_sves
1023
proc setver_sves {nick uhost hand channel arg} {
1024
global botnick chan bibver
1026
pub_lookups $nick $uhost $hand $channel $arg
1029
bind pub - !svnt setver_vnts
1031
proc setver_vnts {nick uhost hand channel arg} {
1032
global botnick chan bibver
1034
pub_lookups $nick $uhost $hand $channel $arg
1037
bind pub - !sasv setver_asvs
1039
proc setver_asvs {nick uhost hand channel arg} {
1040
global botnick chan bibver
1042
pub_lookups $nick $uhost $hand $channel $arg
1045
bind pub - !srsv setver_rsvs
1047
proc setver_rsvs {nick uhost hand channel arg} {
1048
global botnick chan bibver
1050
pub_lookups $nick $uhost $hand $channel $arg
1053
bind pub - !salt setver_alts
1055
proc setver_alts {nick uhost hand channel arg} {
1056
global botnick chan bibver
1058
pub_lookups $nick $uhost $hand $channel $arg
1061
bind pub - !sdby setver_dbys
1062
bind pub - !sdarby setver_dbys
1064
proc setver_dbys {nick uhost hand channel arg} {
1065
global botnick chan bibver
1067
pub_lookups $nick $uhost $hand $channel $arg
1070
bind pub - !spr setver_prs
1071
bind pub - !sfinnish setver_prs
1073
proc setver_prs {nick uhost hand channel arg} {
1074
global botnick chan bibver
1076
pub_lookups $nick $uhost $hand $channel $arg
1079
bind pub - !slsg setver_lsgs
1080
bind pub - !sfrench setver_lsgs
1082
proc setver_lsgs {nick uhost hand channel arg} {
1083
global botnick chan bibver
1085
pub_lookups $nick $uhost $hand $channel $arg
1088
bind pub - !slut setver_luts
1089
bind pub - !sluther setver_luts
1090
bind pub - !sgerman setver_luts
1092
proc setver_luts {nick uhost hand channel arg} {
1093
global botnick chan bibver
1095
pub_lookups $nick $uhost $hand $channel $arg
1098
bind pub - !ssch setver_schs
1100
proc setver_schs {nick uhost hand channel arg} {
1101
global botnick chan bibver
1103
pub_lookups $nick $uhost $hand $channel $arg
1107
bind pub - !skar setver_kars
1108
bind pub - !shungarian setver_kars
1110
proc setver_kars {nick uhost hand channel arg} {
1111
global botnick chan bibver
1113
pub_lookups $nick $uhost $hand $channel $arg
1116
bind pub - !snrv setver_nrvs
1117
bind pub - !sitalian setver_nrvs
1119
proc setver_nrvs {nick uhost hand channel arg} {
1120
global botnick chan bibver
1122
pub_lookups $nick $uhost $hand $channel $arg
1125
bind pub - !sjps setver_jpss
1127
proc setver_jpss {nick uhost hand channel arg} {
1128
global botnick chan bibver
1130
pub_lookups $nick $uhost $hand $channel $arg
1133
bind pub - !sbrp setver_brps
1134
bind pub - !sportuguese setver_brps
1136
proc setver_brps {nick uhost hand channel arg} {
1137
global botnick chan bibver
1139
pub_lookups $nick $uhost $hand $channel $arg
1142
bind pub - !ssev setver_sevs
1144
proc setver_sevs {nick uhost hand channel arg} {
1145
global botnick chan bibver
1147
pub_lookups $nick $uhost $hand $channel $arg
1150
bind pub - !sswahili setver_swahilis
1152
proc setver_swahilis {nick uhost hand channel arg} {
1153
global botnick chan bibver
1155
pub_lookups $nick $uhost $hand $channel $arg
1158
bind pub - !swey setver_weys
1159
bind pub - !sweymouth setver_weys
1161
proc setver_weys {nick uhost hand channel arg} {
1162
global botnick chan bibver
1164
pub_lookups $nick $uhost $hand $channel $arg
1167
bind pub - !sylt setver_ylts
1169
proc setver_ylts {nick uhost hand channel arg} {
1170
global botnick chan bibver
1172
pub_lookups $nick $uhost $hand $channel $arg
1175
bind pub - !salb setver_albs
1176
bind pub - !salbanian setver_albs
1178
proc setver_albs {nick uhost hand channel arg} {
1179
global botnick chan bibver
1181
pub_lookups $nick $uhost $hand $channel $arg
1184
bind pub - !sgnpu setver_gnpus
1185
bind pub - !schinese setver_gnpus
1187
proc setver_gnpus {nick uhost hand channel arg} {
1188
global botnick chan bibver
1190
pub_lookups $nick $uhost $hand $channel $arg
1193
bind pub - !sdan setver_dans
1194
bind pub - !sdanish setver_dans
1196
proc setver_dans {nick uhost hand channel arg} {
1197
global botnick chan bibver
1199
pub_lookups $nick $uhost $hand $channel $arg
1202
bind pub - !slei setver_leis
1203
bind pub - !sdutch setver_leis
1205
proc setver_leis {nick uhost hand channel arg} {
1206
global botnick chan bibver
1208
pub_lookups $nick $uhost $hand $channel $arg
1211
bind pub - !slu setver_lus
1213
proc setver_lus {nick uhost hand channel arg} {
1214
global botnick chan bibver
1216
pub_lookups $nick $uhost $hand $channel $arg
1219
bind pub - !ssvv setver_svvs
1221
proc setver_svvs {nick uhost hand channel arg} {
1222
global botnick chan bibver
1224
pub_lookups $nick $uhost $hand $channel $arg
1227
bind pub - !sshr setver_shrs
1228
bind pub - !sequadoran setver_shrs
1230
proc setver_shrs {nick uhost hand channel arg} {
1231
global botnick chan bibver
1233
pub_lookups $nick $uhost $hand $channel $arg
1236
bind pub - !scrl setver_crls
1237
bind pub - !screole setver_crls
1239
proc setver_crls {nick uhost hand channel arg} {
1240
global botnick chan bibver
1242
pub_lookups $nick $uhost $hand $channel $arg
1245
bind pub - !sfredrb setver_fredrbs
1247
proc setver_fredrbs {nick uhost hand channel arg} {
1248
global botnick chan bibver
1250
pub_lookups $nick $uhost $hand $channel $arg
1253
bind pub - !sben setver_bens
1255
proc setver_bens {nick uhost hand channel arg} {
1256
global botnick chan bibver
1258
pub_lookups $nick $uhost $hand $channel $arg
1261
bind pub - !selb setver_elbs
1263
proc setver_elbs {nick uhost hand channel arg} {
1264
global botnick chan bibver
1266
pub_lookups $nick $uhost $hand $channel $arg
1269
bind pub - !skj21 setver_kj21s
1271
proc setver_kj21s {nick uhost hand channel arg} {
1272
global botnick chan bibver
1274
pub_lookups $nick $uhost $hand $channel $arg
1277
bind pub - !slitv setver_litvs
1279
proc setver_litvs {nick uhost hand channel arg} {
1280
global botnick chan bibver
1282
pub_lookups $nick $uhost $hand $channel $arg
1285
bind pub - !slo setver_los
1287
proc setver_los {nick uhost hand channel arg} {
1288
global botnick chan bibver
1290
pub_lookups $nick $uhost $hand $channel $arg
1293
bind pub - !smaori setver_maoris
1295
proc setver_maoris {nick uhost hand channel arg} {
1296
global botnick chan bibver
1298
pub_lookups $nick $uhost $hand $channel $arg
1301
bind pub - !smkjv setver_mkjvs
1303
proc setver_mkjvs {nick uhost hand channel arg} {
1304
global botnick chan bibver
1306
pub_lookups $nick $uhost $hand $channel $arg
1309
bind pub - !snkjv setver_nkjvs
1311
proc setver_nkjvs {nick uhost hand channel arg} {
1312
global botnick chan bibver
1314
pub_lookups $nick $uhost $hand $channel $arg
1317
bind pub - !sceb setver_cebs
1318
bind pub - !sfilipino setver_cebs
1320
proc setver_cebs {nick uhost hand channel arg} {
1321
global botnick chan bibver
1323
pub_lookups $nick $uhost $hand $channel $arg
1326
bind pub - !srwebster setver_rwebsters
1328
proc setver_rwebsters {nick uhost hand channel arg} {
1329
global botnick chan bibver
1331
pub_lookups $nick $uhost $hand $channel $arg
1334
bind pub - !srv setver_rvs
1336
proc setver_rvs {nick uhost hand channel arg} {
1337
global botnick chan bibver
1339
pub_lookups $nick $uhost $hand $channel $arg
1342
bind pub - !sturkish setver_turkishs
1344
proc setver_turkishs {nick uhost hand channel arg} {
1345
global botnick chan bibver
1347
pub_lookups $nick $uhost $hand $channel $arg
1350
bind pub - !suma setver_umas
1352
proc setver_umas {nick uhost hand channel arg} {
1353
global botnick chan bibver
1355
pub_lookups $nick $uhost $hand $channel $arg
1358
bind pub - !svulgate setver_vulgates
1359
bind pub - !svulg setver_vulgates
1360
bind pub - !slatin setver_vulgates
1362
proc setver_vulgates {nick uhost hand channel arg} {
1363
global botnick chan bibver
1365
pub_lookups $nick $uhost $hand $channel $arg
1368
bind pub - !snasb95 setver_nasb95s
1369
bind pub - !snas95 setver_nasb95s
1370
bind pub - !snau setver_nasb95s
1372
proc setver_nasb95s {nick uhost hand channel arg} {
1373
global botnick chan bibver
1375
pub_lookups $nick $uhost $hand $channel $arg
1378
bind pub - !snivbr setver_nivbrs
1379
bind pub - !snib setver_nivbrs
1381
proc setver_nivbrs {nick uhost hand channel arg} {
1382
global botnick chan bibver
1384
pub_lookups $nick $uhost $hand $channel $arg
1387
bind pub - !snlt setver_nlts
1389
proc setver_nlts {nick uhost hand channel arg} {
1390
global botnick chan bibver
1392
pub_lookups $nick $uhost $hand $channel $arg
1395
bind pub - !snrsv setver_nrsvs
1397
proc setver_nrsvs {nick uhost hand channel arg} {
1398
global botnick chan bibver
1400
pub_lookups $nick $uhost $hand $channel $arg
1403
bind pub - !sneg setver_negs
1405
proc setver_negs {nick uhost hand channel arg} {
1406
global botnick chan bibver
1408
pub_lookups $nick $uhost $hand $channel $arg
1411
bind pub - !slnd setver_lnds
1413
proc setver_lnds {nick uhost hand channel arg} {
1414
global botnick chan bibver
1416
pub_lookups $nick $uhost $hand $channel $arg
1419
bind pub - !smel setver_mels
1420
bind pub - !smelanesian setver_mels
1422
proc setver_mels {nick uhost hand channel arg} {
1423
global botnick chan bibver
1425
pub_lookups $nick $uhost $hand $channel $arg
1428
bind pub - !snorsk setver_norsks
1430
proc setver_norsks {nick uhost hand channel arg} {
1431
global botnick chan bibver
1433
pub_lookups $nick $uhost $hand $channel $arg
1436
bind pub - !scor setver_cors
1438
proc setver_cors {nick uhost hand channel arg} {
1439
global botnick chan bibver
1441
pub_lookups $nick $uhost $hand $channel $arg
1444
bind pub - !slba setver_lbas
1446
proc setver_lbas {nick uhost hand channel arg} {
1447
global botnick chan bibver
1449
pub_lookups $nick $uhost $hand $channel $arg
1452
bind pub - !sbyz setver_byzs
1454
proc setver_byzs {nick uhost hand channel arg} {
1455
global botnick chan bibver
1457
pub_lookups $nick $uhost $hand $channel $arg
1460
bind pub - !slxx setver_lxxs
1462
proc setver_lxxs {nick uhost hand channel arg} {
1463
global botnick chan bibver
1465
pub_lookups $nick $uhost $hand $channel $arg
1468
bind pub - !sna26 setver_na26s
1469
bind pub - !sgreek setver_na26s
1471
proc setver_na26s {nick uhost hand channel arg} {
1472
global botnick chan bibver
1474
pub_lookups $nick $uhost $hand $channel $arg
1477
bind pub - !sscrivner setver_scrivners
1479
proc setver_scrivners {nick uhost hand channel arg} {
1480
global botnick chan bibver
1481
set bibver ScrivnerX
1482
pub_lookups $nick $uhost $hand $channel $arg
1485
bind pub - !sstephanus setver_stephanuss
1487
proc setver_stephanuss {nick uhost hand channel arg} {
1488
global botnick chan bibver
1489
set bibver StephanusX
1490
pub_lookups $nick $uhost $hand $channel $arg
1493
bind pub - !stischendorf setver_tischs
1494
bind pub - !stisch setver_tischs
1496
proc setver_tischs {nick uhost hand channel arg} {
1497
global botnick chan bibver
1499
pub_lookups $nick $uhost $hand $channel $arg
1502
bind pub - !swh setver_whs
1504
proc setver_whs {nick uhost hand channel arg} {
1505
global botnick chan bibver
1507
pub_lookups $nick $uhost $hand $channel $arg
1510
bind pub - !swhnu setver_whnus
1512
proc setver_whnus {nick uhost hand channel arg} {
1513
global botnick chan bibver
1515
pub_lookups $nick $uhost $hand $channel $arg
1518
bind pub - !sgrkbyz setver_grkbyzs
1520
proc setver_grkbyzs {nick uhost hand channel arg} {
1521
global botnick chan bibver
1523
pub_lookups $nick $uhost $hand $channel $arg
1526
bind pub - !sgrklxx setver_grklxxs
1528
proc setver_grklxxs {nick uhost hand channel arg} {
1529
global botnick chan bibver
1531
pub_lookups $nick $uhost $hand $channel $arg
1534
bind pub - !sgrkna26 setver_grkna26s
1535
bind pub - !sgrkgreek setver_na26s
1537
proc setver_grkna26s {nick uhost hand channel arg} {
1538
global botnick chan bibver
1540
pub_lookups $nick $uhost $hand $channel $arg
1543
bind pub - !sgrkscrivner setver_grkscrivners
1545
proc setver_grkscrivners {nick uhost hand channel arg} {
1546
global botnick chan bibver
1548
pub_lookups $nick $uhost $hand $channel $arg
1551
bind pub - !sgrkstephanus setver_grkstephanuss
1553
proc setver_grkstephanuss {nick uhost hand channel arg} {
1554
global botnick chan bibver
1555
set bibver Stephanus
1556
pub_lookups $nick $uhost $hand $channel $arg
1559
bind pub - !sgrktischendorf setver_grktischs
1560
bind pub - !sgrktisch setver_grktischs
1562
proc setver_grktischs {nick uhost hand channel arg} {
1563
global botnick chan bibver
1565
pub_lookups $nick $uhost $hand $channel $arg
1568
bind pub - !sgrkwh setver_grkwhs
1570
proc setver_grkwhs {nick uhost hand channel arg} {
1571
global botnick chan bibver
1573
pub_lookups $nick $uhost $hand $channel $arg
1576
bind pub - !sgrkwhnu setver_grkwhnus
1578
proc setver_grkwhnus {nick uhost hand channel arg} {
1579
global botnick chan bibver
1581
pub_lookups $nick $uhost $hand $channel $arg
1584
bind pub - !sbhs setver_bhss
1585
bind pub - !shebrew setver_bhss
1587
proc setver_bhss {nick uhost hand channel arg} {
1588
global botnick chan bibver
1590
pub_lookups $nick $uhost $hand $channel $arg
1593
bind pub - !srst setver_rsts
1595
proc setver_rsts {nick uhost hand channel arg} {
1596
global botnick chan bibver
1598
pub_lookups $nick $uhost $hand $channel $arg
1601
bind pub - !sukrainian setver_ukrainians
1603
proc setver_ukrainians {nick uhost hand channel arg} {
1604
global botnick chan bibver
1605
set bibver Ukrainian
1606
pub_lookups $nick $uhost $hand $channel $arg
1609
bind pub - !sarabic setver_arabics
1611
proc setver_arabics {nick uhost hand channel arg} {
1612
global botnick chan bibver
1614
pub_lookups $nick $uhost $hand $channel $arg
1617
bind pub - !sn27u4 setver_n27u4s
1618
bind pub - !snu setver_n27u4s
1619
bind pub - !sbgreek setver_n27u4s
1621
proc setver_n27u4s {nick uhost hand channel arg} {
1622
global botnick chan bibver
1624
pub_lookups $nick $uhost $hand $channel $arg
1627
bind pub - !sumgreek setver_ukgreeks
1629
proc setver_umgreeks {nick uhost hand channel arg} {
1630
global botnick chan bibver
1632
pub_lookups $nick $uhost $hand $channel $arg
1635
bind pub - !sviet setver_viets
1636
bind pub - !svietnamese setver_viets
1638
proc setver_viets {nick uhost hand channel arg} {
1639
global botnick chan bibver
1641
pub_lookups $nick $uhost $hand $channel $arg
1644
#----------------------------------------------------------------------
1647
proc publookupdict {vlookup} {
1648
global botnick chan bibver diatheke
1649
catch {exec $diatheke -f plaintext -b $bibver -k "$vlookup" >& /tmp/fooout.$botnick}
1650
catch {set foofile [open /tmp/fooout.$botnick]}
1652
while {[gets $foofile fooverse] >= 0} {
1653
putmsg $chan "$fooverse"
1655
catch {close $foofile}
1656
# exec rm /tmp/fooout.$botnick
1661
proc pub_lookupd {nick uhost hand channel arg} {
1662
global von chan bibver
1665
putmsg $nick "Verse display is currently off."
1668
if {($von==3) && (![matchattr $hand 3]) && (![matchattr $hand o]) && (![isvoice $nick $chan])} {
1669
putmsg $nick "Sorry, only ops and voiced users can use dictionaries and indices right now."
1672
if {($von==2) && (![matchattr $hand 3]) && (![matchattr $hand o])} {
1673
putmsg $nick "Sorry, only ops can use dictionaries and indices right now."
1680
bind pub - !losung setver_losung
1682
proc setver_losung {nick uhost hand channel arg} {
1683
global botnick chan bibver
1684
set bibver losung_en_99
1685
set arg [exec date "+%m.%d"]
1686
pub_lookupd $nick $uhost $hand $channel $arg
1689
bind pub - !vines setver_vines
1691
proc setver_vines {nick uhost hand channel arg} {
1692
global botnick chan bibver
1694
pub_lookupd $nick $uhost $hand $channel $arg
1697
bind pub - !naves setver_naves
1699
proc setver_naves {nick uhost hand channel arg} {
1700
global botnick chan bibver
1702
pub_lookupd $nick $uhost $hand $channel $arg
1705
bind pub - !eastons setver_eastons
1707
proc setver_eastons {nick uhost hand channel arg} {
1708
global botnick chan bibver
1710
pub_lookupd $nick $uhost $hand $channel $arg
1713
bind pub - !strheb setver_strheb
1715
proc setver_strheb {nick uhost hand channel arg} {
1716
global botnick chan bibver
1717
set bibver StrongsHebrew
1718
pub_lookupd $nick $uhost $hand $channel $arg
1721
bind pub - !strgrk setver_strgrk
1723
proc setver_strgrk {nick uhost hand channel arg} {
1724
global botnick chan bibver
1725
set bibver StrongsGreek
1726
pub_lookupd $nick $uhost $hand $channel $arg
1729
bind pub - !bdb setver_bdb
1731
proc setver_bdb {nick uhost hand channel arg} {
1732
global botnick chan bibver
1734
pub_lookupd $nick $uhost $hand $channel $arg
1737
bind pub - !thayer setver_thayer
1739
proc setver_thayer {nick uhost hand channel arg} {
1740
global botnick chan bibver
1742
pub_lookupd $nick $uhost $hand $channel $arg
1745
bind pub - !hitch setver_hitch
1747
proc setver_hitch {nick uhost hand channel arg} {
1748
global botnick chan bibver
1750
pub_lookupd $nick $uhost $hand $channel $arg
1753
bind pub - !isbe setver_isbe
1755
proc setver_isbe {nick uhost hand channel arg} {
1756
global botnick chan bibver
1758
pub_lookupd $nick $uhost $hand $channel $arg
1761
bind pub - !smiths setver_smiths
1763
proc setver_smiths {nick uhost hand channel arg} {
1764
global botnick chan bibver
1766
pub_lookupd $nick $uhost $hand $channel $arg
1769
bind pub - !torrey setver_torrey
1771
proc setver_torrey {nick uhost hand channel arg} {
1772
global botnick chan bibver
1774
pub_lookupd $nick $uhost $hand $channel $arg
1777
#----------------------------------------------------------------------
1779
proc publookupcomm {vlookup} {
1780
global botnick chan bibver diatheke
1781
catch {exec $diatheke -c $bibver "$vlookup" >& /tmp/fooout.$botnick}
1782
catch {set foofile [open /tmp/fooout.$botnick]}
1783
while {[gets $foofile fooverse] >= 0} {
1784
set len [string length $fooverse]
1788
while {[string index $fooverse $j] != " " && [string index $fooverse $j] != "\n"} {set j [expr $j + 1]}
1789
set foo2 [string range $fooverse $i $j]
1790
set foo2 [string trim $foo2]
1791
regsub -all -nocase {(<FI>|<CM>|<FB>)} $foo2 {} foo2
1792
regsub -all {<RF>} $foo2 {(footnote: } foo2
1793
regsub -all {<Rf>} $foo2 {)} foo2
1794
putmsg $chan "$foo2"
1796
set j [expr $j + 73]
1797
if {$j > $len} {set j $len}
1799
set foo2 [string range $fooverse $i end]
1800
set foo2 [string trim $foo2]
1801
regsub -all -nocase {(<FI>|<CM>|<FB>)} $foo2 {} foo2
1802
regsub -all {<RF>} $foo2 {(footnote: } foo2
1803
regsub -all {<Rf>} $foo2 {)} foo2
1804
putmsg $chan "$foo2"
1806
catch {close $foofile}
1807
exec rm /tmp/fooout.$botnick
1812
proc pub_lookupc {nick uhost hand channel arg} {
1813
global von chan bibver
1816
putmsg $nick "Verse display is currently off."
1819
if {($von==3) && (![matchattr $hand 3]) && (![matchattr $hand o]) && (![isvoice $nick $chan])} {
1820
putmsg $nick "Sorry, only ops and voiced users can use commentaries right now."
1823
if {($von==2) && (![matchattr $hand 3]) && (![matchattr $hand o])} {
1824
putmsg $nick "Sorry, only ops can use commentaries right now."
1831
bind pub - !rwp setver_rwp
1833
proc setver_rwp {nick uhost hand channel arg} {
1834
global botnick chan bibver
1836
pub_lookupc $nick $uhost $hand $channel $arg
1839
bind pub - !mhc setver_mhc
1841
proc setver_mhc {nick uhost hand channel arg} {
1842
global botnick chan bibver
1844
pub_lookupc $nick $uhost $hand $channel $arg
1847
bind pub - !dtn setver_dtn
1849
proc setver_dtn {nick uhost hand channel arg} {
1850
global botnick chan bibver
1852
pub_lookupc $nick $uhost $hand $channel $arg
1855
bind pub - !family setver_family
1857
proc setver_family {nick uhost hand channel arg} {
1858
global botnick chan bibver
1860
pub_lookupc $nick $uhost $hand $channel $arg
1863
bind pub - !geneva setver_geneva
1865
proc setver_geneva {nick uhost hand channel arg} {
1866
global botnick chan bibver
1868
pub_lookupc $nick $uhost $hand $channel $arg
1871
bind pub - !gill setver_gill
1873
proc setver_gill {nick uhost hand channel arg} {
1874
global botnick chan bibver
1876
pub_lookupc $nick $uhost $hand $channel $arg
1879
bind pub - !pnt setver_pnt
1881
proc setver_pnt {nick uhost hand channel arg} {
1882
global botnick chan bibver
1884
pub_lookupc $nick $uhost $hand $channel $arg
1887
bind pub - !tfg setver_tfg
1889
proc setver_tfg {nick uhost hand channel arg} {
1890
global botnick chan bibver
1892
pub_lookupc $nick $uhost $hand $channel $arg
1895
bind pub - !tsk setver_tsk
1897
proc setver_tsk {nick uhost hand channel arg} {
1898
global botnick chan bibver
1900
pub_lookupc $nick $uhost $hand $channel $arg
1903
bind pub - !wesley setver_wesley
1905
proc setver_wesley {nick uhost hand channel arg} {
1906
global botnick chan bibver
1908
pub_lookupc $nick $uhost $hand $channel $arg
1911
#----------------------------------------------------------------------
1913
bind pub - !dict dictlookup
1915
proc dictlookup {nick uhost hand channel arg} {
1916
global botnick von dict
1919
putmsg $nick "Verse display is currently off."
1922
if {($von==3) && (![matchattr $hand 3]) && (![matchattr $hand o]) && (![isvoice $nick $channel])} {
1923
putmsg $nick "Sorry, only ops and voiced users can use dictionaries and indices right now."
1926
if {($von==2) && (![matchattr $hand 3]) && (![matchattr $hand o])} {
1927
putmsg $nick "Only ops can use dictionaries and indices right now."
1931
catch {exec $dict "$arg" >& /tmp/fooout.$botnick}
1932
catch {set foofile [open /tmp/fooout.$botnick]}
1933
catch {set fooverse [gets $foofile]}
1934
while {[gets $foofile fooverse] >= 0} {
1935
set fooverse [string trim $fooverse]
1936
putmsg $channel "$fooverse"
1938
catch {close $foofile}
1939
exec rm /tmp/fooout.$botnick
1943
#----------------------------------------------------------------------
1945
bind pub - !biblehelp pub_help
1946
bind msg - biblehelp pub_help
1948
proc pub_help {nick uhost hand channel arg} {
1951
putserv "NOTICE $nick :Diatheke/Tcl BibleBot version $diaver"
1953
if {(($von==0) || ($von==2)) && (![matchattr $hand 3]) && (![matchattr $hand o])} {
1954
putserv "NOTICE $nick :BibleBot displays are currently turned off."
1958
putserv "NOTICE $nick :Supported commands:"
1959
putserv "NOTICE $nick :Help, using \"!biblehelp\""
1960
putserv "NOTICE $nick :Book list, using \"!books\" (it's long)"
1961
# Uncomment the next line if you have turned LOGGING on in diatheke to enable
1962
# the history function.
1963
# putserv "NOTICE $nick :See last 5 calls to BibleBot, using \"!history\""
1964
putserv "NOTICE $nick :Check display status, using \"!status\""
1965
putserv "NOTICE $nick :Bible lookups, using \"!<bible version> <book> <chapter>:<verse>\""
1966
putserv "NOTICE $nick :verse ranges can be specified by adding \"-<last verse>\" to this"
1967
putserv "NOTICE $nick :To turn Strong's numbers and/or footnotes on, use @ and/or # respectively before the book name. For example \"!kjv @#Gen 1:4\" will retrieve Genesis 1:3 with the Strong's numbers and footnotes associated with it."
1969
if {($von==3) && (![matchattr $hand 3]) && (![matchattr $hand o]) && (![isvoice $nick $channel])} {
1973
putserv "NOTICE $nick :Commentary lookups, using \"!<commentary> <book> <chapter>:<verse>\""
1974
putserv "NOTICE $nick :Dictionary/index lookups, using \"!<dictionary> <word or number>\""
1975
putserv "NOTICE $nick :Bible searches, using \"!s<bible version> <word>\""
1976
putserv "NOTICE $nick :Diatheke/Tcl defaults to PHRASE search mode. To use MULTI-WORD search mode, preface your search with an @. To use REGEX mode, preface your search with a #. For example: \"!skjv @Jesus love\" will print a list of all verses in the KJV containing the words Jesus and love."
1978
if {(![matchattr $hand 3]) && (![matchattr $hand o])} {
1982
putserv "NOTICE $nick :To turn verse display off, use \"!verseoff\""
1983
putserv "NOTICE $nick :To turn all displays on for all users, use \"!verseon\""
1984
putserv "NOTICE $nick :To turn all displays on for ops only, use \"!verseon o\""
1985
putserv "NOTICE $nick :To turn verse diaplays on for regular users and all other displays on for ops and voiced users only, use \"!verseon v\" (default)"
1988
bind pub - !books pub_books
1989
bind msg - books pub_books
1991
proc pub_books {nick uhost hand channel arg} {
1994
if {(($von==0) || ($von==2)) && (![matchattr $hand 3]) && (![matchattr $hand o])} {
1995
putserv "NOTICE $nick :BibleBot displays are currently turned off."
1999
putserv "NOTICE $nick :English language Bibles (26):"
2000
putserv "NOTICE $nick :Ameican Standard Version (!asv), Analytical Literal Translation (!alt), Bible in Basic English (!bbe), Darby (!dby), Douay-Rheims Bible (!dr), Green's Literal Translation (!litv), Green's Modern King James Version (!mkjv), Hebrew Names Version (!hnv), Jewish Publication Society 1917 (!jps), King James Version (!kjv), The Living Oracles NT (!lo),"
2001
putserv "NOTICE $nick :New American Standard Bible (!nasb), New American Standard Bible, 95 Update (!nasb95), New International Version (!niv), New Internation Version, British Edition (!nivbr), New King James Version (!nkjv), New Living Translation (!nlt), New Revised Standard Version (!nrsv), Orthodox Jewish Brit ChadashaNT only (!jbc),"
2002
putserv "NOTICE $nick :Revised Standard Version (!rsv), Revised 1833 Webster's (!rwebster), World English Bible (!web), Webster's (!webster), Weymouth NT (!wey), Young's Literal Translation (!ylt), 21st Century King James Version (!kj21)"
2003
putserv "NOTICE $nick :Non-English language Bibles (39):"
2004
putserv "NOTICE $nick :Albanian Bible (!alb), Chinese GNPU (!gnpu), Danish Bible (!dan), Dutch Leidse Vertaling (!lei), Dutch Lutherse Vertaling (!lu), Dutch Statemvertaling (!svv), Equadoran Shuar NT (!shr), Filipino Nga Cebuano (!ceb), Finnish Pyhz Raamattu (!pr), French Louis Segond Version (!lsg), French Haitian Creole Version (!crl), French Darby's Version (!fredrb),"
2005
putserv "NOTICE $nick :French Nouvelle Edition de Geneve (!neg), German Luther Version (!lut), German Schlachter (!sch), German Bengel NT (!ben), German Elberfelder Version (!elb), Hungarian Karoli (!kar), Indonesian Bahasa Indonesia Sehari-hari (!bis), Indonesian Terjemahan Baru (!tb), Italian La Nouva Diodati (!lnd), Italian La Sacra Bibbia Nuova Riveduta (!nrv),"
2006
putserv "NOTICE $nick :Maori Bible (!maori), Melanesian Pidgin Bible (!mel), Norsk Bible (!norsk), Portuguese A Biblia Sagrada Traduzida em Portugues (!brp), Spanish La Biblia de Las Americas (!lba), Spanish Reina-Valera Actualizada (!rva), Spanish Reina-Valera (!rv), Spanish Sagradas Escrituras (!sev), Spanish Valera NT only (!vnt), Swahili NT (!swahili),"
2007
putserv "NOTICE $nick :Swedish 1917 Bible NT only (!sve), Turkish NT (!turkish), Uma NT (!uma)"
2008
putserv "NOTICE $nick :Original Language Bibles (18): (NB, /'s divide transliterated/non-roman versions)"
2009
putserv "NOTICE $nick :1991 Byzantine/Majority Text (!byz/!grkbyz), Nestle-Aland 26th/27th Ed. (!na26/!grkna26), 1894 Scrivner Textus Receptus (!scrivner/!grkscrivner), 1550 Stephanus Textus Receptus (!stephanus/!grkstephanus), Tischendorf' 8th Ed. GNT (!tisch/!grktisch), 1881 Westcott-Hort GNT (!wh/!grkwh), 1881 Westcott-Hort with NA26 alternate readings (!whnu/!grkwhnu)"
2010
putserv "NOTICE $nick: Nestle-Aland 27th Ed./UBS 4th Ed. (!n27u4), Septuagint/LXX (!lxx/!grklxx), Biblia Hebraica Stuttgartensia in Hebrew font (!bhs), Jerome's Latin Vulgate (!vulg)"
2011
putserv "NOTICE $nick :Non-Roman character Bibles (5):"
2012
putserv "NOTICE $nick :Arabic Bible (!arabic), Russian Synodal Translation (!rst), Ukrainian Bible (!ukrainian), Unaccented Modern Greek Bible (!umgreek), Vietnamese Bible (!viet)"
2014
if {($von==3) && (![matchattr $hand 3]) && (![matchattr $hand o]) && (![isvoice $nick $channel])} {
2018
putserv "NOTICE $nick :Dictionaries & Indices (12):"
2019
putserv "NOTICE $nick :Webster's Dictionary (!dict), Vine's Bible Dictionary(!vines), Easton's Bible Dictionary (!eastons), Nave's Topical Bible (!naves), Smith's Bible Dictionary (!smiths), Hitchcock's Bible Names Dictionary (!hitch), International Standard Bible Dictionary (!isbe), Torrey's New Topical Textbook (!torrey), Strong's Hebrew Bible Dictionary (!strheb), Strong's Greek Bible Dictionary (!strgrk), Brown-Driver-Briggs Hebrew Lexicon (!bdb), Thayer's Greek Lexicon (!thayer)"
2020
putserv "NOTICE $nick :Commentaries (10):"
2021
putserv "NOTICE $nick :Darby's Translation Notes (!dtn), Family Bible Notes (!family), Geneva Bible Translation Notes (!geneva), John Gill's Expositor (!gill), Matthew Henry's Concise (!mhc), The People's New Testament (!pnt), Robertson's Word Pictures (!rwp), The Fourfold Gospel (!tfg), Treasury of Scriptural Knowledge (!tsk), Wesley's Bible Notes (!wesley)"
2024
#----------------------------------------------------------------------
2026
bind pub - !status pub_status
2027
bind msg - status pub_status
2029
proc pub_status {nick uhost hand channel arg} {
2033
putserv "NOTICE $nick :All BibleBot displays are currently off."
2034
} elseif {$von==1} {
2035
putserv "NOTICE $nick :All BibleBot displays are currently on."
2036
} elseif {$von==2} {
2037
putserv "NOTICE $nick :All BibleBot displays are currently on for ops only."
2039
putserv "NOTICE $nick :Verse displays are currently on for all users, but other BibleBot displays are currently restricted to ops and voiced users."
2045
bind pub - !history pub_hist
2046
bind msg - history pub_hist
2048
proc pub_hist {nick uhost hand channel arg} {
2050
catch {exec tail -n 5 /var/log/diatheke.log >& /tmp/fooout.$botnick}
2051
catch {set foofile [open /tmp/fooout.$botnick]}
2052
catch {set fooverse [gets $foofile]}
2053
putserv "NOTICE $nick :Last 5 calls to Diatheke/Tcl BibleBot"
2054
putserv "NOTICE $nick :$fooverse"
2055
while {[gets $foofile fooverse] >= 0} {
2056
putserv "NOTICE $nick :$fooverse"
2058
catch {close $foofile}
2059
exec rm /tmp/fooout.$botnick
2063
#---------------------------------------------------------------------
2065
proc pub_verseon {nick uhost hand channel arg} {
2067
if {![matchattr $hand 3] && ![matchattr $hand o]} {
2069
} elseif {$arg=="v"} {
2071
# putserv "NOTICE $nick :Long Text Display is now on for voiced only!"
2072
} elseif {$arg=="o"} {
2074
# putserv "NOTICE $nick :Verse Display is now on for ops only!"
2077
# putserv "NOTICE $nick :All Display is now on!"
2079
pub_status $nick $uhost $hand $channel $arg
2082
bind pub - !verseon pub_verseon
2083
bind msg - verseon pub_verseon
2085
proc pub_verseoff {nick uhost hand channel arg} {
2088
if {![matchattr $hand 3] && ![matchattr $hand o]} {
2092
# putserv "NOTICE $nick :Verse Display is now off!"
2093
pub_status $nick $uhost $hand $channel $arg
2096
bind pub - !verseoff pub_verseoff
2097
bind msg - verseoff pub_verseoff
2099
proc dcc_verseoff {hand idx arg} {
2102
if {![matchattr $hand 3] && ![matchattr $hand o]} {
2109
bind dcc - verseoff dcc_verseoff
2111
proc dcc_verseon {hand idx arg} {
2113
if {![matchattr $hand 3] && ![matchattr $hand o]} {
2116
elseif {$arg=="v"} {
2119
elseif {$arg=="o"} {
2126
bind dcc - verseon dcc_verseon
2128
#sets default von mode