; ; (c) Blue Lady , 1999 ; All Rights Reserved. No part of this document can be copied in ; part or in whole without the expressed permission of the author ; in writing. ; ON OUTCHAT { crypt GLOBAL mult GLOBAL incr GLOBAL { 32767 RANDOM crypt = 256 RANDOM 4 * 1 + mult = 16383 RANDOM 2 * 1 + incr = "" CHATSTR = } CHATSTR "start enc" == IF { { ";:" crypt ITOA & ":" & mult ITOA & ":" & incr ITOA & WHOTARGET PRIVATEMSG } { ";:" crypt ITOA & ":" & mult ITOA & ":" & incr ITOA & SAY } WHOTARGET IFELSE "" CHATSTR = } CHATSTR "tune enc" == IF { "$1" GREPSUB LOWERCASE lowchat = lowchat mychat = [ "a" "b" "c" "d" "e" "f" "g" "h" "i" "j" "k" "l" "m" "n" "o" "p" "q" "r" "s" "t" "u" "v" "w" "x" "y" "z"] letarray = letarray LENGTH size = ";-" cryptchat = { "$1" GREPSUB let = "$2" GREPSUB lowchat = { crypt mult * incr + 32768 % crypt = crypt size * 32768 / lcrypt = 0 i = { i++ }{ letarray i GET let == NOT } WHILE i lcrypt + size % i = letarray i GET UPPERCASE clet = cryptchat clet & cryptchat = }{ cryptchat let & cryptchat = } let "[a-z]" GREPSTR IFELSE }{ lowchat "^(.)(.*)$" GREPSTR } WHILE cryptchat SAY WHOCHAT WHONAME ":" & mychat & LOCALMSG "" CHATSTR = } CHATSTR "^enc(.*)$" GREPSTR IF } ON INCHAT { crypt GLOBAL mult GLOBAL incr GLOBAL { "$1" GREPSUB ATOI crypt = "$2" GREPSUB ATOI mult = "$3" GREPSUB ATOI incr = } CHATSTR "^;:([0-9]+):([0-9]+):([0-9]+)$" GREPSTR IF { "$1" GREPSUB upchat = [ "a" "b" "c" "d" "e" "f" "g" "h" "i" "j" "k" "l" "m" "n" "o" "p" "q" "r" "s" "t" "u" "v" "w" "x" "y" "z"] letarray = letarray LENGTH size = "" uncryptchat = { "$1" GREPSUB clet = "$2" GREPSUB upchat = { crypt mult * incr + 32768 % crypt = crypt size * 32768 / lcrypt = 0 i = { i++ }{ letarray i GET LOWERCASE clet == NOT } WHILE i lcrypt - size + size % i = letarray i GET let = uncryptchat let & uncryptchat = }{ uncryptchat clet & uncryptchat = } clet "[A-Z]" GREPSTR IFELSE }{ upchat "^(.)(.*)$" GREPSTR } WHILE WHOCHAT WHONAME ":" & uncryptchat & LOCALMSG } WHOCHAT WHOME != CHATSTR "^;-(.*)$" GREPSTR AND IF }