So far I have this...

on *:TEXT:*:#originalchannel: { if ($nick == somerandomnickname) && ($chan == #originalchannel) { scon -a if ($network == networkname) msg #channeltoechoto $1- } }

But that only echoes from one channel to another. I need it to read data from one channel (timestamp, text, etc), store it in a database, and have it available to be @searched by another channel. How would I do this? (I know nothing about databases!)