EKAWOQMSNHBPSJAPHNJP2PB2BZ2R4SLIIGGBKTDIH7JXNU2C3L6AC
FE6YM42COAICKV6DZQWEMADK7IN4HX4TERULK5SAEXAKSWG5UXJAC
RGGSMUQMZO3GU3OYM6F5ZHYNFBFFIBV5LPY3MGXEJF5I2GR4FV4QC
OF3H5VU2V3YWNALAFGB5AVZBDCKDBSU5VJUGTOCCCKTQ3ZJVIWYQC
H73SZ4LP4TNY6A2F3O3BYDXGUOQ2EEHQ5XZIXZZDE4YARDQ453KAC
3IOKATFCBG7RT6BNZ2NBTUR244VWLGSNIJKQNOUPSMX7IPSSEJPQC
ILPZ4NIWVCPZ472RFFSF2WRKAN7SJX423437NSTP6BPSMUDVMT5QC
L6LAQCM6M5FOTEJYJRNSW2WO3CVOFLZEWL6HGLGJ6TDKRIPSQTIAC
S4P2B3FPF57HPHTIAYGMPCVKB7573IB5ZBKNXVBTB6ICCPF55WNQC
VVDBK2J2KWWVMQO4SSBVJ4KRRHVF3S6ABO62L625Z3X37MPJ2GFQC
2TXTOSB5OT424A3WGGQIDLXMZJVXDJHHK4P7JWWJSW2NCPRSF4BAC
fn test_is_ctcp() {
ircm := setup()
if _ := ircm.is_ctcp('hi') {
assert false
} else {
assert true
}
if word := ircm.is_ctcp('\1ACTION hop\1') {
assert word == 'ACTION hop'
} else {
assert false
}
fn test_capabilities_decode() {
cap := capabilities_decode('KEY=VALUE')
assert cap['KEY'] == 'VALUE'
capabilities := parts[2].split(' ')
for cap in capabilities {
cap_parts := cap.split('=')
if cap_parts.len == 2 {
println('$server_name cap ${cap_parts[0]} is ${cap_parts[1]}')
if cap_parts[0] == 'NETWORK' {
println('$ircnet.hostname was $ircnet.name set to ${cap_parts[1]}')
ircnet.name = cap_parts[1]
}
}
capabilities := capabilities_decode(parts[2])
if netname := capabilities['NETWORK'] {
println('$ircnet.hostname was $ircnet.name set to $netname')
ircnet.name = netname