[sword-cvs] sword/apps/console/diatheke/tcl biblebot-diatheke.tcl,1.2,1.3
sword@www.crosswire.org
sword@www.crosswire.org
Wed, 29 Oct 2003 22:03:43 -0700
Update of /usr/local/cvsroot/sword/apps/console/diatheke/tcl
In directory www:/tmp/cvs-serv14885
Modified Files:
biblebot-diatheke.tcl
Log Message:
update to biblebot script to work with current diatheke commandline syntax
Index: biblebot-diatheke.tcl
===================================================================
RCS file: /usr/local/cvsroot/sword/apps/console/diatheke/tcl/biblebot-diatheke.tcl,v
retrieving revision 1.2
retrieving revision 1.3
diff -u -d -r1.2 -r1.3
--- biblebot-diatheke.tcl 1 Apr 2001 02:37:48 -0000 1.2
+++ biblebot-diatheke.tcl 30 Oct 2003 05:03:41 -0000 1.3
@@ -1,7 +1,7 @@
# Diatheke/Tcl 3.0 by Chris Little <chrislit@gotjesus.org>
# Based on code schema of <cking@acy.digex.net>
-# Copyright 1999, 2000, 2001 by Chris Little
+# Copyright 1999 by Chris Little
# Licensed under GNU General Public License (GPL)
# see accompanying LICENSE file for license details
@@ -29,7 +29,7 @@
# More commands will appear to you depending upon which mode the bot is
# in and whether you are an op on the bot or voiced in the channel.
-set diaver 3.0
+set diaver 4.0
#modify this to reflect actual location of diatheke and dict binaries
set diatheke "/usr/bin/diatheke"
@@ -52,7 +52,7 @@
set vlookup [string trimleft $vlookup "@"]
set vlookup [string trimleft $vlookup "#"]
- catch {exec $diatheke $arg $bibver "$vlookup" 5 >& /tmp/fooout.$botnick}
+ catch {exec $diatheke -f plaintext -o $arg -b $bibver -k "$vlookup" >& /tmp/fooout.$botnick}
catch {set foofile [open /tmp/fooout.$botnick]}
while {[gets $foofile fooverse] >= 0} {
set len [string length $fooverse]
@@ -157,6 +157,14 @@
pub_lookup $nick $uhost $hand $channel $arg
}
+bind pub - !akjv setver_akjv
+
+proc setver_akjv {nick uhost hand channel arg} {
+ global botnick chan bibver
+ set bibver AKJV
+ pub_lookup $nick $uhost $hand $channel $arg
+}
+
bind pub - !bbe setver_bbe
proc setver_bbe {nick uhost hand channel arg} {
@@ -1625,7 +1633,7 @@
proc publookupdict {vlookup} {
global botnick chan bibver diatheke
- catch {exec $diatheke -d $bibver "$vlookup" >& /tmp/fooout.$botnick}
+ catch {exec $diatheke -f plaintext -b $bibver -k "$vlookup" >& /tmp/fooout.$botnick}
catch {set foofile [open /tmp/fooout.$botnick]}
while {[gets $foofile fooverse] >= 0} {
@@ -2105,5 +2113,19 @@
bind dcc - verseon dcc_verseon
#sets default von mode
-set von 3
+set von 1
+
+
+
+
+
+
+
+
+
+
+
+
+
+