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QC
P5LKO4U3UCFBXOZEF7HD3UP6LG3HDFEQCCGMWFEPAR7DBY6WJL5QC
F7UEAPOJLX43J32QD6JJ4YABOZLMQR2THHL6BGFTPSYZ35XQJSQAC
MGLPPSPTZYTHV2IW522JPA7MXU56AGFATN7O64GT3VHUIQ6H6W2QC
54PMPT2WRJQAQ2Q7QKTMVEXUO3DJ6RIYZF5KLVF5C63D4BTY4V6AC
G5QWNM5KIWQPIT4MGOC5SBUWEIIVZS67YPIH3U5TUASHASABE2CQC
HIRCSAI6D4EEV57CQCFIOCHXT4FUSABC4J46ER2GQY7IED3P6ZRQC
JY3V7EV6X6EJH2QANLNO3S3YXZMGEW53BCIPFNVXSKZFUBSXHCAAC
I4SAB3ZORIAJOCA3KQIWVXBP4IDK3H7VUUJRTHPNGSPA7XCPJMCAC
TFCCKVFDPARIKHK3RKVLWUPT6M4P3FXD6NMC42U47PKHG2BSEDGQC
NI3B7J2EHGSD7E65SGBLMI4R2YNS2LHI42NM37XEWP32PKBNKXYAC
6FS6YXYMVKOKFGG5ILX2JHHE6MVUBNAY3NAEYRBAJKUEG4AWQPDAC
VNA3XNGJTPVS4FHYKMTFHNB4URFJJJPX27JSDMCS3NXY5F2GPRCQC
QEVWVQCQ5QUTO7UI32IQFEDIXVVGIQ2SLIBEZL6GKXEXMHA6MAZAC
V4U4N77ULT5CQG2AISTFD3B4K73QTWWYXKZ27SXFCBXXYXLM7DBQC
6QHAIQWTBMRUWI4HBEVR2UFNMTN5RKUH4TQIOORRPJUMTLDQW2IQC
27BO62KOXINDBTHZQ5HQPIX22OPPU3HKZSZB7AOQZNJ5FSL572EQC
HTHDQRSJV4WVGIM53GR7JGIRZACMIZDI5UMJ522QFI3ZCX5K56GQC
nick := 'nick $ircnet.nick\n'
print('$host: $nick')
sock.write_string(nick) or {}
user := 'user a b c :full name\n'
sock.write_string(user) or {}
nick_cmd := 'nick $nick\n'
print('$host: $nick_cmd')
sock.write_string(nick_cmd) or {}
user_cmd := 'user a b c :full name\n'
sock.write_string(user_cmd) or {}
pub fn (self &IrcActor) comm(mut ircnet Network) {
mut reader := io.new_buffered_reader(reader: io.make_reader(ircnet.sock))
pub fn (self &IrcActor) comm(mut ircnet Network, mut ghost Ghost) {
mut reader := io.new_buffered_reader(reader: io.make_reader(ghost.sock))
println('irc comm fail $err')
ircnet.hangup()
ircnet.stop = true
println('irc comm fail $ircnet.hostname $ghost.nick $err')
ghost.hangup()
//ircnet.stop = true
println('$self.hostname $cmd')
self.sock.write_string(cmd) or {}
mut ghost := self.ghosts.by_nick(nick) or {
println('irc.join() ghost nick "$nick" not found in ${self.hostname}. (msg was: $cmd)')
return
}
println('$self.hostname $ghost.nick $cmd')
ghost.sock.write_string(cmd) or {}
pub fn (mut self Ghosts) by_nick(nick string) ?Ghost {
for g in self.ghosts {
if g.nick == nick {
return g
}
}
return error('not found')
}
pub fn (mut self Ghost) hangup() {
self.sock.close() or {}
}
pub fn (mut self Ghosts) add(ghost Ghost) {
self.ghosts << ghost
}