### in-irc.tcl  -*- Tcl -*-
## Animate IRC access for the Internet walkthrough.

### Ivan Shmakov, 2020

## To the extent possible under law, the author(s) have dedicated
## all copyright and related and neighboring rights to this software
## to the public domain worldwide.  This software is distributed
## without any warranty.

## You should have received a copy of the CC0 Public Domain Dedication
## along with this software.  If not, see
## <http://creativecommons.org/publicdomain/zero/1.0/>.

### Code:

package require aniputs
package require anisamp

namespace eval anima::ti::in-irc {
alias kbd   ani_kbd   ev
alias samp  ani_samp  ev
}

proc anima::segment::in-irc::animate { varn { pre-samp 0 } { pre-kbd 2500 } } {
    upvar $varn ev
    if { ${pre-samp} >= 0 } { samp {[ivan@fable] ~$ } ${pre-samp} }

    kbd "rlwrap -- sic -h irc.am-1.org -n iv4n- \n" \
        ${pre-kbd}
    samp {wata.am-1.org: 05/11/20 09:17 >< 001 (iv4n-): Welcome to the Internet Relay Network iv4n-!~iv4n-@7af2ad8c.host.hidden.invalid
wata.am-1.org: 05/11/20 09:17 >< 002 (iv4n-): Your host is wata.am-1.org, running version ngircd-25 (x86_64/pc/linux-gnu)
wata.am-1.org: 05/11/20 09:17 >< 003 (iv4n-): This server has been started Fri May 08 2020 at 01:25:52 (UTC)
wata.am-1.org: 05/11/20 09:17 >< 004 (iv4n- wata.am-1.org ngircd-25 abBcCFiIoqrRswx abehiIklmMnoOPqQrRstvVz): 
wata.am-1.org: 05/11/20 09:17 >< 005 (iv4n- RFC2812 IRCD=ngIRCd CHARSET=UTF-8 CASEMAPPING=ascii PREFIX=(qaohv)~&@%+ CHANTYPES=#&+ CHANMODES=beI,k,l,imMnOPQRstVz CHANLIMIT=#&+): 48 :are supported on this server
wata.am-1.org: 05/11/20 09:17 >< 005 (iv4n- CHANNELLEN=50 NICKLEN=9 TOPICLEN=490 AWAYLEN=127 KICKLEN=400 MODES=5 MAXLIST=beI): 50 EXCEPTS=e INVEX=I PENALTY :are supported on this server
}
    samp {wata.am-1.org: 05/11/20 09:17 >< 251 (iv4n-): There are 4 users and 0 services on 2 servers
wata.am-1.org: 05/11/20 09:17 >< 254 (iv4n- 6): channels formed
wata.am-1.org: 05/11/20 09:17 >< 255 (iv4n-): I have 2 users, 0 services and 1 servers
wata.am-1.org: 05/11/20 09:17 >< 265 (iv4n- 2 3): Current local users: 2, Max: 3
wata.am-1.org: 05/11/20 09:17 >< 266 (iv4n- 4 6): Current global users: 4, Max: 6
wata.am-1.org: 05/11/20 09:17 >< 250 (iv4n-): Highest connection count: 4 (12 connections received)
} 127 223
    samp {wata.am-1.org: 05/11/20 09:17 >< 375 (iv4n-): - wata.am-1.org message of the day
wata.am-1.org: 05/11/20 09:17 >< 372 (iv4n-): - Please take a look at the channel list and join as needed.
wata.am-1.org: 05/11/20 09:17 >< 376 (iv4n-): End of MOTD command
wata.am-1.org: 05/11/20 09:17 >< 396 (iv4n- 7af2ad8c.host.hidden.invalid): is your displayed hostname now
} 127 223

    kbd ":j #test \n"
    samp {iv4n-       : 05/11/20 09:17 >< JOIN (): #test
wata.am-1.org: 05/11/20 09:17 >< 332 (iv4n- #test): An unassuming testing channel
wata.am-1.org: 05/11/20 09:17 >< 333 (iv4n- #test -Server- 1588901152): 
wata.am-1.org: 05/11/20 09:17 >< 353 (iv4n- = #test): iv4n- iv4n3 iv4n ivan
wata.am-1.org: 05/11/20 09:17 >< 366 (iv4n- #test): End of NAMES list
}

    kbd "IRC test.\n"
    samp "#test       : 05/11/20 09:17 <iv4n-> IRC test.\n"
    samp "#test       : 05/11/20 09:17 <ivan> Passed.\n" 1023 2047

    kbd ":quit \n"
    samp {wata.am-1.org: 05/11/20 09:17 >< NOTICE (iv4n-): Connection statistics: client 0.1 kb, server 1.8 kb.
irc.am-1.org: 05/11/20 09:17 >< ERROR (): Closing connection
sic: remote host closed connection
[ivan@fable] ~$ }

    kbd "sic -h irc.freenode.net -n iv4n- \n"
    samp {niven.freenode.net: 05/11/20 09:25 >< NOTICE (*): *** Looking up your hostname...
niven.freenode.net: 05/11/20 09:25 >< NOTICE (*): *** Checking Ident
niven.freenode.net: 05/11/20 09:25 >< NOTICE (*): *** Couldn't look up your hostname
niven.freenode.net: 05/11/20 09:25 >< NOTICE (*): *** No Ident response
niven.freenode.net: 05/11/20 09:25 >< 001 (iv4n-): Welcome to the freenode Internet Relay Chat Network iv4n-
niven.freenode.net: 05/11/20 09:25 >< 002 (iv4n-): Your host is niven.freenode.net[2a01:7e00::f03c:91ff:fee2:413b/6667], running version ircd-seven-1.1.9
niven.freenode.net: 05/11/20 09:25 >< 003 (iv4n-): This server was created Fri Apr 3 2020 at 16:33:02 UTC
niven.freenode.net: 05/11/20 09:25 >< 004 (iv4n- niven.freenode.net ircd-seven-1.1.9 DOQRSZaghilopsuwz CFILMPQSbcefgijklmnopqrstuvz bkloveqjfI): 
}
    samp {niven.freenode.net: 05/11/20 09:25 >< 005 (iv4n- CHANTYPES=# EXCEPTS INVEX CHANMODES=eIbq,k,flj,CFLMPQScgimnprstuz CHANLIMIT=#): 120 PREFIX=(ov)@+ MAXLIST=bqeI:100 MODES=4 NETWORK=freenode STATUSMSG=@+ CALLERID=g CASEMAPPING=rfc1459 :are supported by this server
niven.freenode.net: 05/11/20 09:25 >< 005 (iv4n- CHARSET=ascii NICKLEN=16 CHANNELLEN=50 TOPICLEN=390 DEAF=D FNC TARGMAX=NAMES): 1,LIST:1,KICK:1,WHOIS:1,PRIVMSG:4,NOTICE:4,ACCEPT:,MONITOR: EXTBAN=$,ajrxz CLIENTVER=3.0 SAFELIST ELIST=CTU CPRIVMSG :are supported by this server
niven.freenode.net: 05/11/20 09:25 >< 005 (iv4n- CNOTICE WHOX ETRACE KNOCK MONITOR=100): are supported by this server
} 127 223
    samp {niven.freenode.net: 05/11/20 09:25 >< 251 (iv4n-): There are 96 users and 82498 invisible on 30 servers
niven.freenode.net: 05/11/20 09:25 >< 252 (iv4n- 37): IRC Operators online
niven.freenode.net: 05/11/20 09:25 >< 254 (iv4n- 44421): channels formed
niven.freenode.net: 05/11/20 09:25 >< 255 (iv4n-): I have 4205 clients and 1 servers
} 127 223
    samp {niven.freenode.net: 05/11/20 09:25 >< 265 (iv4n- 4205 6096): Current local users 4205, max 6096
niven.freenode.net: 05/11/20 09:25 >< 266 (iv4n- 82594 89000): Current global users 82594, max 89000
niven.freenode.net: 05/11/20 09:25 >< 250 (iv4n-): Highest connection count: 6097 (6096 clients) (171538 connections received)
} 127 223
    samp {niven.freenode.net: 05/11/20 09:25 >< 375 (iv4n-): - niven.freenode.net Message of the Day - 
niven.freenode.net: 05/11/20 09:25 >< 372 (iv4n-): - Welcome to niven.freenode.net in London, United Kingdom, EU.
niven.freenode.net: 05/11/20 09:25 >< 372 (iv4n-): - thanks to Linode for sponsoring this server!
niven.freenode.net: 05/11/20 09:25 >< 372 (iv4n-): -  
} 127 223
    samp  [ string cat {niven.freenode.net: 05/11/20 09:25 >< 372 (iv4n-): - NIVEN, LAWRENCE VAN COTT [1938-].  Architect of Known Space,
niven.freenode.net: 05/11/20 09:25 >< 372 (iv4n-): - the setting of } \037 {Protector} \037 {, } \037 {World of Ptaavs} \037 { and the
niven.freenode.net: 05/11/20 09:25 >< 372 (iv4n-): - } \037 {Ringworld} \037 { series.  Author of "Flash Crowd", a canonical
niven.freenode.net: 05/11/20 09:25 >< 372 (iv4n-): - sociological hard science fiction short story dealing with
niven.freenode.net: 05/11/20 09:25 >< 372 (iv4n-): - effects of near instantaneous transportation on a modern
niven.freenode.net: 05/11/20 09:25 >< 372 (iv4n-): - technological society.  In addition, he is well known for his
niven.freenode.net: 05/11/20 09:25 >< 372 (iv4n-): - collaborations with Jerry Pournelle, including } \037 {The Mote in} \037 {
niven.freenode.net: 05/11/20 09:25 >< 372 (iv4n-): - } \037 {God's Eye} \037 { and } \037 {Lucifer's Hammer} \037 {.
niven.freenode.net: 05/11/20 09:25 >< 372 (iv4n-): -  
} ] 127 223
    samp {niven.freenode.net: 05/11/20 09:25 >< 372 (iv4n-): - Welcome to freenode - supporting the free and open source
niven.freenode.net: 05/11/20 09:25 >< 372 (iv4n-): - software communities since 1998.
niven.freenode.net: 05/11/20 09:25 >< 372 (iv4n-): -  
niven.freenode.net: 05/11/20 09:25 >< 372 (iv4n-): - By connecting to freenode you indicate that you have read and
niven.freenode.net: 05/11/20 09:25 >< 372 (iv4n-): - accept our policies and guidelines as set out on https://freenode.net
niven.freenode.net: 05/11/20 09:25 >< 372 (iv4n-): -  
} 127 223
    samp {niven.freenode.net: 05/11/20 09:25 >< 372 (iv4n-): - In the event that you observe behaviour that contravenes our policies,
niven.freenode.net: 05/11/20 09:25 >< 372 (iv4n-): - please notify a volunteer staff member via private message, or send us an
niven.freenode.net: 05/11/20 09:25 >< 372 (iv4n-): - e-mail to complaints@freenode.net -- we will do our best to address the
niven.freenode.net: 05/11/20 09:25 >< 372 (iv4n-): - situation within a reasonable period of time, and we may request further
niven.freenode.net: 05/11/20 09:25 >< 372 (iv4n-): - information or, as appropriate, involve other parties such as channel operators 
niven.freenode.net: 05/11/20 09:25 >< 372 (iv4n-): - Group Contacts representing an on-topic group.
niven.freenode.net: 05/11/20 09:25 >< 372 (iv4n-): -  
} 127 223
    samp {niven.freenode.net: 05/11/20 09:25 >< 372 (iv4n-): - freenode runs an open proxy scanner.
niven.freenode.net: 05/11/20 09:25 >< 372 (iv4n-): -  
niven.freenode.net: 05/11/20 09:25 >< 372 (iv4n-): - If you are looking for assistance, you may be able to find a list of 
niven.freenode.net: 05/11/20 09:25 >< 372 (iv4n-): - volunteer staff on '/stats p' (shows only on-call staff) or by joining 
niven.freenode.net: 05/11/20 09:25 >< 372 (iv4n-): - #freenode and using the '/who freenode/staff/*' command. You may message
niven.freenode.net: 05/11/20 09:25 >< 372 (iv4n-): - any of us at any time. Please note that freenode predominantly provides 
niven.freenode.net: 05/11/20 09:25 >< 372 (iv4n-): - assistance via private message, and while we have a network channel the 
niven.freenode.net: 05/11/20 09:25 >< 372 (iv4n-): - primary venue for support requests is via private message to a member 
niven.freenode.net: 05/11/20 09:25 >< 372 (iv4n-): - of the volunteer staff team.
niven.freenode.net: 05/11/20 09:25 >< 372 (iv4n-): -  
} 127 223
    samp {niven.freenode.net: 05/11/20 09:25 >< 372 (iv4n-): - From time to time, volunteer staff may send server-wide notices relating to
niven.freenode.net: 05/11/20 09:25 >< 372 (iv4n-): - the project, or the communities that we host. The majority of such notices
niven.freenode.net: 05/11/20 09:25 >< 372 (iv4n-): - will be sent as wallops, and you can '/mode <yournick> +w' to ensure that you
niven.freenode.net: 05/11/20 09:25 >< 372 (iv4n-): - do not miss them. Important messages relating to the freenode project, including
niven.freenode.net: 05/11/20 09:25 >< 372 (iv4n-): - notices of upcoming maintenance and other scheduled downtime will be issued as
niven.freenode.net: 05/11/20 09:25 >< 372 (iv4n-): - global notices.
niven.freenode.net: 05/11/20 09:25 >< 372 (iv4n-): -  
} 127 223
    samp {niven.freenode.net: 05/11/20 09:25 >< 372 (iv4n-): - Representing an on-topic project? Don't forget to register, more information
niven.freenode.net: 05/11/20 09:25 >< 372 (iv4n-): - can be found on the https://freenode.net website under "Group Registration".
niven.freenode.net: 05/11/20 09:25 >< 372 (iv4n-): -  
niven.freenode.net: 05/11/20 09:25 >< 372 (iv4n-): - Thank you also to our server sponsors for the sustained support in keeping the
niven.freenode.net: 05/11/20 09:25 >< 372 (iv4n-): - network going for close to two decades.
niven.freenode.net: 05/11/20 09:25 >< 372 (iv4n-): -  
} 127 223
    samp {niven.freenode.net: 05/11/20 09:25 >< 372 (iv4n-): - Thank you for using freenode!
niven.freenode.net: 05/11/20 09:25 >< 376 (iv4n-): End of /MOTD command.
iv4n-       : 05/11/20 09:25 >< MODE (iv4n-): +i
} 127 223

    kbd ":j ##rytvitok \n"
    samp {iv4n-       : 05/11/20 09:25 >< JOIN (##rytvitok): 
niven.freenode.net: 05/11/20 09:25 >< 353 (iv4n- @ ##rytvitok): iv4n- @iv4nshm4k0v
niven.freenode.net: 05/11/20 09:25 >< 366 (iv4n- ##rytvitok): End of /NAMES list.
}

    kbd "Can you see me?\n"
    samp "##rytvitok  : 05/11/20 09:25 <iv4n-> Can you see me?\n"
    samp "##rytvitok  : 05/11/20 09:25 <iv4nshm4k0v> iv4n-: See you well and clear.\n" 1023 2047

    kbd ":quit \n"
    samp {iv4n-       : 05/11/20 09:25 >< QUIT (): Client Quit
irc.freenode.net: 05/11/20 09:25 >< ERROR (): Closing Link: 2a00:1098:86:49:0:e:7743:6df3 (Client Quit)
sic: remote host closed connection
[ivan@fable] ~$ }
}

### in-irc.tcl ends here
