if (word(2 $loadinfo()) != [pf]) { load -pf $word(1 $loadinfo()); return; }; # Copyright (c) 2004 BlackJac@EFNet # # Version: 1.0.2004.06.04.1 # # This script will allow you to look up the definition of a word # from dict.org. package define; alias define (word, void) { if (@word) { ^on ^dcc_raw "% dict.org E 2628" #; if (:connect = connect(dict.org 2628)) { ^on ^dcc_raw "$connect dict.org C" { @ define.word = []; fe (150 151 220 221 250 552) dd { ^on dcc_raw -"$0 dict.org D $dd *"; }; ^on dcc_raw -"$0 dict.org C"; }; ^on ^dcc_raw "$connect dict.org D 150 *" { xecho -b -c $before(-1 "$chr(13)" $4-); }; ^on ^dcc_raw "$connect dict.org D 151 *" { xecho -b -c $before(-1 "$chr(13)" $4-); ^on ^dcc_raw "$0 dict.org D *" { xecho -b -c $before(-1 "$chr(13)" $3-); }; ^on ^dcc_raw "$0 dict.org D .*" { xecho -b -c; ^on dcc_raw -"$0 dict.org D *"; ^on dcc_raw -"$0 dict.org D .*"; }; }; ^on ^dcc_raw "$connect dict.org D 220 *" #; ^on ^dcc_raw "$connect dict.org D 221 *" #; ^on ^dcc_raw "$connect dict.org D 250 *" { msg =$0 quit; }; ^on ^dcc_raw "$connect dict.org D 552 *" { xecho -b -c Unknown word: $define.word; msg =$0 quit; }; @ define.word = word; msg =$connect define * $word; }; ^on ^dcc_raw -"% dict.org E 2628"; } else { xecho -b -c /define ; }; };