File: ScrollZ.doc

package info (click to toggle)
scrollz 2.2.3-2
  • links: PTS
  • area: main
  • in suites: bookworm, bullseye, sid
  • size: 8,392 kB
  • sloc: ansic: 79,473; tcl: 2,866; makefile: 703; sh: 508
file content (747 lines) | stat: -rw-r--r-- 32,335 bytes parent folder | download | duplicates (6)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
181
182
183
184
185
186
187
188
189
190
191
192
193
194
195
196
197
198
199
200
201
202
203
204
205
206
207
208
209
210
211
212
213
214
215
216
217
218
219
220
221
222
223
224
225
226
227
228
229
230
231
232
233
234
235
236
237
238
239
240
241
242
243
244
245
246
247
248
249
250
251
252
253
254
255
256
257
258
259
260
261
262
263
264
265
266
267
268
269
270
271
272
273
274
275
276
277
278
279
280
281
282
283
284
285
286
287
288
289
290
291
292
293
294
295
296
297
298
299
300
301
302
303
304
305
306
307
308
309
310
311
312
313
314
315
316
317
318
319
320
321
322
323
324
325
326
327
328
329
330
331
332
333
334
335
336
337
338
339
340
341
342
343
344
345
346
347
348
349
350
351
352
353
354
355
356
357
358
359
360
361
362
363
364
365
366
367
368
369
370
371
372
373
374
375
376
377
378
379
380
381
382
383
384
385
386
387
388
389
390
391
392
393
394
395
396
397
398
399
400
401
402
403
404
405
406
407
408
409
410
411
412
413
414
415
416
417
418
419
420
421
422
423
424
425
426
427
428
429
430
431
432
433
434
435
436
437
438
439
440
441
442
443
444
445
446
447
448
449
450
451
452
453
454
455
456
457
458
459
460
461
462
463
464
465
466
467
468
469
470
471
472
473
474
475
476
477
478
479
480
481
482
483
484
485
486
487
488
489
490
491
492
493
494
495
496
497
498
499
500
501
502
503
504
505
506
507
508
509
510
511
512
513
514
515
516
517
518
519
520
521
522
523
524
525
526
527
528
529
530
531
532
533
534
535
536
537
538
539
540
541
542
543
544
545
546
547
548
549
550
551
552
553
554
555
556
557
558
559
560
561
562
563
564
565
566
567
568
569
570
571
572
573
574
575
576
577
578
579
580
581
582
583
584
585
586
587
588
589
590
591
592
593
594
595
596
597
598
599
600
601
602
603
604
605
606
607
608
609
610
611
612
613
614
615
616
617
618
619
620
621
622
623
624
625
626
627
628
629
630
631
632
633
634
635
636
637
638
639
640
641
642
643
644
645
646
647
648
649
650
651
652
653
654
655
656
657
658
659
660
661
662
663
664
665
666
667
668
669
670
671
672
673
674
675
676
677
678
679
680
681
682
683
684
685
686
687
688
689
690
691
692
693
694
695
696
697
698
699
700
701
702
703
704
705
706
707
708
709
710
711
712
713
714
715
716
717
718
719
720
721
722
723
724
725
726
727
728
729
730
731
732
733
734
735
736
737
738
739
740
741
742
743
744
745
746
747
  The ScrollZ IRC Client User Guide
  by JustMe_
  Updated by Flier
  $Id: ScrollZ.doc,v 1.11 2002-06-03 16:58:55 f Exp $

  This document describes how to install and use ScrollZ IRC client.
  It is the first document which a new ScrollZ user should read to
  get things started.

  0.  Contents

  1.  Introduction
  1.1.  Legal aspects
  1.2.  Purpose of this document
  1.3.  New versions of this document
  1.4.  Quoting and stuff

  2.  What is ScrollZ anyway ?

  3.  Installing it
  3.1.  Setting up ScrollZ directory
  3.2.  Setting up '~/.scrollzrc'
  3.3.  Coexistence with other IRC clients
  3.4.  Choosing compile time options
  3.5.  Setting up environment variables
  3.6.  Setting up things under Windows

  4.  ScrollZ features
  4.1.  'ScrollZ.save' file
  4.2.  Friends + Shit list
  4.3.  Notify list
  4.4.  Channel protection
  4.5.  Netsplits, nethacks and netjoins
  4.6.  DCC - sending and receiving files, dcc chat
  4.7.  Logging
  4.8.  Other useful hints

  5.  ScrollZ key bindings

  6.  Things not found in ircII
  6.1.  New /set variables
  6.2.  Additional status_format modifiers

  7.  Additional stuff for scripters
  7.1.  $ functions
  7.2.  ON hooks

  8.  Miscellaneous stuff
  8.1.  How to enable DCCs if you are behind a firewall
  8.2.  How to connect via bouncer to multiple IRC networks
  8.3.  How to fix terminal size in screen


  1.  Introduction

  1.1.  Legal aspects

  This document is provided `as is'. I put great effort into writing it as
  accurately as I could, but you use the information contained in it at
  your own risk. In no event shall I be liable for any damages resulting
  from the use of this work.

  1.2.  Purpose of this document

  ScrollZ is an advanced IRC client based on ircII client. It was
  developed on Linux, but can be compiled on variety of Unix platforms.

  This document assumes that you have heard of and know about ScrollZ, and
  now want to sit down and use it. Those of you who don't know what IRC is
  shouldn't be reading this document, really.

  1.3.  New versions of this document

  New versions of the ScrollZ IRC Client User Guide will be periodically
  updated on ScrollZ home pages.

  1.4.  Quoting and stuff

  To make things more understandable I opted to enclose all multi word
  phrases in pairs of '', like 'This is really stupid.'. So if I say one
  has to type 'blah blah', they should really type blah blah without '
  characters. This also avoids confusion when phrase ends with '.' and
  people are desperately trying to type the '.' character as well.

  2.  What is ScrollZ anyway ?

  Basically ScrollZ is ircII client plus it adds a lot of features found
  in all sorts of scripts. You should be aware that the main difference
  between these scripts and ScrollZ is the code - whereas ircII scripts
  take a lot of disk and memory space and run slow, ScrollZ only takes a
  couple of extra kilobytes compared to stock ircII client yet runs
  faster than any ircII script. This was accomplished by using C code
  instead of ircII scripting language. This reduces memory and CPU usage
  and code tends to run way faster. Besides that, scripts also take long
  time to load since most of them are larger than 100k in size.

  Here is a list of most important features :

     * supports colors
     * internal userlist and shitlist
     * a lot of things are stored in memory, so we don't have to contact
       server at all in some cases
     * improved file exchange (based on Sheik's cdcc.c)
     * improved cosmetics (based on TooLie Box by Zakath)
     * improved flood protection
     * adds channel protection
     * comes with user-friendly options like tab key, auto reply and URL
       catcher
     * logs events important to you when you're away (customizable)
     * adds OperVision (optional; coded by Zakath)
     * supports virtual IP

  As I have already said ScrollZ _is_ ircII so everything that can be
  done in ircII can be done in ScrollZ too and all ircII scripts work
  without a problem. NOTE: there is no ICB support nor DCC TALK support
  in ScrollZ so the ircII ICB or DCC TALK related stuff does NOT work!

  3.  Installing it

  3.0.  IMPORTANT

  Read INSTALL.ScrollZ file located in doc subdirectory.

  3.1.  Setting up ScrollZ directory

  By default the first time you run the client it will create directory
  named '~/.ScrollZ' in your home directory together with an empty
  ScrollZ.save file. You can use another directory if you wish so,
  make sure you 'set load_path' in that case. The default mode for
  newly created '~/.ScrollZ' directory is 700 so other users can not
  read your ScrollZ files.
  You should put files like ScrollZ.addon and/or your scripts in there.
  Scripts can be placed in any other directory as well but that will
  require path to script to be supplied in '/load' command.

  3.2.  Setting up '~/.scrollzrc'

  Second thing to do is to create file called '~/.scrollzrc'. You can
  use your favourite editor to create one. It should contain at least
  the following line: 'set load_path ~/.ScrollZ'. In reality one
  doesn't have to set load_path if their ScrollZ dir is ~/.ScrollZ
  because the client itself will do that for them.
  Of course one has to type in another directory if they opted to use
  another directory for ScrollZ stuff in step 3.1. If you want to use
  ScrollZ help files and keep them in directory other than
  /usr/local/share/scrollz/help/ be sure to add something like
  'set help_path /home/user/irc/help/'.

  3.3.  Coexistence with other IRC clients

  ScrollZ will co-exist with other IRC clients such as ircII, Ctoolz
  or BitchX. Main thing how to accomplish this is by keeping each IRC
  client's files in their own directory. And as they can all use their
  own '~/.xxxrc' file users can safely use all of them at the same time.

  3.4.  Choosing compile time options

  I assume the source for your copy of ScrollZ client is one of the
  people from ScrollZ distro team. Now maybe they haven't notified you
  about this, but ScrollZ can be compiled in many ways which either add
  or remove some of the functionality. If you want to customize your
  copy of ScrollZ you will have to persuade your distro person to
  compile it for you. I leave it up to you to think of the way to do
  that ;^). Here's list of compile time options - some of them useful
  some of them not:

     Option       Flag   Description
     ------------------------------------------------------------------

     WANTANSI     A      enables colors
     EXTRAS       E      adds a lot of commands like : autoinv, bki, bkt,
                         dirlmk, dirlnk, dobans, llook, llookup, massdv,
                         massv, modelock, modeunlock, msay and ranlk.
     BETTERTIMER  T      timer accurate to 0.01s (default accuracy is 1s)
     GENX         G      different look of whois
     NEWCSCAN     C      formatted cscan, similar to that of BitchX
     ACID         I      invite on notify for non +i channels
     SORTEDNICKS  N      sorted nicks in cscan
     SCKICKS      S      scatter (funny) kicks
     OPERVISION   OV     for IRC Opers
     CELE         cy     compile with celerity in client
     HYPERDCC     D      compile with HyperDCC (faster DCC) by Annatar
     VILAS        V      no ScrollZ trademarks in kicks and away msgs
     JIMMIE       J      better newhost command
     CTCPPAGE     P      CTCP PAGE for friends by Bighead
     TDF          X      different msgs, chat msgs and CDCC
     COUNTRY      Y      adds $country() function
     OGRE         Z      different OV cosmetics
     OPER         OPER   for IRC Opers

  You can check which options was your copy of ScrollZ compiled with by
  typing '/version' and look for string enclosed in []'s. Scripts can
  check for availability of certain features by examining the value of
  '$J'. Upper case letters mean that option was disable while lower
  case letters denote disabled options.

  3.5.  Setting up environment variables

  ScrollZ is aware of following environment variables:

     * IRCNICK   - sets nick
     * IRCSERVER - sets servers to use
     * IRCHELP   - sets path to ircII help directory
     * IRCLIB    - sets path to irc lib directory
     * IRCUMODE  - sets user mode
     * IRCNAME   - sets gecos (shown in whois)
     * IRCPATH   - much like 'set load_path'
     * IRCHOST   - sets virtual host
     * IRCUSER   - sets username (if your ident allows it)
     * IRCRC     - sets rc file (instead of .scrollzrc)
     * IRCQUICK  - sets quickrc file (instead of .scrollzquick)
     * DCCHOST   - IP address for DCC sends
     * VIRTIP    - sets IP address for client (system wide)
     * HOME      - sets home directory
     * MAIL      - sets mail file
     * TERM      - sets terminal type
     * USER      - sets username (if your ident allows it)

  Usually they can be set in ~/.profile file like this :

     a) for bash, ksh, zsh and sh users :
        IRCNICK="Nick"
        IRCSERVER="irc.server.com:port irc.server.org[:port]"
        ...
        export IRCNICK IRCSERVER

     b) csh and tcsh users :
        setenv IRCNICK "Nick"

  3.6.  Setting up things under Windows

  It is possible to compile and run ScrollZ under Windows using
  excellent CygWin product which is available for free from Cygnus.
  The compile process is exactly the same as under any U*IX platform
  using the configure script (see above for details). Once you
  have compiled the binary, create a directory that will hold
  ScrollZ :

  d:
  cd \
  mkdir ScrollZ

  and copy scrollz.exe to this newly created directory. Optionally
  you can also copy the help directory to this directory.
  Now create a batch file called scrollz.bat that will be used to
  run the client with the following content :

  set HOME=/cygdrive/d/ScrollZ
  set IRCPATH=/cygdrive/d/ScrollZ
  set IRCHELP=/cygdrive/d/ScrollZ/help
  set IRCNICK=myircnick
  set IRCSERVER=irc.server.com:port
  scrollz.exe

  Note that you should replace d in the batch file above with the
  drive letter that holds your ScrollZ directory. Now you should
  be able to run ScrollZ by executing scrollz.bat.

  4.  ScrollZ features

  To start with let me just say I'm not going to explain every possible
  option out there but will rather focus on basic concepts of using it.
  Best way to learn all of its options is (like always) to use it for
  real - that way you will learn all about it. We will only deal with
  ScrollZ commands in this document and little or none attention will be
  payed to regular ircII commands. And remember, '/help' is your friend.

  4.1.  'ScrollZ.save' file

  When you first start ScrollZ you should type '/sve' which will save all
  current options to 'ScrollZ.save' file located in first directory
  found in load_path variable. 'ScrollZ.save' file is a plain text file -
  thus it can be edited with every editor. But you will hardly ever need
  to edit it by hand, most of the settings can be changed via ScrollZ
  commands.

  Here are exceptions to this rule :

     * DEFSERVER    - sets default server (for /S command)
     * DEFSIGNOFF   - sets default sign-off message
     * DEFSETAWAY   - sets default away reason
     * DEFSETBACK   - sets default back reason
     * DEFUSERINFO  - sets default user info reply (CTCP)
     * DEFFINGER    - sets default finger reply (CTCP)
     * DEFK         - sets default kick message
     * DEFBK        - sets default ban-kick message
     * DEFBKI       - sets default ban-kick-ignore message
     * DEFBKT       - sets default ban-kick-time message
     * DEFFK        - sets default filter-kick message
     * DEFLK        - sets default lame-kick message
     * DEFABK       - sets default auto-ban-kick message
     * DEFSK        - sets default scatter-kick message
     * DEFKILL      - sets default kill message

  You can edit 'ScrollZ.save' file in order to change those options. Don't
  forget to do '/reload' after editing file for changes to take effect.

  4.2.  Friends + Shit list

  Why friends list ? Why shit list ? It started when people wanted to
  "keep" control of channels they were hanging in and having friends and
  shit list helped them in a big way. People that are on your friends
  list can benefit from it by being auto-opped, auto-voiced etc. while
  shit list makes sure that those who you hate stay away from your
  channel(s). ScrollZ's user list is channel aware - meaning that user
  can have separate friends list entry for every channel you want.

  Commands that control friends list are :

     addf      - add person to friends list
     addfflag  - add flag to friends' list entry
     addfchan  - add channel to friends' list entry
     frlist    - sets friends list on/off
     listf     - list people on friends list
     remf      - remove person from friends list
     remfflag  - remove flag from friends' list entry
     remfchan  - remove channel from friends' list entry

  Commands that control shit list are :

     addbk     - add person to shit list
     bklist    - sets shit list on/off
     listbk    - list people on shit list
     rembk     - remove person from shit list

  Also be sure to read '/help levels' for more info on flags.

  4.3.  Notify list

  ScrollZ can notify you when certain nicks signs on/off. To select which
  nicks do you want to be notified about use this commands :

     addn      - add person to notify list
     listn     - list people on notify list
     remn      - remove person form notify list
     ntfymode  - toggle brief or verbose mode of '/listn'

  4.4.  Channel protection

  You can make ScrollZ "protect" channel from nasty stuff like mass deop,
  mass kick and the likes with this commands :
     dprot        - sets deop protection on/off
     deops        - sets deop protection sensor
     deopt        - sets deop protection time
     kprot        - sets kick protection on/off
     kicks        - sets kick protection sensor
     kickt        - sets kick protection time
     nprot        - sets nick flood protection on/off
     nicks        - sets nick flood protection sensor
     nickt        - sets nick flood protection time
     kickonflood  - sets kick-on-flood protection on/off
     addw         - add word to word kick list
     listw        - list words on word kick list
     remw         - remove word from word kick list
     idlekick     - kick idle users from a channel
     idletime     - sets idle kick timeout

  4.5.  Netsplits, nethacks and netjoins

  This is one of the features where ScrollZ really excels. It is entirely
  controlled via '/nhprot' command - so '/help nhprot' for more info. If
  you have this option turned on you better make sure your userlist is
  pretty complete (most of regular channel ops should be on it) or else
  you will not be very popular channel op.

  4.6.  DCC - sending and receiving files, dcc chat

  ScrollZ is based on ircII and it has the same command as ircII for
  controlling DCC stuff (that is '/dcc'). But it also features '/cdcc'
  command which is by far more powerful and user friendly. So I suggest
  you to forget about '/dcc' and use only '/cdcc' + '/chat' and '/nochat'.
  Again everything is explained in help, so let me just remind you of
  '/help cdcc get' which will show you examples on how to use that
  fancy filter for selecting dccs. And be careful with '/cdcc autoget'
  being turned on! Oh yeah, some people don't like to see others flooding
  channels with their offer lists - so better set '/cdcc channels' and
  '/cdcc ptime'.

  4.7.  Logging

  Apart from ircII logging ScrollZ has logging on its own too. For more
  info try '/help awaysave'. Normally ScrollZ would log events to
  'ScrollZ.away' only if you're set away - but you can change this with
  '/logon' command. You can set the file to log to by modifying the
  AWAY_FILE variable (example: '/set away_file ~/.away.log').

  4.8.  Other useful hints

  Small things that will make your life with ScrollZ easier are :

     * get used to Tab key - what the hell is that you ask ? Well
       let me show how to use it. Say you want to send a file to 3
       people from your current channel. Go and type
       '/cdcc send file1 file2, n1<Tab> n2<Tab> n3<Tab>'
       where "n1", "n2" and "n3" are first two letters of first, second
       and third nick, respectively. Get it ? It expands the last word
       to nick if it finds a match for first two letters - if more nicks
       start with same prefix simply press Tab few more times. Of course
       you don't need to type first two letters of a nick, it can be any
       number (except 0 of course). You can complete channel names in
       much the same way.

     * Tab key, it acts much like ircII tabkey script - when someone
       sends you a msg his/her nick gets stored into an array and if you
       want to reply to that message just press Tab. ScrollZ will store
       up to 10 nicks for you. WARNING: this behaviour only works if
       your input line is empty!

     * turn auto-completion on ('/autocompl on :' for example) and learn
       how to use it

     * use Ctrl+R key - did you notice different color of nick on public
       messages which had your nick in them ? That's auto reply and
       Ctrl+R cycles through last 5 people's nicks that have triggered
       your auto-reply. You can change your autoreply word with '/repword'
       command. Hint : having '/repword' set to some very common word
       (like "just") will fill your away file with meaningless messages
       (for you) if you have AREPLY in your '/awaysave' setting. So add
       lines like this : 'alias setaway {^repword justme_ ;//setaway}'
       and 'alias setback {//setback ;^repword just,jm}' to
       '~/.scrollzrc'.

     * you hang in more channels and want each one in its own window ?
       Here's little alias to help you :

          alias wc {
             if ([$0]==[]) {
                echo $scrollz_string Usage : /WC [#]channel
             }
             {
                if ([$left(1 $0)]!=[#]) {^assign winchan #$0}
                {^assign winchan $0}
                echo $scrollz_string Creating new window for channel $winchan
                window new bind $winchan
                j $winchan
                window hide
             }
             ^assign -winchan
          }

       You also want channels to be in the same window all the time ? Ok
       add this to your '~/.scrollzrc' file :

          ^on -join_me "#chan1" window swap 1 bind $0
          ^on -join_me "#chan2" window swap 2 bind $0
          ^on -join_me "#chan3" window swap 3 bind $0

       This will bind #chan1 to window 1, #chan2 to window 2 and #chan3
       to window 3.

       You have bot on channel and want to identify to it automatically
       without your intervention ? Add this to '~/.scrollzrc' :

          on -channel_synch "#chan" {
              if ([$ischanop(botnick $0)]==[1] && [$checkuser($uh(botnick) $0)]!=[-1])
              {
                  m botnick identify password
                  m botnick op
              }
          }

       Change botnick to your bot's nick and make sure bot is on your
       friends list (flags don't matter).

     * if you want ScrollZ to automatically join certain channels use
       '/ajoin' command like : '/ajoin auto #chan1,#chan2' - ScrollZ will
       try to join #chan1 and #chan2 every 10 minutes (if you haven't
       already joined those channels of course).

     * if you don't want to be automatically set away after certain
       amount of time elapses without your activity do '/awayt 0'.
       Some channels don't like clients announcing they're away/back
       and you can control that with '/showaway'.

  5.  ScrollZ key bindings

  Most of the key binds are the same as in ircII, here's a list of
  those that aren't :

     * meta5 has been added
     * F1, ..., F12 can be bound like '/bind f1 ..', ..., '/bind F12 ..',
       respectively
     * Tab/Ctrl+I is bound to insert_tabkey_next
     * Ctrl+K is bound to lastjoiner_kick
     * Ctrl+N is bound to accept_last_chat
     * Ctrl+R is bound to insert_autoreply
     * Ctrl+X is bound to switch_channels
     * Ctrl+Z is bound to stop_irc
     * End is bound to scroll_end
     * PageUp is bound to scroll_backward
     * PageDown is bound to scroll_forward
     * CursorUp is bound to backward_history
     * CursorDown is bound to forward_history
     * CursorLeft is bound to backward_character
     * CursorRight is bound to forward_character
     * F1 is bound to 'help keys'
     * F2 is bound to 'join -invite'
     * ^W is bound to META3
     * ^W? is bound to 'help net'
     * ^Wh is bound to 'window hide'
     * ^Wn is bound to 'window next'
     * ^Wp is bound to 'window previous'
     * ^Wk is bound to 'window kill'
     * ^Wl is bound to 'window list'
     * ^Wc is bound to 'window clear'
     * ^Wg is bound to 'window grow 1'
     * ^Wr is bound to 'window shrink 1'
     * ^W1 is bound to 'window goto 1'
     * ^W2 is bound to 'window goto 2'
     * ^W3 is bound to 'window goto 3'
     * ^W4 is bound to 'window goto 4'
     * ^W5 is bound to 'window goto 5'
     * Alt-1 is bound to '^window swap 1'
     * Alt-2 is bound to '^window swap 2'
     * Alt-3 is bound to '^window swap 3'
     * Alt-4 is bound to '^window swap 4'
     * Alt-5 is bound to '^window swap 5'
     * Alt-6 is bound to '^window swap 6'
     * Alt-7 is bound to '^window swap 7'
     * Alt-8 is bound to '^window swap 8'
     * Alt-9 is bound to '^window swap 9'

  Additional bind choices are (together with their default bindings) :

     * insert_autoreply    - Ctrl+R
     * lastjoiner_kick     - Ctrl+K
     * accept_last_chat    - Ctrl+N
     * meta5_character     - read some 10 lines up
     * insert_tabkey_next  - Tab/Ctrl+I
     * insert_tabkey_prev

  6.  Things not found in ircII

  6.1.  New /set variables

  List of variables that can be set via '/set' command and can't be found
  in ircII help (they are ScrollZ specific remember ?) :

     * auto_reconnect      - automatically reconnect to server after
                             disconnect ?
     * away_file           - name of the away file
     * beep_on_mail        - beep when new mail arrives ?
     * dcc_ports           - ports to use for DCC (example: 1500-1505)
     * display_ansi        - display ANSI colors ?
     * high_ascii          - display high ASCII characters ?
     * lastlog_ansi        - log ANSI colors ? ('/lastlog' command)
     * max_modes           - max. number of modes to be sent to server
                             in one mode line
     * max_wallop_nicks    - max. number of nicks to send wall-op msg
                             to in one msg line
     * notify_string       - replaces *** in notify events
     * scrollz_string      - replaces *** from ircII
     * status_channelcount - format for %U in status bar
     * status_uptime       - format for %1 in status bar
     * status_format3      - sets 3rd status bar line (use
                             '/window double 3' to turn it on and
                             '/window double 2' to turn it off)
     * status_userX, X=4-9 - user status variables
     * status_reverse      - if you want to use background colors for
                             status_format turn this off

  6.2.  Additional status_format modifiers

     * %1   - client's uptime
     * %2   - lag (in seconds)
     * %3   - person that last joined one of the channels you're on
     * %4   - number of packs created with '/cdcc offer'
     * %5   - number of dcc sends
     * %6   - number of dcc gets
     * %7   - status of '/cdcc autoget', A=on, a=off
     * %8   - status of '/cdcc security', S=on, s=off
     * %9   - current channel's topic
     * %A   - use '/set status_away' to format it, %A will be replaced
              with number of msgs and auto-reply msgs recorded since
              you've been set away
     * %D   - status of '/frlist' for current channel, F=on, f=off
     * %E   - status of '/nhprot', N=on, n=off, q=quiet, m=medium, f=full
     * %J   - dcc status, '/cdcc status on' to enable it
     * %L   - status of '/ctcpcloak', K=on, k=off, H=hide
     * %P   - status of '/floodp', P=on, p=off, M=max
     * %U   - use '/set status_channelcount' to format it, %O is repla-
              ced with number of chan ops on current channel, %N with
              number of non-ops and %T with total number of users
     * %!0 - status_user
     * %!1 - status_user1
       ...    ...
     * %!9 - status_user9

  7.  Additional stuff for scripters

  7.1.  $ functions

  General functions :

     * J          - ScrollZ version
     * Y          - Toolie version (if compiled with Toolie)
     * stripansi  - stripansi(text), strips ANSI codes from test
     * topic      - topic(#chan), returns nick, time when topic was set
                    and topic for chan, empty on error
     * sar        - sar(command/search/replace/data)
                    command=empty or
                    r (meaning data is variable, don't add leading $)
                    g (replace all occurrences)
     * color      - color(color1,color2,...) returns ANSI color string
                    which represents color1,color2,... list. Recognizes
                    this colors : off,bold,underline,flash,reverse,black,
                    red,green,yellow,blue,purple,cyan,white,blackbg,redbg,
                    greenbg,yellowbg,bluebg,purplebg,cyanbg,whitebg
     * country    - country(2_letter_code) returns country name,
                    unknown on error, only if compiled with COUNTRY
     * chanusers  - like ircII but extended with second argument, if that
                    argument is set to 1 channel operators will have @ in
                    front of their nick and voiced users will have +
     * szvar      - query ScrollZ settings (all not controllable by /set),
                    example: '/eval echo $szvar(nhprot)'
     * topic      - return channel's topic, who set it and when they did it
     * url        - return URL from internally cached list of URLs,
                    if number is given return given URL number
     * cdccslots  - return number of free Cdcc slots
     * cdccqslots - return number of free Cdcc queue slots

  File operations :

     * open       - open(filename R|W|A), returns file handle, -1 on error
     * close      - close(filehandle)
     * read       - read(filehandle), returns -1 on error
     * write      - write(filehandle text), returns number of bytes
                    written, -1 on error
     * eof        - eof(filehandle), returns 1 on eof else 0, -1 on error
     * fsize      - fsize(filename), returns file size, -1 on error (use
                    it to check if file exists)
     * rename     - rename(oldfile newfile), returns 0 if OK, -1 on error

  Friends and shit list functions :

     * uh         - uh(nick #chan), returns n!u@h for nick, -1 on error
     * checkuser  - checkuser(n!u@h #chan), returns flags, filter and
                    channel of matching friends list entry, -1 on error
     * checkshit  - checkshit(n!u@h #chan), same as $checkuser()
     * isvoiced   - like ischanop(nick #chan)
     * uhost      - uhost(n!u@h) returns u@h part, empty otherwise
     * hhost      - hhost(n!u@h) returns h part, empty otherwise

  String functions :

     * strstr     - search for a substring in given string, example:
                    $strstr(/hello john/ john)
     * strlen     - returns string length
     * strnum     - returns number of words in given string
     * sar        - search and replace data, $sar(command/search/replace/data)
                    command = r - treat data as a variable name and
                                  return the replaced data to the variable
                              g - Replace all instances, not just the first one

  7.2.  ON hooks

     * cdcc_plist         - activated for every entry from the offer list
     * cdcc_plist_footer  - activated when offer list is to be sent out
     * cdcc_plist_header  - activated at the end of the offer list
     * channel_synch      - activated when channel is synched
     * channel_wallop     - activated when message is sent to channel operators
     * dcc_list           - activated for every entry from the DCC list
     * dcc_list_footer    - activated when DCC list is to be printed
     * dcc_list_header    - activated at the end of the DCC list
     * join_me            - activated when you join a channel
     * notify_signoff_uh  - activated upon notify signoff and we have userhost
     * notify_signon_uh   - activated when we have userhost for notify entry
     * send_ctcp          - activated when CTCP is sent

  8.  Miscellaneous stuff

  8.1.  How to enable DCCs if you are behind a firewall

  This is dependant on your firewall of course. Example will be given for
  Linux 2.4.x kernels using iptables. Nevertheless the aproach is generic
  enough so it can be applied to other types of firewalls. Note that we
  don't use the ip_conntrack_irc kernel feature!
  In the example ports 50000 to 50010 will be allowed for the DCC. Whenever
  we say <router_ip> we mean the IP address that is visible on the Internet.
  Whenever we say <internal_ip> we mean the IP address that is visible on the
  LAN (they could be the same if you are not using NAT or IP masquerading).

  1. We have to allow packets to ports 50000-50010:
     iptables -I INPUT -p tcp -s 0/0 --dport 50000:50010 -j ACCEPT

     If your firewall configuration is more sophisticated (NAT or IP
     masquerading) you have to redirect incoming packets on ports 50000-50010
     to the internal_ip ports 50000-50010 (we assume the incoming packets
     on Ethernet interface eth1):
     iptables -t nat -A PREROUTING -i eth1 -p tcp --dport 50000:50010 \
              -j REDIRECT --to <internal_ip>

  2. Tell the client to announce the router's IP address in the DCC requests:
     for ksh, sh, zsh, bash:
       DCCHOST="<router_ip>"
       export DCCHOST
     for csh, tcsh:
       setenv DCCHOST "<router_ip>"

  3. We tell the client to only use ports 50000-50010 for the DCC stuff:
     /set dcc_ports 50000-50010 (or 50000:50010)

  8.2.  How to connect via bouncer to multiple IRC networks

  Suppose you have a shell account where you run IRC bouncer (a better name
  would be IRC proxy I guess) and connect to multiple IRC networks via it
  from your home machine. The problem is you can't connect to more than one
  IRC network from within the same client (it is an ircII limitation where
  you can't connect twice to the same server:port combination). You can work
  around this limitation, however. Here is what you have to do (on Linux
  at least, should work also on Solaris and HP-UX):

  1. The IRC bouncer is running on shell.domain.com

  2. Edit /etc/hosts on your home machine and add the following entries:
     shell_ip<tab>efnet.domain.com
     shell_ip<tab>ircnet.domain.com
     shell_ip<tab>undernet.domain.com
     Insert the IP address of your shell in place of shell_ip. Where it
     says <tab> press TAB key. Change efnet/ircnet/undernet to whatever
     you prefer.

  3. Edit /etc/nsswitch.conf on your home machine and make sure the
     entry for hosts looks like this:
     hosts: files dns

  4. Run ScrollZ and do /server efnet.domain.com:bouncer_port
     Additionally do /net ircnet.domain.com:bouncer_port

     Now it works fine - you can connect through IRC bouncer to more than
     one IRC network from within the same client.

  8.3.  How to fix terminal size in screen

  If you are attaching to a screen session in a terminal whose size is
  different from the terminal size when you detached screen, client
  might be confused about the terminal size. Here is how to fix it:
  
  1. Identify the terminal device client is using (ps -ef | grep scrollz)

  2. stty -F /path/to/terminal/device cols X rows Y
     where /path/to/terminal/device is the full path to the terminal
     device your client is running on, X is number of columns and Y
     is number of rows (example: stty -F /dev/pts0 cols 80 rows 38)

  The above works at least on Linux, for other platforms you might
  have to read the manual page for stty command.