/* * nickcomp.irc - Nick completion script for EPIC4 * Author: Brian Weiss - 2002 * Last modified: 3/15/02 * * This script uses serial number 0 for all /on hooks. * * Most of this was taken from the nick completion module that shade wrote * for my BitchX/EPIC4 script called playdough. He deserves most of the * credit. Please send bug reports to me, not shade. -bmw */ assign NICK_COMPLETION 1 assign NICK_COMPLETION_CHAR : assign FORMAT.NICK_COMPLETION $1: $2- alias nickcomp.fparse { eval return $(FORMAT.$0) } alias nickcomp.getnick { for patt in (%$0% ?$0? %$0 ?$0 $0% $0? $0) { @ :findnick = pattern($patt $onchannel($C)) @ function_return = findnick ? word(0 $findnick) : function_return } } on ^input "%: *" { if (NICK_COMPLETION) { @ :complete = nickcomp.getnick($before($NICK_COMPLETION_CHAR $*)) sendline ${complete ? nickcomp.fparse(NICK_COMPLETION $complete $1-) : [$*]} } } /* EOF */