your tests
if ($chan == #.pre) {
if ($nick == pRemature) {
have to change.
youll see in the sample function it says:
; $1 = event type (input,text,query,notice,action,join,topic,part,kick,quit,nick,mode)
; $2 = target ($chan)
; $3 = speaker ($nick)
; $4 = is $true if text was encrypted or $false if plaintext
; $5- = decrypted text
so your initial tests should be like
if ($2== #.pre) {
if ($3== pRemature) {