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65JJ66LRPESFTQC
PFFQRHQZGLDR4CWTTUKFHZL6FRGZ4GDVWTNQ5HDYJWO5MADM56FAC
7Z5EWGH3SP3BGTOSHOSUSE5Y2GIA43UOZIGIET7BFBZXD74UKC7QC
M5GXUK5HZE7HPLWQ33T73CXRJITOUJAO6T6F6QWTYYL7NLWFYA3AC
JHTVUO5OKWCV3Z6GBXQKCKIX5GQDYLPT2SD7IDHSUN7E55J4FWDQC
HIRCSAI6D4EEV57CQCFIOCHXT4FUSABC4J46ER2GQY7IED3P6ZRQC
SOYUNL6WNABEAMMK6VHSVI3CWAFM6QKDT43PHZSTV23MVUBC5Z4QC
TYKD7O2U4SKKDP63IJE3ZFWI6MPZ3GPCTS5TS2C2V7277RVMWQWAC
526F5RML2DYJ6Y5R3A6FD5QKQ57NYONRBJMOXGR4WVEF6I6IAEHAC
OX7BGYKT3DK7UIZH7HF64WSWHI2675QRDMRKIBREHNMXJ3JI4LNQC
HJ6IJQTBJ5XJYKCMAS2ZPEAY2CC545PWXK4XTSW3SW4V3AJYQKHQC
HPHPKEZHX555ZCS64C4PJ6XMKYUIUHV5Y3IYXTLFZ5CMLFB2XPKQC
BIWQWRTPVNCRRDNYWFTDP3TGL2ER6U3ESUYPRUADATHZ4N2F5YJQC
K4DRWAY72CGDTYJ52KGZFEZDO5HHXOYRIYR5L2SHXXUF3BPNOWTAC
TUK5KSJMKMYUSGOQJEIUIV7FJHM6473GFPC26NX6LQXUHGTLX5DAC
TFCCKVFDPARIKHK3RKVLWUPT6M4P3FXD6NMC42U47PKHG2BSEDGQC
I4SAB3ZORIAJOCA3KQIWVXBP4IDK3H7VUUJRTHPNGSPA7XCPJMCAC
P5VPAF54HPN2KJACMZ2VGODJRFAKYBSKPN6Y7WYIWNVMGA72IETQC
VSXY63RCAE4WDARTVOW6YDD6VPMRBNASRD73R4UMZDAAQX7MAVTAC
}
'matrix' {
mut help_screen := false
if parts.len > 1 {
help_screen = self.command_bridge(system, network, room_id, parts)
} else {
help_screen = true
}
if help_screen {
self.chat.say(system, '', network, room_id, '!matrix <status | join | leave>')
}
}
'irc' {
if parts.len > 1 {
self.command_irc(system, name, network, room_id, parts)
} else {
self.chat.say(system, '', network, room_id, '!irc <add | list | delete | connect | join | part>')
}
}
'bridge' {
mut help_screen := false
if parts.len > 1 {
help_screen = self.command_bridge(system, network, room_id, parts)
} else {
help_screen = true
}
if help_screen {
self.chat.say(system, '', network, room_id, '!bridge <add | list | del>')
}
}
else {
self.chat.say(system, '', network, room_id, 'unknown command ${parts[0]}. try !help')
}
}
}
fn (mut self Main) status_report(system chat.System, network string, room string) {
mut msg := '$self.matrix.host is $self.matrix.conn_state in $self.matrix.joined_rooms.len() rooms. $self.irc.networks.networks.len irc networks connected.'
self.chat.say(system, '', network, room, msg)
}
fn (mut self Main) matrix_status(system chat.System, network string, room string) {
mut msg := '$self.matrix.host is $self.matrix.conn_state in $self.matrix.joined_rooms.len() rooms. '
self.chat.say(system, '', network, room, msg)
for r in self.matrix.joined_rooms.rooms {
self.chat.say(system, '', network, room, 'matrix: room $r')
}
}
fn (mut self Main) command_matrix(system chat.System, network string, room_id string, parts []string) bool {
cmd := parts[1]
match cmd {
'status' {
self.matrix_status(system, network, room_id)
}
}
'irc' {
if parts.len > 1 {
self.command_irc(system, name, network, room_id, parts)
} else {
self.chat.say(system, '', network, room_id, '!irc <add | list | delete | connect | join | part>')
}
}
'bridge' {
mut help_screen := false
if parts.len > 1 {
help_screen = self.command_bridge(system, network, room_id, parts)
} else {
help_screen = true
}
if help_screen {
self.chat.say(system, '', network, room_id, '!bridge <add | list | del>')
fn (mut self Main) status_report(system chat.System, network string, room string) {
mut msg := '$self.matrix.host is $self.matrix.conn_state in $self.matrix.joined_rooms.len() rooms. $self.irc.networks.networks.len irc networks connected.'
self.chat.say(system, '', network, room, msg)
for r in self.matrix.joined_rooms.rooms {
self.chat.say(system, '', network, room, 'matrix: room $r')
}
}