V4U4N77ULT5CQG2AISTFD3B4K73QTWWYXKZ27SXFCBXXYXLM7DBQC
WGVL3HYM553WLJHVUDVDNAWEDU5V6EOJEJBJHKLJS3AE4DT3TNMAC
SX4IAP27IQ7B5QFX74GKQYRX4IJSJTZ4CLH7EPFSJWATV7LVXR4AC
S4P2B3FPF57HPHTIAYGMPCVKB7573IB5ZBKNXVBTB6ICCPF55WNQC
HXFMZ33TZUVH43HSHN2QEBFDW6APDJLFG7BNWS7AYVOPZBARUV7QC
7MLJEICDGSP5GMTO7MRQY5SFBLEROD6LDGKBTGHSIHJVB42ZXVMAC
52V3VDLQROV2ZXTH3G4A2RPHF26QLZQ2TNUWLYMZRELTWG75QIIQC
XKBAYE546KBYGPXQFVIVWLVAOR6GSJALEGRLWFSHA5LRUFKJCDTQC
PINF75DC62JTH3UI7B5VP6HWO32BMXKNCL3T6ZCESPK7VAN5COCQC
DB2BCHT5GXNQ3JXQXWMDFNXIO7OVEQMVY34SHTAWSJS47N67YTIQC
7IFR3FZPYNBA6DIRU7M6KGCHZ4BQXFBZZEQ47JC6FVOWPZOS4JDAC
FMITFZMDZ5E5DL7RX5KPFGWFQUUTEDHR36UYB6IVELFL6G7P2QYQC
outmsg := <-self.chat.out or { println('listen_out err: $err') }
match outmsg.system {
.irc {
ircnet_name := if outmsg.network.len == 0 {
if self.irc.networks.len > 0 { self.irc.networks[0].hostname } else { 'noname' }
} else {
outmsg.network
}
self.irc.say(ircnet_name, outmsg.room, outmsg.message)
select {
outmsg := <-self.chat.out {
//println('listen_out err: $err')
self.process_out(outmsg)
}
> 60 * time.minute {}
}
}
}
fn (mut self Main) process_out(outmsg chat.Say) {
match outmsg.system {
.irc {
ircnet_name := if outmsg.network.len == 0 {
if self.irc.networks.len > 0 { self.irc.networks[0].hostname } else { 'noname' }
} else {
outmsg.network
.matrix {
if room := self.matrix.joined_rooms.find_room_by_id(outmsg.room) {
if self.matrix.owner == outmsg.name {
self.matrix.room_say(room, outmsg.message)
} else {
self.matrix.room_say_as(outmsg.name, room, outmsg.message)
}
self.irc.say(ircnet_name, outmsg.room, outmsg.message)
}
.matrix {
if room := self.matrix.joined_rooms.find_room_by_id(outmsg.room) {
if self.matrix.owner == outmsg.name {
self.matrix.room_say(room, outmsg.message)