BitchX

De Troulite
Aller à : Navigation, rechercher

Sommaire

Notations utilisées dans cet article :

Description Exemple
commande IRC /msg
texte à taper JohnDo
commande shell echo
touche clavier (F1)
nom de fichier .bitchxrc


Introduction

BitchX est un client IRC console élitiste : puissant et absolument pas user-friendly. On trouve très peu de documentation sur Internet, la plupart des tutos se limitant à l'installer, le lancer, joindre un channel et changer de nickname.

Mais Troulite >> Internet ! Donc je mets ici un peu tout ce qui traine dans différentes notes que j'ai gardé sur BitchX.


Hypothèses

  • Vous savez installer BitchX
  • Vous connaissez pas trop mal IRC (accessoirement vous avez déjà vu un client normal genre mIRC ou xchat)
  • Vous êtes geek, ascendant vi



Synopsis

BitchX  [-aAbdfqxvBFRZP] [-H hostname] [-c channel] [-p port] [-r file]
      [-n nickname] [-l file] [-L file] [nickname] [server list]

Typiquement :

BitchX Xavier_OM efnet.xs4all.nl

Notes

  • Utiliser le nom d'un réseau (par exemple : efnet) à la place d'un nom de serveur (par exemple : irc.servercentral.net) ne fonctionne pas. Inutile de taper quelque chose du genre :
BitchX Xavier_OM efnet
  • Pour plus d'informations :
man BitchX


Configuration

Les fichiers

Toutes les commandes vues ici sont importantes pour la configuration du client, car BitchX se configure un peu comme vim :

  • dans vim on peut taper :set blabla ou écrire set blabla dans le .vimrc.
  • dans BitchX on peut taper /cmd blabla ou écrire ^cmd blabla dans le .bitchxrc

Voici l'arborescence des fichiers de configurations :

~
|- .bitchxrc
|- .BitchX/
|    |- BitchX.formats
|    |- BitchX.sav
|    `- screens/
`- .ircservers

~/.BitchX/

Créé automatiquement lors du premier lancement de BitchX.

~/.BitchX/BitchX.format

Créé automatiquement lors de la première utilisation de /save.

~/.BitchX/BitchX.sav

Si vous faites des modifications dynamiques de votre client, avec un certain nombre de commandes telles que /set, /cset, /toggle et autres, vous pouvez faire

/save 

pour sauvegarder en dur ces modifications dans ~/.BitchX/BitchX.sav. Vous les retrouverez donc au prochain chargement de BitchX.

Créé automatiquement lors de la première utilisation de /save.

~/.BitchX/screens

Créé automatiquement lors de la première utilisation de /save.

~/.bitchxrc

Par contre les aliases ne sont pas sauvegardés, il faudra les ajouter manuellement dans votre .bitchxrc

~/.ircservers

BitchX n'a pas de liste de serveurs IRC pré-enregistrés (pas user-friendly on vous a dit !), si vous voulez en créer une vous pouvez, dans votre ~, faire un fichier .ircservers remplis de

server:port:password:nick

(seul server est obligatoire là-dedans) Vous pouvez organiser tout cela par catégories, par exemple :

[Efnet]
irc.homelien.no
irc.easynews.com
[Openprojects]
irc.openprojects.net

Et avec un

/set server_groups on

BitchX bouclera au sein d'un même groupe en cas d'échec de connexion à un serveur.

Les variables d'environnements

BitchX est sensible aux variables d'environnements systèmes suivantes :

  • USER
  • HOME

et aux variables perso suivantes :

  • IRCSERVERS="server:port server2:port2 server3:port3"
  • IRCNICK="nickname"
  • IRCNAME="hi, I'm no longer too lame to read BitchX.doc!"
  • IRC_HOST="virtual hostname here"

Fonctionnement de base de BitchX

De base tout se passe dans la même fenêtre (le même "buffer" si on veut). Les messages du serveur, les différents chan que vous rejoindrez, les discussions privées, TOUT.

La preuve en image :

BitchX.png

Vous étiez prévenu... pas user-friendly !

Bon ok sur cette image c'est un cas un peu extrême, on enchaîne tout très vite : message public, message privé, message serveur, message évènement (le join d'un type), infos d'un channel (users avec leur statut), et l'interface en bas qui résume qui et où on est.

En réalité c'est beaucoup plus clair quand on a un gros bloc de discussion publique sur un chan, et quelques échanges privés. De toute façon en configurant on peut splitter la fenêtre et/ou créer de nouvelles fenêtres, alors pas de panique !

Savoir lire la status bar

A droite vous avez un résumé des options ON ou off.

  • MAJUSCULE pour ON
  • minuscule pour off
[U:a:S:b:h] 

se lit :

  • U = userlist
  • a = autoop
  • S = shitlist
  • b = bitch
  • h = hacking

Quand vous joignez un chan, vous voyez :

[O/35 N/128 I/4 V/0 F/0]

ce qui se lit :

  • O = nombre d'ops
  • N = nombre de !ops
  • I = nombre d'IRCops (l33t !)
  • V = nombre de voiced
  • F = nombre de vos amis

présents sur le chan.

Tout cela sera plus clair quand vous aurez lu la suite de cette doc.

Les commandes IRC classiques

  • pour se connecter à un serveur : /server serveur.kituetout.fi
  • pour lister tous les channels d'un serveur : /list
  • pour rejoindre un channel : /join #channel
  • pour mettre un topic : /topic #channel Comme c'est nul ici !
  • pour parler en privé : /msg John48 Les nicknames avec numéro c'est la loose tu sais (^^)'
  • pour parler à la troisième personne : /me va se barrer.
  • pour partir : /part #chan De toute façon jvous ai jamais aimé !
  • ...

bref la routine.

Il y a les raccourcis classiques : pas besoin de préciser le chan si c'est le chan courant, /j pour /join ...

Comment lister les users présents sur un chan

De base vous n'avez pas la liste des users affichés en permanence (ca pourra se configurer). Sous la main vous avez :

  • la liste des users qui apparaît quand on join
  • /scan affichage simple (équivalent du ls), identique à celle du join
  • /user plus complet (équivalent du ls -l)
  • /who encore plus complet
  • (F2) affiche les opérateurs
  • (F3) affiche les !opérateurs

Kicker, bannir

  • pour kicker : /kick user raison et si vous n'avez pas de raison valable, BitchX vous en trouvera une.
  • pour bannir : /ban user

Mais aussi :

  • /mk : mass kick sur tous les membres du chan
  • /mb : mass ban
  • /md : mass deop
  • /bk <nick> [reason] : Deop, ban et kick <nick> pour [reason]
  • /bki <nick> [reason] : la même mais avec un ignore en plus
  • /kb <nick> [reason] : Deop, kick et ban <nick> pour [reason]
  • /kbi <nick> [reason] : la même mais avec un ignore en plus
  • /lk [reason] : kick tous les !op
  • /fk <nick!user@hostname>[reason] : traque les clients qui matchent <nick!user@hostname> et les kick
  • /fuck <nick> [reason] : Deop, ban et kick <nick>, puis ajoute <nick> à votre shitlist, au niveau 3 (cf shitlist, plus bas)
  • /fuckem : Ban tout, de *!*a*@* à *!*z*@*

Encore ? Cf plus bas, la liste des commandes.

Conversations privées

Pour parler en privé à joe :

/msg joe blablabla

Si quelqu'un vous parle en privé, cela apparait dans la fenêtre unique (cf. image). A ce moment là, une simple pression sur tab complètera automatiquement votre prompt par

/msg joe

vu que joe est le dernier user qui vous ait parlé.

Si vous entamez une longue discussion, tab devient saoûlant. Vous pouvez faire

/query joe

pour switcher sur joe, et tout ce que vous taperez sera alors envoyé par défaut à joe.

/query

sans aucun argument annule ceci. Au passage

/msg #chan joe m'agresse en privée

vous permet de causer sur le chan sans désactiver/réactiver le truc des /query. Par contre /query est très con, si joe change de nickname vous causerez alors à "no such nickname".


Multichannels

(Ctrl)-(x) switch le channel courant, ce qui vous permet facilement de sélectionner le chan sur lequel vous voulez parler.


Autojoin

/ajoin #channel
/save

/unajoin #channel
/save


DCC

Pour définir le répertoire de download :

/set dcc_dldir /path/to/dir

Pour activer l'autoget et ne plus avoir à confirmer manuellement tous les dcc receive (pratique !):

/toggle dcc_autoget

Pour limiter la taille des dcc receive automatiques (hé ho pas fou) :

/set dcc_max_autoget_size 2000000

Ici à 2Mo donc.

Pour automatiquement renommer les fichiers downloadés ayant le même nom qu'un fichier déjà présent :

/set dcc_autorename on

Pour activer le resume des dcc :

/set dcc_autoresume ON

Pour limiter le nombre de dcc get simultanés :

/set dcc_get_limit 42

0 pour no limit

Pour forcer le port dcc :

/set dcc_force_port port_num

Pour mettre votre ip internet dans le dcc si vous êtes planqué derrière une passerelle (et que donc vous avez une ip locale) :

/set dcc_use_gateway_addr YES

Pour tout le reste :

/set dcc



Fonctionnement avancé

Les timers

Pour définir un timer :

/timer [-del #] [-ref #] [-rep #] <delay> <command>

Pour supprimer un timer :

/timer -del <refnum>

Pour lister les timers :

/timer

Pour faire boucler un timer :

/timer -rep -1 <delay> <command>

Exemple : "/msg joe BOOUH" toutes les 10 secondes

/timer -rep -1 10 /msg joe BOOUH


Les listes

La userlist : vos amis

La userlist vous permet d'automatiser certaines actions sur certains utilisateurs. Par exemple vous pouvez dire à BitchX d'opper automatiquement vos amis quand ils rejoignent votre chan.

Synopsis (/bhelp adduser) :

/adduser [-ppp] Jnick #chan [userlevel] [auto-op] [protection] [password]

Cela ajoute dans votre userlist "nick" (ou nick!user@hostname si vous êtes précis) du chan #chan (* pour tous les channels) avec les levels [userlevel], [auto-op], [protection]

De plus vous pouvez faire /adduser -ppp si "nick" a une ip dynamique (ppp comme point to point protocol).

Pour retirer un user :

/unuser nick #channel

La liste des userlevels disponibles (/bhelp userlevels) :

  • BAN - Bans offender who bans a protected user
  • BOT - Creates a bot entry in userlist(/addbot replacement)
  • DCC - Allows a users dcc to auto-get regardless of whether /set dcc_autoget is Off or On
  • DEOP - Deops offender who deops a protected user
  • FLOOD - AllowS Flood checking to be turned off on a user
  • FRIEND - Combination of: VOICE,OPS,UNBAN,INVITE
  • I_OPS - Allows a user to be instantly opped upon joining a channel they are protected in (NOT RECOMMENDED)
  • INVITE - Allows a user to invite themself to a channel your in via CTCP
  • KICK - Kicks offender who bans/kicks protected user
  • MASTER - Combination of: VOICE,OPS,BAN,UNBAN,INVITE,DCC,FLOOD
  • OPS - Allows a user to be opped via CTCP/deleyed ops
  • OWNER - Combination of: MASTER,KILL,DIE,BOT
  • PBAN - When a user is banned from a channel they are protected on, they are automatically un-banned
  • PINVITE - When a user is kicked from a channel they are protected on, they are automatically re-invited back
  • REOP - When a user is deopped from a channel they are protected on, they are automatically re-opped
  • UNBAN - Allows a user to remotely unban his/herself via CTCP
  • VOICE - Auto-voice on join

Pour activer la userlist :

/set userlist on
/cset userlist on

Note : pour activer l'autoop (dangereux !) il faudra faire :

/set aop on
/cset  aop on

La shitlist : vos ennemis

Ajouter un user à la shitlist :

/addshit <nick|nick!user@hostname> <channel|*> [shitlevel] [reason]

Lister les users :

/shitlist

Enlever un user :

/unshit <nick> <channel>

La liste des shitlist levels :

  • 1 - Deop user at all times
  • 2 - Kick user when they join the channel
  • 3 - Ban/Kick user when they join the channel
  • 4 - Ban user at all times
  • 5 - Perm ignore ALL from user

Les autres listes

  • lame nicklist : les nicks que vous ne pouvez pas supporter seront bannis à vue
  • wordlist : la liste des mots qui vous insupportent et qui déclencheront un kick automatique
  • nofloodlist
  • ...

Les toggles (ou flags, ou interrupteurs)

Si vous tapez

/toggle

vous verrez tous les toggles, avec leur statut on ou off.

/toggle PLOP

passe PLOP de off à on (et vice versaaaaaa)

Exemple : un peu de sécurité !

Vous êtes dans les bas quartiers d'IRC et vous vous apprêtez à rentrer dans une tav.. un chan louche. Appuyez sur

(del)

pour utiliser votre compétence "CTCP Cloaking" : ça y est, votre BitchX ne répond plus aux /ctcp version et autres interrogations (on ne parle pas aux étrangers !)


Plusieurs fenêtres

Toutes les commandes commencent par /window. De plus

/window help 

est votre ami.

Que peut-on faire dans une window ? Rejoindre un autre serveur, un autre chan, parler à un user en privé (je rappelle que vous n'avez pas besoin d'être sur le même chan que joe pour faire un /query joe, juste d'être sur le même serveur)

Créer une nouvelle fenêtre :

/window new double on hide
  • new : nouvelle
  • double on : le même prompt de 2 lignes en bas
  • hide : elle est fullscreen et planquée derrière
  • pas hide : split horizontal

Créer une fenêtre spécialement pour aller sur un autre serveur :

  • pour créer : /window server efnet.xs4all.nl
  • pour quitter : /window discon

En effet si on crée une fenêtre vide et qu'on tape /server efnet.xs4all.nl, on va changer de serveur courant... et si on tape /quit....

Changer de fenêtre courante :

  • /window next (et /window prev)
  • (Ctrl)-(w) (n) (pour next)
  • (Alt)-(2) (et (Alt)-(3), et (Alt)-(4)...)

Supprimer une fenêtre :

  • /window kill
  • (Ctrl)-(w) (k)

Cacher la fenêtre (si vous êtes en split)

  • /window hide
  • (Ctrl)-(w) (h)

Lister :

  • /window list
  • (Ctrl)-(w) (l)


Bonne nouvelle pour A.K., on peut faire des aliases :

/alias wnq window new double on;query $0;window hide

vous permet de faire  :

/wnq joe 

pour commencer une discussion privée avec joe dans une fenêtre à part. Cf plus bas pour les aliases


Pour créer une nouvelle fenêtre dès qu'on joint un channel, on peut mettre dans le .bitchxrc :

set join_new_window on
set join_new_window_type new hide swap last double on  


Les window levels

Par défaut on reçoit les messages privés et les messages du serveur dans la fenêtre courante. Et quand Undernet vous raconte sa vie, qu'il a pas le moral, qu'il va splitter, ben ca peut bien pourrir votre affichage.

/window level public

et la fenêtre courante ne recevra plus que ce qui se dit publiquement sur le channel où vous êtes. Mais il vous faut une autre fenêtre avec un level moins restrictif pour recevoir quand même vos messages privés et autres, sans quoi BitchX décidera de vous pourrir l'affichage quand même, ne sachant pas où balancer sa merde.

Voilà la liste des levels, mais attention au principe d'incertitude de BitchXstein !!! (cf plus bas) Cette liste contient des doublons, j'ai fais un sort | uniq mais les commentaires sont parfois différents, je ferai le ménage / la synthèse après (ou pas)

  • ACTIONS  : CTCP actions sent to you. (/ctcp [user] action command)
  • ACTIONS (/me type actions)
  • BEEP  : ?? (Should be beeps, but doesn't seem to work?)
  • BEEP (Any text with ^G BEEP character)
  • CRAP  : Random crap, like errors when switching channels and stuff.
  • CRAP (anything that doesn't fix in other levels, like whois, who, etc)
  • CTCP  : CTCP requests from other persons (/ctcp command)
  • CTCP (CTCP messages, ie: ping, version, etc)
  • DCC  : DCC information (/dcc command)
  • DCC (DCC messages)
  • DEBUG (Internal Debug messages, when /set debug 1)
  • HELP  : Bitchx help information (/help, /bhelp, /window help commands.Not /ehelp)
  • HELP (Any type of help messages)
  • INVITES  : Recieved invites to channels. (/invite command)
  • INVITES (Invitations to other channels)
  • JOIN  : ?? (joins on channels, but doesn't seem to work)
  • JOIN (Channel joins)
  • KICK  : ?? (kicks on a channel (perhaps by other users only), but doesn't seem to work)
  • KICK (Channel kicks)
  • KICKUSER  : ?? (kicks on a channel (perhaps by other users only), but doesn't seem to work)
  • KICKUSER (Kick messages)
  • KILL  : ?? (server kills, but doesn't seem to work?)
  • KILL (Kill messages)
  • MODECHAN  : Changes in channel modes done by other users. If you change a mode yourself, it will still be shown.
  • MODECHAN (Channel mode changes)
  • MODEUSER  : Changes in user modes done by other users. If you change a mode yourself, it will still be shown.
  • MODEUSER (User mode changes)
  • MSGS  : All private messages which are sent to you. (/msg command)
  • MSGS (/msg type messages)
  • NOTES  : ?? Notes you have recieved. Notes are not in common use anymore. (/note command)
  • NOTES (????)
  • NOTICES  : All notices send to you (/notice command)
  • NOTICES (/notice type messages)
  • NOTIFY  : Notices which you send and which are sent to you (/notice command)
  • NOTIFY (Notify messages, ie: user is online, etc)
  • OPNOTES  : ??
  • OPNOTES (IRCop Notifications)
  • PARTS  : ?? (Parts on a channel, but doesn't seem to work)
  • PARTS (Channel parts)
  • PUBLIC  : Everything said publically on a channel. (/me amonst other commands)
  • PUBLIC (Public channel messages)
  • SEND_MSG  : ?? (messages you sent out, but doesn't seem to work?)
  • SEND_MSG (Sent /msg's to other users)
  • SNOTES  : ??
  • SNOTES (Server Notices)
  • TCL  : ?? (tcl scripting errors/debugging?)
  • TCL (Messages from the TCL subsystem)
  • TOPIC  : ?? (topic changes on channels, but doesn't seem to work)
  • TOPIC (Topic messages)
  • USERLOG1  : ??
  • USERLOG1,2,3,4 or 5 (???)
  • USERLOG2  : ??
  • USERLOG3  : ??
  • USERLOG4  : ??
  • USERLOG5  : ??
  • WALLOPS  : All wallop messages from IRC operators (NOT channel operators). (/wallops command)
  • WALLOPS (Channel WALLOP messages)
  • WALLS  : All wall messages from channel operators (/wall, /wallmsg commands)
  • WALLS (IRCop /wallop messages)
  • ALL  : All of the above levels.
  • NONE  : None of the above levels.


Principe d'incertitude de BitchXstein : il y a des trucs dans BitchX qui sont illogiques, incohérents, bordéliques, codés comme si c'était Nymuo le responsable.

Les level en font partie. Exemple de ce qui peut ou pas se passer :

  • première fenêtre : level ALL
  • seconde fenêtre : level PUBLIC

La merde apparaît encore sur la seconde fenêtre. F34R !

Attacher/Détacher BitchX sans screen

screen c'est mieux, mais bon...

  • pour détacher : /detach
  • pour rattacher depuis la console : scr-bx

Les sessions sont dans ~/.BitchX/screen/

Customiser son BitchX

Les alias

  • définir un alias : /alias wnq window new double on;query $0;window hide
  • lister les aliases : /alias
  • supprimer un alias : /alias -wnq

$0 dans cet alias correspond au premier argument.

Le key binding

Quand vous appuyez sur (Entrée), ce que vous avez tapé est envoyé sur le chan. C'est parce que la touche Entrée est mappée sur la fonction SEND_LINE.

On peut définir des binding pour tout et n'importe quoi dans BitchX

Lister les binding :

/bind

Attention c'est super long ! Ce qu'on peut faire pour simplifier c'est tout balancer dans un fichier ;

/win logfile ~/bindings
/win log on
/bind
/win log off

Afficher un binding :

/bind  ^A
Output : * ^A is bound to BEGINNING_OF_LINE

Définir un binding :

/bind <key>  <function> [<string>]
Exemple : /bind  ^A BEGINNING_OF_LINE

Reverse binding :

/rbind  BEGINNING_OF_LINE
Output:        * ^A is bound to BEGINNING_OF_LINE
Output:        * META32-~ is bound to BEGINNING_OF_LINE


La liste complète des fonctions qu'on peut binder

AUTOREPLY	types the nick of the last person to msg you
AUTOREPLY_BACK	(commented out; a no-op)
BACKSPACE	delete left one charater in the input buffer
BACKWARD_CHARACTER	move left one charater in the input buffer
BACKWARD_HISTORY	replace the input buffer with the previous string from your input history
BACKWARD_WORD	move left to a space
BEGINNING_OF_LINE	move left to the start of the line
BLINK	insert the blink attribute (control-F)
BOLD	insert BOLD (control-b) to toggle bold on/off
CDCC_PLIST	display the offerlist to current channel
CHANNEL_CHOPS	shows ops on the current channel (see USER)
CHANNEL_NONOPS	shows non-ops on the current channel (see USER)
CHANGE_TO_SPLIT	switch server to one on the other side of a netsplit
CHELP	print the help index
CLEAR_SCREEN	clear the current window
COMMAND_COMPLETION	attempts to complete the current command based on what you've typed so far, so /cle might expand to /CLEAR for example
CPU_SAVER	who knows?
DCC_PLIST	show active DCC transfer status
DCC_STATS	show accumulated DCC transfer stats
DELETE_CHARACTER	delete under the cursor
DELETE_NEXT_WORD	delete word forward
DELETE_PREVIOUS_WORD	delete word backward
DELETE_TO_PREVIOUS_SPACE	delete bigword backward
END_OF_LINE	move to the end of input line
ENTER_DIGRAPH	enter an 8-bit character I think
ERASE_LINE	clear the whole input line
ERASE_TO_BEG_OF_LINE	delete to the start of the line
ERASE_TO_END_OF_LINE	delete to the end of the line
FORWARD_CHARACTER	move forward one character
FORWARD_HISTORY	replace the input line with the next item from your history
FORWARD_WORD	move forward one word
HIGHLIGHT_OFF	insert the highlight off character (control-o) that cancels all highlight modes (bold, underline, flash)
IGNORE_NICK	inserts a command /ig <nick>, where <nick> is the last nick to send you a message. Press return if you want to keep the command, or delete it as if you had typed it by mistake...
JOIN_LAST_INVITE	join the channel to which you were most revently /INVITEd
META1_CHARACTER	
META2_CHARACTER	
META3_CHARACTER	
META4_CHARACTER	
META5_CHARACTER	
META6_CHARACTER	
META7_CHARACTER	
META8_CHARACTER	
META9_CHARACTER	
META10_CHARACTER	
META11_CHARACTER	
META12_CHARACTER	
META13_CHARACTER	
META14_CHARACTER	
META15_CHARACTER	
META16_CHARACTER	
META17_CHARACTER	
META18_CHARACTER	
META19_CHARACTER	
META20_CHARACTER	
META21_CHARACTER	
META22_CHARACTER	
META23_CHARACTER	
META24_CHARACTER	
META25_CHARACTER	
META26_CHARACTER	
META27_CHARACTER	
META28_CHARACTER	
META29_CHARACTER	
META30_CHARACTER	
META31_CHARACTER	
META32_CHARACTER	
META33_CHARACTER	
META34_CHARACTER	
META35_CHARACTER	
META36_CHARACTER	
META37_CHARACTER	
META38_CHARACTER	
META39_CHARACTER	
NEW_BEGINNING_OF_LINE	same as beginning_of_line but also sets the internal extended_handled variable.
NEW_SCROLL_BACKWARD	scroll the window half a screen backwards
NEW_SCROLL_END	scroll to the end (the most recent part) of the current window
NEW_SCROLL_FORWARD	scroll half a page down towards the end of the current window
NEXT_WINDOW	move to the next window
NICK_COMPLETION	the nick completion character
NOTHING	key bound to this are silently ignored
PARSE_COMMAND	not sure what this does
PREVIOUS_WINDOW	cycle through windows
QUIT_IRC	leave BitchX without any prompt or warning
QUOTE_CHARACTER	the next character you type is inserted literally
REFRESH_INPUTLINE	redraw the input buffer
REFRESH_SCREEN	refresh the entire screen
REVERSE	insert the reverse video command character (contreol-v)
SCROLL_BACKWARD	scroll the window half a screen backwards
SCROLL_END	scroll to the ens of the window"
SCROLL_FORWARD	scroll forwards half a screen in the current window
SCROLL_START	scroll to the start of the scrollback buffer in the current window
SELF_INSERT	insert the key typed
SEND_LINE	return: do the line!
SHOVE_TO_HISTORY	save the current line in the history
STOP_IRC	suspend BitchX (use fg to get it back; STOP_IRC is not always available
SWAP_LAST_WINDOW	swap the current window with the last hidden one in the list
SWAP_NEXT_WINDOW	swap the current window with the next hidden one
SWAP_PREVIOUS_WINDOW	swap the current window with the next hidden one
SWITCH_CHANNELS	talk to another channel in the same window
TAB_MSG	inserts /msg nick at the start of the buffer< based on people who have messaged you recently
TAB_MSG_BACK	autoreply
TOGGLE_CLOAK	ctcp cloaking on or off; this will give a message like CTCP Cloaking is now [Off] when you press the key (Delete on the arrowpad by default). With CTCP cloacking on, people don't get replies from you for ctcp requests like ping, version and finger.
TOGGLE_INSERT_MODE	witch between insert and overtype mode
TOGGLE_STOP_SCREEN	stop scrolling I think"
TRANSPOSE_CHARACTERS	swap the character under the cursor with the one to its left
TYPE_TEXT	in a script, this makes text appear in the input buffer. In input, it's already there, so you don't see anything.
UNCLEAR_TEXT	undoes the effect of clear!
UNDERLINE	inserts control-_, the underline start/stop character
UNSTOP_ALL_WINDOWS	resume scrolling everywehre
WHOLEFT	show who was disconnected by a netsplit in all your current channels
WINDOW_BALANCE	make the split screen windows be equally sized
WINDOW_GROW_ONE	make the current window larger
WINDOW_HELP	show the window help index
WINDOW_HIDE	hide the current window; text will continue to accumulate in the hidden window with no indication that it's there.
WINDOW_KILL	close (kill) the current window; does not part any channels.
WINDOW_LIST	list your windows
WINDOW_MOVE	swap this window with some other one
WINDOW_SHRINK_ONE	make the current window smaller
WINDOW_SWAP_1	
WINDOW_SWAP_2	
WINDOW_SWAP_3	
WINDOW_SWAP_4	
WINDOW_SWAP_5	
WINDOW_SWAP_6	
WINDOW_SWAP_7	
WINDOW_SWAP_8	
WINDOW_SWAP_9	
WINDOW_SWAP_10	
YANK_FROM_CUTBUFFER	insert the last text you deleted

Les bindings par défaut

(de BitchX 1.75p2)

Les touches non listées sont bindées sur SELF_INSERT

Les séquences de touches non listées sont bindées sur NOTHING

Table 0

(^A)	BEGINNING_OF_LINE
(^B)	BOLD
(^D)	DELETE_CHARACTER
(^E)	CHANGE_TO_SPLIT
(^F)	WHOLEFT
(^H (delete))	BACKSPACE
(^I (tab))	TAB_MSG
(^J (enter))	SEND_LINE
(^K)	JOIN_LAST_INVITE
(^L (linefeed))	REFRESH_SCREEN
(^M (return))	SEND_LINE
(^N)	QUOTE_CHARACTER
(^O)	IGNORE_NICK
(^P)	BACKWARD_HISTORY
(^Q)	QUOTE_CHARACTER
(^R)	NICK_COMPLETION
(^S)	TOGGLE_STOP_SCREEN
(^T)	TRANSPOSE_CHARACTERS
(^U)	ERASE_LINE
(^V)	REVERSE
(^W)	META2_CHARACTER
(^X)	SWITCH_CHANNELS
(^Y)	YANK_FROM_CUTBUFFER
(^Z)	STOP_IRC
(^[ (escape))	META1_CHARACTER AUTOREPLY
(^_)	UNDERLINE
(^? (delete))	BACKSPACE

Table 1 (échappement + caractère)

échappement est mappé sur ESC

ESC-ESC	COMMAND_COMPLETION
ESC-.	CLEAR_SCREEN
ESC-<	SCROLL_START
ESC->	SCROLL_END
ESC-O	META2_CHARACTER
ESC-[	META2_CHARACTER
ESC-D	BACKWARD_WORD
ESC-d	DELETE_NEXT_WORD
ESC-e	SCROLL_END
ESC-f	FORWARD_WORD
ESC-h	DELETE_PREVIOUS_WORD
ESC-n	SCROLL_FORWARD
ESC-p	SCROLL_BACKWARD
ESC-DEL	DELETE_PREVIOUS_WORD
ESC-1	WINDOW_SWAP_1
ESC-2	WINDOW_SWAP_2
ESC-3	WINDOW_SWAP_3
ESC-4	WINDOW_SWAP_4
ESC-5	WINDOW_SWAP_5
ESC-6	WINDOW_SWAP_6
ESC-7	WINDOW_SWAP_7
ESC-8	WINDOW_SWAP_8
ESC-9	WINDOW_SWAP_9
ESC-0	WINDOW_SWAP_10

Table 2 (META2 + caractère)

META2 est mappé sur Ctrl-W ou ESC-O ou ESC-[

^W-^Z	STOP_IRC
^W-A	BACKWARD_HISTORY
^W-B	FORWARD_HISTORY
^W-C	FORWARD_CHARACTER
^W-D	BACKWARD_CHARACTER
^W-n	SWAP_NEXT_WINDOW
^W-n	NEXT_WINDOW, if you have the Ankh script loaded
^W-p	PREVIOUS_WINDOW

Pour les consoles en mode BSD :

^W-H	NEW_BEGINNING_OF_LINE
^W-F	NEW_SCROLL_END
^W-I	NEW_SCROLL_BACKWARD
^W-G	NEW_SCROLL_FORWARD
^W-?	WINDOW_HELP
^W-+	WINDOW_GROW_ONE
^W--	WINDOW_SHRINK_ONE
^W-m	WINDOW_MOVE
^W-l	WINDOW_LISTK
^W-k	WINDOW_KILL
^W-b	WINDOW_BALANCE
^W-h	WINDOW_HIDE
^W-[	META3_CHARACTER
^W-1	META3_CHARACTER
^W-M	CHELP
^W-N	CHANNEL_CHOPS
^W-O	CHANNEL_NONOPS
^W-P	CDCC_PLIST
^W-Q	DCC_PLIST
^W-R	DCC_STATS
^W-1	META3_CHARACTER
^W-3	META34_CHARACTER
^W-4	META33_CHARACTER
^W-5	META30_CHARACTER
^W-6	META31_CHARACTER
META32-~	BEGINNING_OF_LINE
META34-~	[Delete] TOGGLE_CLOAK
META33-~	SCROLL_END
META30-~	SCROLL_BACKWARD
META31-~	SCROLL_FORWARD
^W-?	WINDOW_HELP
^W-+	WINDOW_GROW_ONE
^W--	WINDOW_SHRINK_ONE
^W-m	WINDOW_MOVE
^W-l	WINDOW_LISTK
^W-k	WINDOW_KILL
^W-b	WINDOW_BALANCE
^W-h	WINDOW_HIDE

Table 3 (META3 + caractère)

META3 est mappé sur Ctrl-W [.

^W-[	META3_CHARACTER
^W-1	META3_CHARACTER

Ca correspond aussi à F1 F2 F3 F4 F5 F6

ESC-[-[-A	CHELP  (l'aide)
ESC-[-[-B	CHANNEL_CHOPS  (lister les op du chan)
ESC-[-[-C	CHANNEL_NONOPS  (lister les !op)
ESC-[-[-D	CDCC_PLIST  (cdcc ? mais vous êtes un pirate vous !)
ESC-[-[-E	DCC_PLIST  (dcc... ca se confirme)
ESC-[-[-7	DCC_STATS  (obsessionnel en plus...)

Table 4 (META4 + caractère)

Ce sont les bind "à la vim", mais META4 n'est mappé sur rien par défaut. A mapper donc pour activer ça.

^H	BACKWARD_CHARACTER
space	FORWARD_CHARACTER
A	META4_CHARACTER
H	BACKWARD_CHARACTER
I	META4_CHARACTER
J	FORWARD_HISTORY
K	BACKWARD_HISTORY
L	FORWARD_CHARACTER
X	DELETE_CHARACTER
^	META4_CHARACTER
h4	BACKWARD_CHARACTER
i	META4_CHARACTER
j	FORWARD_HISTORY
k	BACKWARD_HISTORY
j	FORWARD_CHARACTER
x	DELETE_CHARACTER



Les settings

ToDo

La liste des settings peut être obtenue par :

/set

Attention c'est très long, donc la même manipulation que pour récupérer la liste des bindings est conseillée !

Les formats settings

BitchX a une table lui indiquant les règles à suivre pour l'affichage de chaque élement. On peut évidemment modifier cela.

Si joe vous dit "putain c'est quoi ce brol !" à 11h42, et qu'auparavant vous aviez tapé :

/fset PUBLIC [$0|$1> $3-

Vous verrez alors :

[11:42|joe> putain c'est quoi ce brol !

Et en plus avec % et des codes couleurs vous pouvez exprimer votre créativité artistique (ou faire la fortune de votre ophtalmo). Cf plus bas pour les couleurs

Ce qu'on sait :

  • $0 c'est le temps
  • $@ c'est le timestamp si vous avez activé les timestamps
  • le '-' veut dire "et tout le reste"

Pour le reste faut tester. Vous aviez remarqué l'absence de $2 dans l'exemple plus haut ? Ben pour savoir ce que c'est faut essayer, pas trop le choix.

Liste des formats disponibles :

/fset

Tentative d'explications :

  • ACTION  : Description somebody else sends to you privately (/describe) ( [time] [nick] [hostname] [your nick] [text] )
  • ACTION_AR  : ( )
  • ACTION_CHANNEL  : Description somebody else sends to a channel (/me) ( [time] [nick] [hostname] [channel] [text] )
  • ACTION_OTHER  : Description you send to somebody else privately (/describe) ( [time] [your nick] [reciever nick] [text] )
  • ACTION_OTHER_AR  : ( )
  • ACTION_USER  : ( )
  • ACTION_USER_AR  : ( )
  • ALIAS  : ( )
  • ASSIGN  : ( )
  • AWAY  : Shown when you go away (/away) ( [time] [message] )
  • BACK  : ( )
  • BANS  : ( )
  • BANS_FOOTER  : ( )
  • BANS_HEADER  : ( )
  • BITCH  : ( )
  • BOT  : ( )
  • BOT_FOOTER  : ( )
  • BOT_HEADER  : ( )
  • BWALL  : ( )
  • CHANNEL_SIGNOFF  : ( )
  • COMPLETE  : ( )
  • CONNECT  : ( )
  • CSET  : ( )
  • CTCP  : When someone sends you a CTCP request. ( [time] [nick] [hostname] [your nick] [ CTCP request] )
  • CTCP_CLOAK  : ( )
  • CTCP_CLOAK_FUNC  : ( )
  • CTCP_CLOAK_FUNC_USER  : ( )
  • CTCP_CLOAK_UNKNOWN  : ( )
  • CTCP_CLOAK_UNKNOWN_USER  : ( )
  • CTCP_CLOAK_USER  : ( )
  • CTCP_FUNC  : ( )
  • CTCP_FUNC_USER  : ( )
  • CTCP_REPLY  : When somebody replies to a CTCP request you sent them. ( [time] [nick] [host] [CTCP request] [response])
  • CTCP_UNKNOWN  : ( )
  • CTCP_UNKNOWN_USER  : ( )
  • CTCP_USER  : ( )
  • DCC  : ( )
  • DCC_CHAT  : ( )
  • DCC_CONNECT  : ( )
  • DCC_ERROR  : ( )
  • DCC_LOST  : ( )
  • DCC_REQUEST  : ( )
  • DESYNC  : ( )
  • DISCONNECT  : ( )
  • EBANS  : ( )
  • EBANS_FOOTER  : ( )
  • EBANS_HEADER  : ( )
  • ENCRYPTED_NOTICE  : ( )
  • ENCRYPTED_PRIVMSG  : ( )
  • FLOOD  : ( )
  • FRIEND_JOIN  : ( )
  • HELP  : ( )
  • HOOK  : ( )
  • IGNORE_INVITE  : ( )
  • IGNORE_MSG  : ( )
  • IGNORE_MSG_AWAY  : ( )
  • IGNORE_NOTICE  : ( )
  • IGNORE_WALL  : ( )
  • INVITE  : ( )
  • INVITE_USER  : ( )
  • JOIN  : When you or another user joins a channel ( [time] [nick] [hostname] [channel] )
  • KICK  : When a user is kicked from a channel ( [time] [nick of kicker] [channel] [nick of kicked] [reason] )
  • KICK_USER  : ( )
  • KILL  : ( )
  • LASTLOG  : ( )
  • LEAVE  : Whe you or another user leaves a channel ( [time] [nick] [host] [channel] [reason] )
  • LINKS  : ( )
  • LIST  : ( )
  • MAIL  : ( )
  • MODE  : When a users mode is changed on a channel ( [time] [nick of changer] [hostname of changer] [channel] [mode change] ([nickname]) )
  • MODE_CHANNEL  : ( )
  • MSG  : Private messages sent to you ( [time] [nick] [hostname] [text] )
  • MSGCOUNT  : ( )
  • MSGLOG  : ( )
  • MSG_GROUP  : ( )
  • NAMES  : Shows number of users on channel on join ( [time] [channel] [nr of users] )
  • NAMES_BANNER  : ( )
  • NAMES_BOT  : ( )
  • NAMES_BOTCOLOR  : ( )
  • NAMES_FOOTER  : ( )
  • NAMES_FRIEND  : ( )
  • NAMES_FRIENDCOLOR  : ( )
  • NAMES_IRCOP  : ( )
  • NAMES_NICKCOLOR  : ( )
  • NAMES_NONOP  : ( )
  • NAMES_OP  : ( )
  • NAMES_OPCOLOR  : ( )
  • NAMES_SHIT  : ( )
  • NAMES_SHITCOLOR  : ( )
  • NAMES_VOICE  : ( )
  • NAMES_VOICECOLOR  : ( )
  • NETADD  : ( )
  • NETJOIN  : ( )
  • NETSPLIT  : ( )
  • NETSPLIT_HEADER  : ( )
  • NICKNAME  : ( )
  • NICKNAME_OTHER  : ( )
  • NICKNAME_USER  : ( )
  • NICK_AUTO  : ( )
  • NICK_COMP  : ( )
  • NICK_MSG  : ( )
  • NONICK  : When the server tells you that the nick doesn't exist ( [time] [nick] [server] [failure reason] )
  • NOTE  : ( )
  • NOTICE  : ( )
  • NOTIFY_OFF  : ( )
  • NOTIFY_ON  : ( )
  • NOTIFY_SIGNOFF  : ( )
  • NOTIFY_SIGNON  : ( )
  • OPER  : ( )
  • OV  : ( )
  • PASTE  : ( )
  • PUBLIC  : Everything others say on channels. ( [time] [nick] [channel] [text])
  • PUBLIC_AR  : ( )
  • PUBLIC_MSG  : ( )
  • PUBLIC_MSG_AR  : ( )
  • PUBLIC_NOTICE  : ( )
  • PUBLIC_NOTICE_AR  : ( )
  • PUBLIC_OTHER  : ( )
  • PUBLIC_OTHER_AR  : ( )
  • REL  : ( )
  • RELM  : ( )
  • RELN  : ( )
  • RELS  : ( )
  • RELSM  : ( )
  • RELSN  : ( )
  • SEND_ACTION  : Description you send (to a channel), or make (/me, also away)) ( [time] [your nick] [channel] [text])
  • SEND_ACTION_OTHER  : ( )
  • SEND_AWAY  : ( )
  • SEND_CTCP  : When you send a CTCP command to a user ( [time] [nick] [ctcp request] )
  • SEND_DCC_CHAT  : ( )
  • SEND_ENCRYPTED_MSG  : ( )
  • SEND_ENCRYPTED_NOTICE  : ( )
  • SEND_MSG  : Private messages you send ( [time] [recieving nick] [your nick] [text] )
  • SEND_NOTICE  : ( )
  • SEND_PUBLIC  : Everthing you say on channels ( [time] [channel] [nick] [text])
  • SEND_PUBLIC_OTHER  : ( )
  • SERVER  : ( )
  • SERVER_MSG1  : ( )
  • SERVER_MSG1_FROM  : ( )
  • SERVER_MSG2  : ( )
  • SERVER_MSG2_FROM  : ( )
  • SERVER_NOTICE  : ( )
  • SERVER_NOTICE_BOT  : ( )
  • SERVER_NOTICE_BOT1  : ( )
  • SERVER_NOTICE_BOT_ALARM  : ( )
  • SERVER_NOTICE_CLIENT_CONNECT  : ( )
  • SERVER_NOTICE_CLIENT_EXIT  : ( )
  • SERVER_NOTICE_CLIENT_INVALID  : ( )
  • SERVER_NOTICE_CLIENT_TERM  : ( )
  • SERVER_NOTICE_FAKE  : ( )
  • SERVER_NOTICE_GLINE  : ( )
  • SERVER_NOTICE_KILL  : ( )
  • SERVER_NOTICE_KILL_LOCAL  : ( )
  • SERVER_NOTICE_KLINE  : ( )
  • SERVER_NOTICE_NICKC  : ( )
  • SERVER_NOTICE_OPER  : ( )
  • SERVER_NOTICE_REHASH  : ( )
  • SERVER_NOTICE_STATS  : ( )
  • SERVER_NOTICE_TRAFFIC_HIGH  : ( )
  • SERVER_NOTICE_TRAFFIC_NORM  : ( )
  • SERVER_NOTICE_UNAUTH  : ( )
  • SET  : ( )
  • SET_NOVALUE  : ( )
  • SHITLIST  : ( )
  • SHITLIST_FOOTER  : ( )
  • SHITLIST_HEADER  : ( )
  • SIGNOFF  : ( )
  • SILENCE  : ( )
  • SMODE  : ( )
  • STATUS  : Top bar of bottom status lines (double bars and single bar) ( )
  • STATUS1  : Bottom bar of bottom status lines (double bars) first update after refresh ( )
  • STATUS2  : ( )
  • STATUS3  : ( )
  • TIMER  : ( )
  • TOPIC  : Displayed when requesting the topic with /topic command ( [time] [channel] [topic] )
  • TOPIC_CHANGE  : ( [time] [nick of changer] [channel] [topic] )
  • TOPIC_CHANGE_HEADER  : Header displayed before the new topic when topic changed ( [time] [nick of changer] [channel] [topic] )
  • TOPIC_SETBY  : ( )
  • TOPIC_UNSET  : When somebody unsets the topic (/untopic) ( [time] [nick] [channel] )
  • TRACE_OPER  : ( )
  • TRACE_SERVER  : ( )
  • TRACE_USER  : ( )
  • USAGE  : Shown when usage help is given on command ( [text] )
  • USERLIST  : Line of userlist info (/userlist) ( [binary repr. of modes for user] [username] [password?] [usermask] [channel] )
  • USERLIST_FOOTER  : Shown after userlist output (/userlist) ( [time] [nr of users])
  • USERLIST_HEADER  : Shown before userlist output (/userlist) ( )
  • USERMODE  : ( )
  • USERS  : One line of output from /users command ( [?] [channel] [nickname] [hostname] [?] [mode(@)] )
  • USERS_HEADER  : Shown before /user output and after USER_TITLE ( [time] [channel])
  • USERS_SHIT  : ( )
  • USERS_TITLE  : Shown before /user output and USER_HEADER ( [channel] )
  • USERS_USER  : ( )
  • VERSION  : ( )
  • WALL  : ( )
  • WALLOP  : ( )
  • WALL_AR  : ( )
  • WATCH_SIGNON  : ( )
  • WATCH_SIGNOFF  : ( )
  • WHO  : One line (containing 1 user) when you issue a /who command ( [channel] [nick] [mode] [ident username] [hostname] [server] [fullname] )
  • WHOIS_ADMIN  : ( )
  • WHOIS_AWAY  : /Whois output line: If user is away ( [text] )
  • WHOIS_BOT  : ( )
  • WHOIS_CHANNELS  : /Whois output line: channels user is on. Also if a user is in userlist: channels a user is allowed on. ( [channels] )
  • WHOIS_FOOTER  : Shown after /whois command output ( none )
  • WHOIS_FRIEND  : /Whois output line: When user is in userlist shows info ( [friend-modes] [hostmask] )
  • WHOIS_HEADER  : Shown before /whois output ( none )
  • WHOIS_HELP  : ( )
  • WHOIS_IDLE  : /Whois output line: Idle time (time user hasn't sent anything to the server ( [hours] [minutes] [seconds] ['seconds idle'] )
  • WHOIS_NAME  : /Whois output line: full name ( [Fullname] )
  • WHOIS_NICK  : /Whois output line: nickname ( [nickname] [username] [hostname] [tld countryname] )
  • WHOIS_OPER  : ( )
  • WHOIS_REGISTER  : ( )
  • WHOIS_SERVER  : /Whois output line: Server user is on ( [hostname] [Description] )
  • WHOIS_SERVICE  : ( )
  • WHOIS_SHIT  : ( )
  • WHOIS_SIGNON  : ( )
  • WHOLEFT_FOOTER  : ( )
  • WHOLEFT_HEADER  : ( )
  • WHOLEFT_USER  : ( )
  • WHOWAS_HEADER  : ( )
  • WHOWAS_NICK  : ( )
  • WIDELIST  : ( )
  • WINDOW_SET  : ( )
  • XTERM_TITLE  : ( )
  • 381  : ( )
  • 471  : ( )
  • 473  : ( )
  • 474  : ( )
  • 475  : ( )
  • 476  : ( )


A noter :

/fset format_version telnet 0.1alpha

et votre client IRC répondra ca à un /ctcp version

Insérer des timestamps

Vous voulez avoir l'heure au début d'un message ? Insérez $0 dans son format setting.

Mettre des couleurs

Vous pouvez insérer des codes couleurs (un peu comme quand on change les couleurs du prompt) :

  • foreground :
    •  %b - blue
    •  %B - bold blue
    •  %c - cyan
    •  %C - bold cyan
    •  %g - dark green
    •  %G - bold green
    •  %k - black
    •  %K - Dark Gray
    •  %p and %m - and purple/magenta
    •  %P and %M - bold purple/magenta
    •  %r - red
    •  %R - bold red
    •  %y - brown
    •  %Y - yellow
  • background :
    •  %0 black
    •  %1 red
    •  %2 green
    •  %3 yellow
    •  %4 blue
    •  %5 purple/magenta
    •  %6 cyan
    •  %7 white
  • spécial :
    •  %8 invert
    •  %9 bright/bold
    •  %n null color (reset)
    •  %F flashing foreground
    •  %U underline text.

Pour utiliser des couleurs dans /echo, /say et autres, essayez :

/eval echo $cparse("%Bblue%n")

(Jamais trop testé, mais ca vient de la FAQ)

Les scripts

Pour charger un script :

/load /path/to/script.bx

Pour écrire un script : euh ben mieux vaut avoir un peu d'expérience en tant qu'utilisateur de BitchX

Si vous vous demandez s'il y a un guide pour scripter, la réponse est :

First of all, try looking in BitchX.help (/bhelp). If it's not in there, try the
base ircII help file. Also, look in scripts and see if you can try figure out
the syntax/arguments a particular command should have. Check and see whether it
is a script defined function. Try reading the script to see whether it is
defined in there. If you're too lazy to do that you might try /load'ing the
script and comparing the /load'ed script's output with that of the default
output.
(/eval echo $func(args) and /command). If it's definitely an "undocumented
feature", e.g. you can't find out what its' use is, ask in the channel, someone
may be able to help.

Exemple : tangente.bx

Ce script se contente de réagir à certains messages du chan, et appelle un shell script :

xecho tangente.bx loaded
#
# ^on     -> indique sans doute qu'on souhaite capturer un évènement
# ^ctcp   -> évènement réception d'un message CTCP
# ^public -> évènement réception d'un message public
#
# format du message : "nick chan tous les mots du message"
#
# % -> n'importe quel mot
# * -> n'importe quelle suite de mot
#
# Pour récupérer un mot du message : $ et numéro du mot
# Pour récupérer un mot du message et les suivants : $ numéro du mot -
#

/on -public "% % !tangente" {
    /exec -notice \#troulite /home/xav/bin/IRC/tangente
}

/on -public "% % !tangente_us" {
    /exec -notice \#troulite TZ=America/New_York /home/xav/bin/IRC/tangente
}

/on -public "% % !kirby" {
    /say Kirby Dance Machine !  <('-'< )  ^( '-' )^  v(._.)v  ( >'-')>
}

Exemple : citations.bx

Ce script charge un fichier texte rempli de phrases à citer, et en cite une aléatoirement :

xecho citations.bx loaded
#
# ^on     -> indique sans doute qu'on souhaite capturer un évènement
# ^ctcp   -> évènement réception d'un message CTCP
# ^public -> évènement réception d'un message public
#
# format du message : "nick chan tous les mots du message"
#
# % -> n'importe quel mot
# * -> n'importe quelle suite de mot
#
# Pour récupérer un mot du message : $ et numéro du mot
# Pour récupérer un mot du message et les suivants : $ numéro du mot -
#

# commande echo
^on ^public "% % !geek" {
    srand($time())
    @fd = open(/home/xav/.BitchX/citations.txt R)

    # on commence à -1 car sinon il compte 1 en trop (mais pourquoi ?)
    @nblignes = -1
        if ($fd != -1) {
            while (!eof($fd)) {
                @tmp = read($fd)
                @nblignes = nblignes + 1
            }
            close($fd)
            
            # renvoie un nombre entre 0 et nblignes -1
            @choix = rand($nblignes)

            # on affiche la $choix ieme ligne
            @fd = open(/home/xav/.BitchX/citations.txt R)
            @compteur = 0
            if ($fd != -1) {
                while (compteur != choix) {
                    @tmp = read($fd)
                    @compteur = compteur + 1
                }
                @tmp = read($fd)
                close($fd)
                /say $tmp
            }
        }
}

Exemple : logger.bx

Ce script gère les fichiers logs. Si vous le chargez vous aurez

$tree -d ~/.BitchX/logs
/home/xav/.BitchX/logs
|-- channels
|-- ctcp
|-- dcc
|-- messages
`-- notices


#####################################################################################
## logger.bx by powuh, Mon Apr 21 19:01:36 EDT 2003
##
## This is a logger script for BitchX and Epic.  It is fully customizable, so you
## can log what you want to, where you want to!  I wrote this after finding many
## flaws in bxlog.bx by dARTh in both log handling, and code syntax.  Hopefully
## my logger.bx will be a better replacement.
##
## Any comments, suggestions, etc can be directed to powuh on EFNet's #BitchX
##
## To load this script, put it in your ~/.BitchX/ directory, and type /load logger.bx
## from BitchX.
##
## Type /logconf to configure logging preferences, and /logsave to save your config.
##
## Put the line   load logger.bx   in your ~/.bitchxrc to have it automatically
## load this logger script every time you start BitchX
##
## 04/21/2003 - Changed default timestamp and default 'changed topic' logger lines
##              so that psig will work correctly.  Logfile format is 'mIRC'
##              Thanks to Snipi6 for this.
## 05/05/3002 - Added server-notice support (Requested by Evats)
#####################################################################################

@ log.version = [4.0]
@ log.config.file = [~/.bxlogger.cfg]

if (fexist($log.config.file) == -1) {
   xecho -b Config file, $log.config.file, not found... Using default values.  Type /logconf to configure!
   @ logdir = [~/.BitchX/logs];@ logdate = [%H:%M];@ logdir.channels = [$logdir/channels]
   @ logdir.messages = [$logdir/messages];@ logdir.notices = [$logdir/notices];@ logdir.ctcp = [$logdir/ctcp]
   @ logdir.dcc = [$logdir/dcc];@ logpublic = 1;@ logmessages = 1;@ lognotices = 1;@ logdccs = 1;@ logctcps = 1
   }{load $log.config.file}

alias _logger {
   if (logenable) {
      if (log.debug) echo _logger $0 > $1-
      if (fexist($logdir) == -1) {${mkdir($logdir)?[eval xecho -b mkdir failed $logdir]:[]}}
      if (logsepdirs && fexist($logdir.channels) == -1) {${mkdir($logdir.channels)?[eval xecho -b mkdir failed $logdir.channels]:[]}}
      if (logsepdirs && fexist($logdir.messages) == -1) {${mkdir($logdir.messages)?[eval xecho -b mkdir failed $logdir.messages]:[]}}
      if (logsepdirs && fexist($logdir.notices) == -1) {${mkdir($logdir.notices)?[eval xecho -b mkdir failed $logdir.notices]:[]}}
      if (logsepdirs && fexist($logdir.ctcp) == -1) {${mkdir($logdir.ctcp)?[eval xecho -b mkdir failed $logdir.ctcp]:[]}}
      if (logsepdirs && fexist($logdir.dcc) == -1) {${mkdir($logdir.dcc)?[eval xecho -b mkdir failed $logdir.ctcp]:[]}}
      @ :logfh = open($0 W)
      @ write($logfh [$strftime($logdate)] $stripc($stripansicodes($strip(����� $1-))))
      @ close($logfh)
   }
}

alias logconf {
   if ([$0]) switch ($0) {
      (a)  {@ logenable = ([$1]==[yes])?1:0}
      (b)  {@ logpublic = ([$1]==[yes])?1:0}
      (c)  {@ logmessages = ([$1]==[yes])?1:0}
      (d)  {@ lognotices = ([$1]==[yes])?1:0}
      (e)  {@ logdccs = ([$1]==[yes])?1:0}
      (f)  {@ logctcps = ([$1]==[yes])?1:0}
      (g)  {@ logdir = ([$1])?[$1]:[$logdir]}
      (h)  {@ logsepdirs = ([$1]==[yes])?1:0}
      (h1) {@ logdir.channels = ([$1])?[$1]:[$logdir.channels]}
      (h2) {@ logdir.messages = ([$1])?[$1]:[$logdir.messages]}
      (h3) {@ logdir.notices = ([$1])?[$1]:[$logdir.notices]}
      (h4) {@ logdir.dcc = ([$1])?[$1]:[$logdir.dcc]}
      (h5) {@ logdir.ctcp = ([$1])?[$1]:[$logdir.ctcp]}
      (i)  {@ logdate = ([$1])?[$1]:[$logdate]}
      (*)  {xecho -b Invalid switch to /logconf: $0;return}
   }

   xecho -b
   xecho -b Logger Configuration:
   xecho -b   [a] Enable Logging ..................... ${logenable?[yes]:[no]}
   if (logenable)  xecho -b   [b] Log channel activity ............... ${logpublic?[yes]:[no]}
   if (logenable)  xecho -b   [c] Log private messages ............... ${logmessages?[yes]:[no]}
   if (logenable)  xecho -b   [d] Log notices ........................ ${lognotices?[yes]:[no]}
   if (logenable)  xecho -b   [e] Log DCCs ........................... ${logdccs?[yes]:[no]}
   if (logenable)  xecho -b   [f] Log CTCPs .......................... ${logctcps?[yes]:[no]}
   if (logenable)  xecho -b   [g] Log Directory ...................... ${logdir?[$logdir/]:[Not Set]}
   if (logenable)  xecho -b   [h] Subdirectories by type ............. ${logsepdirs?[yes]:[no]}
   if (logsepdirs) xecho -b      [h1] Channel log directory .......... ${logdir.channels?[$logdir.channels/]:[Not Set]}
   if (logsepdirs) xecho -b      [h2] Message log directory .......... ${logdir.messages?[$logdir.messages/]:[Not Set]}
   if (logsepdirs) xecho -b      [h3] Notice log directory ........... ${logdir.notices?[$logdir.notices/]:[Not Set]}
   if (logsepdirs) xecho -b      [h4] DCC log directory .............. ${logdir.dcc?[$logdir.dcc/]:[Not Set]}
   if (logsepdirs) xecho -b      [h5] CTCP log directory ............. ${logdir.ctcp?[$logdir.ctcp/]:[Not Set]}
   if (logenable)  xecho -b   [i] Log Timestamp Format ............... $logdate \($strftime($logdate)\)
   xecho -b
   xecho -b Type /logconf <letter> <value> to configure. Then /logsave to save settings.
   xecho -b
}
 
alias logsave {
   @rename($log.config.file $log.config.file~)
   @ :savefile = open($log.config.file W T)
   @ write($savefile @ logenable = $logenable)
   @ write($savefile @ logpublic = $logpublic)
   @ write($savefile @ logmessages = $logmessages)
   @ write($savefile @ lognotices = $lognotices)
   @ write($savefile @ logdccs = $logdccs)
   @ write($savefile @ logctcps = $logctcps)
   @ write($savefile @ logdir = [$logdir])
   @ write($savefile @ logsepdirs = $logsepdirs)
   @ write($savefile @ logdir.channels = [$logdir.channels])
   @ write($savefile @ logdir.messages = [$logdir.messages])
   @ write($savefile @ logdir.notices = [$logdir.notices])
   @ write($savefile @ logdir.dcc = [$logdir.dcc])
   @ write($savefile @ logdir.ctcp = [$logdir.ctcp])
   @ write($savefile @ logdate = [$logdate])
   @ close($savefile)
   xecho -b Saved logger configuration to $log.config.file
}

alias loghelp {
   xecho -b
   xecho -b Logger version $log.version by powuh
   xecho -b Commands:
   xecho -b   /loghelp ............ What you are reading now
   xecho -b   /logconf ............ Logger Configuration
   xecho -b   /logsave ............ Save current configuration
   xecho -b
}

alias _cflag @ function_return = (ischanop($0 $1)) ? [@] : (isvoice($0 $1)) ? [+] : []

## Private message hooks
on #-msg 6192 * {if (logmessages) {_logger ${logsepdirs?logdir.messages:logdir}/$tolower($0.log) <$0> $1-}}
on #-send_msg 6192 * {if (logmessages) {_logger ${logsepdirs?logdir.messages:logdir}/$tolower($0.log) <$N> $1-}}

## Notice hooks
on #-notice 6192 * {if (lognotices) {_logger ${logsepdirs?logdir.notices:logdir}/$tolower($0.log) -$0\- $1-}}
on #-send_notice 6192 * {if (lognotices) {_logger ${logsepdirs?logdir.notices:logdir}/$tolower($0.log) =$0= $1-}}
on #-server_notice 6192 * {if (lognotices) {_logger ${logsepdirs?logdir.notices:logdir}/$tolower($0.log) $0: $1-}}

## DCC hooks
on #-dcc_chat 6192 * {if (logdccs) {_logger ${logsepdirs?logdir.dcc:logdir}/$tolower($0.dcc.log) <$0> $1-}}
on #-send_dcc_chat 6192 * {if (logdccs) {_logger ${logsepdirs?logdir.dcc:logdir}/$tolower($0.dcc.log) <$N> $1-}}
on #-dcc_connect 6192 * {if (logdccs) {_logger ${logsepdirs?logdir.dcc:logdir}/$tolower($0.dcc.log) DCC Connect from $0 $1-}}
on #-dcc_error 6192 * {if (logdccs) {_logger ${logsepdirs?logdir.dcc:logdir}/$tolower($0.dcc.log) DCC Error from $0 $1-}}
on #-dcc_lost 6192 * {if (logdccs) {_logger ${logsepdirs?logdir.dcc:logdir}/$tolower($0.dcc.log) DCC Lost from $0 $1-}}
on #-dcc_request 6192 * {if (logdccs) {_logger ${logsepdirs?logdir.dcc:logdir}/$tolower($0.dcc.log) DCC Request from $0 $1-}}

## Public channel hooks
on #-public 6192 * {if (logpublic) {_logger ${logsepdirs?logdir.channels:logdir}/$tolower($1.log) <$_cflag($1 $0)$0> $2-}}
on #-public_other 6192 * {if (logpublic) {_logger ${logsepdirs?logdir.channels:logdir}/$tolower($1.log) <$_cflag($1 $0)$0> $2-}}
on #-public_ar 6192 * {if (logpublic) {_logger ${logsepdirs?logdir.channels:logdir}/$tolower($1.log) <$_cflag($1 $0)$0> $2-}}
on #-public_other_ar 6192 * {if (logpublic) {_logger ${logsepdirs?logdir.channels:logdir}/$tolower($1.log) <$_cflag($1 $0)$0> $2-}}
on #-public_notice 6192 * {if (logpublic) {_logger ${logsepdirs?logdir.channels:logdir}/$tolower($1.log) $0\- $2-}}
on #-action 6192 * {if (logpublic) {_logger ${logsepdirs?logdir.channels:logdir}/$tolower($1.log) * $_cflag($1 $0)$0 $2-}}
on #-send_public 6192 * {if (logpublic) {_logger ${logsepdirs?logdir.channels:logdir}/$tolower($0.log) <$_cflag($0 $N)$N> $1-}}
on #-send_action 6192 * {if (logpublic) {_logger ${logsepdirs?logdir.channels:logdir}/$tolower($0.log) * $_cflag($0 $N)$N $1-}}
on #-leave 6192 * {if (logpublic) {_logger ${logsepdirs?logdir.channels:logdir}/$tolower($1.log) *** Parted $0 \($2\)}}
on #-join 6192 * {if (logpublic) {_logger ${logsepdirs?logdir.channels:logdir}/$tolower($1.log) *** Joined $0 \($2\)}}
on #-kick 6192 * {if (logpublic) {_logger ${logsepdirs?logdir.channels:logdir}/$tolower($2.log) *** $0 was kicked by $1 \($3-\)}}
on #-topic 6192 * {if (logpublic) {_logger ${logsepdirs?logdir.channels:logdir}/$tolower($1.log) *** $0 changes topic to `$2-`}}
on #-channel_nick 6192 * {if (logpublic) {_logger ${logsepdirs?logdir.channels:logdir}/$tolower($0.log) *** $1 is now known as $2}}
on #-channel_signoff 6192 * {if (logpublic) {_logger ${logsepdirs?logdir.channels:logdir}/$tolower($0.log) *** $1 signoff\: $2-}}
on #-mode 6192 * {if (logpublic) {_logger ${logsepdirs?logdir.channels:logdir}/$tolower($1.log) *** $0 sets mode $2-}}

## CTCP hooks
on #-ctcp 6192 * {if (logctcps) {_logger ${logsepdirs?logdir.ctcp:logdir}/ctcp.log CTCP from $0\: $2-}}
on #-ctcp_reply 6192 * {if (logctcps) {_logger ${logsepdirs?logdir.ctcp:logdir}/ctcp.log CTCP $1 reply from $0\: $2-}}

eval xecho -b logger.bx version $log.version by powuh loaded. Type /loghelp for help.

# EOF

.bitchxrc

Exemple tiré de kake.bx

Code

#
# Version 0.85 5 Apr 2001
# Known to work with at least versions:
#     BitchX-75p2-10 (19980708)
#     BitchX-75p3 (19990221)
#     BitchX-1.0c16 (19990221)
#
# New since version 0.8: new version of the /j command to let you join
#     channels with keys (thanks to Nick Burch). Note if you give a bad
#     key then you'll have a dangling window - do /win kill
#----------------------------------------------------------------------------
# The order of this file:
#
# * Colours
# * New commands / aliases / keybindings
#    o Windowing commands [actual functions are defined lower down]
#    o Sensible keybindings
# * Cosmetics 
#    o Status bars
#    o Main windows
#        + General
#        + Speaking and acting on channel
#        + Joining and leaving channels
#        + Messages
#        + CTCP requests
#        + Server queries
#        + Mode changes
# * Settings I like
# * Actual functions for aliases defined above.
# * Startup
#
#----------------------------------------------------------------------------


#############################################
# 
# Colours 
# 
#############################################

# Foreground colours (background is black)
# The bit in capitals is the variable name. Putting 1; before the 5m (eg)
# makes it bold. Leaving this out (or using eg 0; makes it plain). But then
# again, I don't really understand these.

^assign BLNK �[5m
^assign CL �[0m
^assign BLU �[34m
^assign MAG �[35m
^assign CYN �[36m
^assign WHT �[37m
^assign RED �[31m
^assign GRN �[32m
^assign YEL �[33m

# bold ones

^assign HBLK �[1;30m
^assign HGRN �[1;32m
^assign HBLU �[1;34m
^assign HMAG �[1;35m
^assign HCYN �[1;36m
^assign HWHT �[1;37m
^assign HRED �[1;31m
^assign HGRN �[1;32m
^assign HYEL �[1;33m

# Background colours (foreground is white)

^assign BBLU �[44m
^assign BBLK �[40m
^assign BRED �[41m
^assign BGRN �[42m
^assign BYEL �[43m
^assign BBLU �[44m
^assign BMAG �[45m
^assign BCYN �[46m
^assign BWHT �[47m
^assign BG �[40m


#############################################
#
# New commands / aliases / keybindings
#
#############################################

#####
##### Windowing commands [actual functions are defined lower down]
#####

# /j <#channel> [<key>] [<name>] joins #channel in a window called
#     win_name (or #channel if <name> is omitted) using key <key>
#     and hides all other windows.
alias j new_window_join_channel

# /q <nick> opens a query window to nick and hides all other windows.
alias q new_window_query_nick

# /msgwin opens a window for msgs from all the nicks in the current
#   channel, and turns the log on.
alias msgwin new_window_channel_msgs


#####
##### Sensible keybindings
#####

# Make CTRL-e take you to the end of the line, as it should :-)
bind ^E end_of_line

# CTRL-p for scroll-back (prev page), CTRL-n for scroll-forward (next page)
bind ^P scroll_backward
bind ^N scroll_forward


#############################################
# 
# Cosmetics
# 
#############################################

###########################
##### Status bars
###########################

# This is the format for the window status bars. The %<char> thingies
# are called expandos - they expand to the values of certain
# variables. See
#   http://crackrock.melnibone.org/help/4_Misc/set/status_format.html
# to find out which variables work in ircii. BitchX has some extra ones:
#   %L is lag
#   %! is all that [O/2 N/8 I/3 V/0 F/0] stuff that I don't understand
#   %- is the topic
#
# Here we just set variables to the formats we want; we have to use a
# /window set command to actually implement the change. In order to
# get variables (such as colour codes) to expand inside the value in
# the <set variable value> statements, , you need to put the set
# statements inside an alias and call that; otherwise the characters
# get put in literally.

alias setstatus {

# First line - time , chanop, ircop, voice, nick, usermodes,
#              am-I-away, channel, channel-modes , query , 
#              actions-in-other-windows , mail
#  [Those with space afterwards will have spaces at the end of their
#   set status_ lines below]  
^set status_format1 ${bred}%T%@%*%=%N%#%A%C%+%Q%M%F

# Second line - topic
^set status_format2 ${bred}%-

# Now we set the values of the variables that the expandos above
# actually expand to. See links from
#   http://crackrock.melnibone.org/help/4_Misc/set/set.html
# to see the allowed formats for each variable. 

#^set status_clock ${hblk}[%T]${cl}${bg}
^set status_clock ${cl}${bred}[%T] ${hwht}
^set status_umode ${cl}${bred}${hblk}\(${cl}${bred}+%#${hblk}\)${cl}${bred} 
^set status_away ${bred} ${hblk}\(${hwht}zZzZ${hblk}\)${bred} 
^set status_channel ${bred}%C
^set status_mode ${bred}${hblk}\(${cl}${bred}+%+${hblk}\)${cl}${bred} 
^set status_query ${bred}${hblk}\[${cl}${bred}Query: ${hwht}%Q${hblk}\]${cl}${bred} 
^set status_notify ${bred}${hblk}\[${cl}${bred}Act: ${hwht}%F${hblk}\]${cl}${bred} 
^set status_mail ${bred}${hblk}\[${cl}${bred}Mail: ${hwht}%M${hblk}\]${cl}${bred}
^set status_topic ${bred}${hwht}%-
}


###########################
##### Main windows
###########################

# The current time is given by %Z - this will be in the format 04:25pm
# if clock_24hour is off, and 16:25 if clock_24hour is on. If you want
# to get rid of the am/pm, replace $Z in the below with
# $tr(/[apmAPM]//$Z).
#
# A lot of the formats (if not all) used to begin with $G, which seems
# by default to be set to something that looks like \`{u}\'{i}\`{u} to
# me and $\omega\nu\omega$ to Simon. It's just decoration, as far as I
# can tell; so it goes in the bin.
#
# The timestamps are set to charcoal by default, except when someone
# joins or leaves a channel; in this case they are bold red.
#
#
# ${hgrn} changes to that colour (see colour settings below), as do
# things starting with %. 
# %K seems to be grey, like BBLK
# %w and %n are bold white sometimes, plain otherwise. I think they may
#      just be the default colours or something.
# %p is purple, like dark orchid
# %Y is bold yellow.
# %R is bold red.
# %C is bold cyan.


#####
##### General
#####

# When a long line has to be continued, indent it by at least 5
# spaces, or to the start of the second word on the line (timestamps
# count as words). [Note the spaces after continued_line...]

^set indent on
^set continued_line      


#####
##### Speaking and acting on channel
#####

## This is when I send to the channel.
# $1 is the channel name, $2 is my nick, $3 is the message.
# I don't know what the - does.
^fset format_send_public [$Z]%Y<%W$2%Y>%n $3-

# This is when other people send to the channel.
^fset format_public [$Z]%Y<%w$1%Y>%n $3-





## This is when I send an *action* to the channel.
# $1 is my nick, $2 is the channel, $3 is the action.
# [ I put in a # to indicate that the action is on a channel ]
# There used to be an $a.s in here, but that never seems to be set to
# anything. Must be something to do with crackrock. $a is set to BitchX
^fset format_send_action [$Z] %C* %Y$1%C $3-

# This is when someone on the channel does an action.
# $1 is their nick, $2 is user@host, $3 is the channel, $4 is their action.
# [ Again, the # indicates that the action is on channel ]
^fset format_action_channel [$Z] %C* %Y$1%C $4-

# This is when a member of my userlist (after a /adduser) does an action.
^fset ACTION_USER [$Z] %C* %Y$1%C $4-



#####
##### Joining and leaving channels
#####

# This is when someone joins the channel.
# $1 is nick, $2 is user@host, $3 is channel.
^fset format_join [$Z] %g* $1 %y[%g$2%y]%g has %Yjoined%g $3

# This is when someone /leave s a channel.
# $1 is nick, $2 is user@host, $3 is channel.
^fset format_leave [$Z] %g* $1 %y[%g$2%y]%g has %Yleft%g $3

# This is when someone /quit s.
# $1 is their nick, $2 is user@host, $3 is which channels they were on,
# $4 is their reason.
^fset format_channel_signoff [$Z] %g* $1 has %Ysigned off%g $3 %y(%g$4-%y)





#####
##### Messages
#####

# This is when someone messages me.
# $1 is their nick, $2 is user@host, $3 is the message.
# I truncate user@host with $left after 15 characters (it can get long).
^fset format_msg [$Z] %P* $1%y(%P$left(15 $2)%y)%c-> $3-

# This is when I message someone.
# $1 is their nick, $2 is my nick, $3 is the message
^fset format_send_msg [$Z] %P* %y[%Pmsg to $1%y]%c-> $3-

# This is when I send a private action to someone
# $1 is my nick, $2 is their nick, $3 is the action
#^fset format_send_action_other %P$Z %K[%pact %P$2%K] %P$1 %n$3-

# This is when someone sends me a private action
# $1 is their nick, $2 is their user@host, $3 is my nick, $4 is the action
#^fset format_action %P$Z %K(%p$left(15 $2)%K)%P-> $1 %n$4-

#####
##### CTCP requests
#####

# This is when someone requests a CTCP from me
# $1 is their nick, $2 is their user@host, $3 is my nick, $4 is the ctcp
fset format_ctcp [$0] %g* %K<%g<%G< %gCTCP request from %G$3 %gabout %G$4-

# This is when I get a CTCP reply
# $1 is their nick, $2 their user@host, $3 the ctcp request type, $4 the reply
fset format_ctcp_reply [$0] %g* %K<%g<%G< %gCTCP reply from %G$1 %gabout %G$toupper($3) %g: $4-

# This is when I send a CTCP request
# $0 is the time, $1 is their nick, $2 is the ctcp request type
fset format_send_ctcp [$0] %g* %K>%g>%G> %gCTCP request to %G$1%g about %G$2-




#####
##### Server queries
#####

# /who
# $0 is channel, $1 nick, $2 modes $3 user, $4 host, $5 server, $6 ircname
fset format_who %y$0 %P$[3]2 %Y$1%y(%w$3@$4%y) %y[%P$6-%y]

# /u 
fset USERS %y[ %Y$5 %G$[9]2%y][%g$[41]3%y][%g$0%y]%g$4

# /whois nick

fset format_whois_header %G--------%g--------%K--------
# Line for their nick - $0 is nick, $1 username, $2 host, $3 country
fset format_whois_nick %G| $0 %y(%g$1@$2%y)
# Line for their ircname - $0 is ircname
fset format_whois_name %G| %gircname  : %Y$0-
# Line for their channels - $0 is list of the channels they're on
fset format_whois_channels %G| %gchannels : %Y$0-
# Line for their server - $0 is server address, $1 its description
fset format_whois_server %G| %gserver   : %Y$0 %y($1-)
# Line for their idle time - $0 hours, $1 minutes, $2 seconds, $3 signon time
fset format_whois_idle %G| %gidle     : %Y$0 %yh, %Y$1 %ym, %Y$2 %ys (signon: %Y$stime($3-)$y)
# Line if they're away - $0 is their nick, $1 the reason
fset format_whois_away %G| %gaway     : $1-
fset format_whois_footer %G--------%g--------%K--------



# /whowas nick

fset format_whowas_header %G--------%g--------%K--------
# Line for their nick - $0 is nick, $1 username, $2 host, $3 country
fset format_whowas_nick %G| $0 %gwas %y(%g$1@$2%y)
# Line for their ircname as for whois
# Line for their channels as for whois
# Line for their server as for whois
# Line for their idle time as for whois
# Line for away as for whois
fset format_whowas_footer %G--------%g--------%K--------


#####
##### Mode changes
#####

# Mode change for a user or a channel
# $0 is time, $1 nick changed by, $2 user@host, $3 channel, $4 mode change,
# $5 nick changed
#fset format_mode %R$0 %rmode%K/%r$3 %K[%R$4-%K] %rby %R$1
fset format_mode [$0] %g* mode%y/%g$3 %y[%G$4-%y] %gby $1



#############################################
#
# Settings I like
# 
#############################################

set auto_away off
set clock_24hour on
set nick_completion off
set flood_warning off
set flood_protection off
set ctcp_flood_protection off
set ctcp_flood_ban off
set deopflood off
set flood_kick off
set joinflood off
set kickflood off
set nickflood off
set DCC_BAR_TYPE 1

# This one's just showing off
^fset version telnet-0.17-i386
^set client_information )


#############################################
# 
# Actual functions for aliases defined above.
# 
#############################################

# I'm not sure what the ^ does. It seems to suppress some kinds of info
# messages from being echoed.

# Parameters: <#channel> [<key>] [<name>]

alias new_window_join_channel { 
	if ([$0]) {
#		^window new hide_others double on bind $0
		^window new hide_others split on bind $0
		update_status
		if ([$1]) {^join $0 $1} else {^join $0}
		if ([$2]) {^window name $2} else {^window name $0}
	} else { 
		kakehelp j
	}
}

alias new_window_query_nick {
	if ([$0]) {
#		^window new hide_others double on name $0 logfile IRClog-$0
		^window new hide_others split on name $0 logfile IRClog-$0
		update_status
		query $0
		if ([$1]) {
			@ arg = [$1]
			if (arg==[log]) {^window log on} else {kakehelp q}
	}
} else {
		kakehelp q
	}		
}

alias new_window_channel_msgs {
	^window new name msgs-$C hide_others double off logfile IRClog-$C-msgs
	^window log on add $sar(g/ /,/$onchannel())
	update_status
}

alias update_status {
	^window set status_format1 $status_format1
	^window set status_format2 $status_format2
	^window set status_clock $status_clock
	^window set status_umode $status_umode
	^window set status_away $status_away
	^window set status_channel $status_channel
	^window set status_mode $status_mode
	^window set status_query $status_query
	^window set status_notify $status_notify
	^window set status_mail $status_mail
	^window set status_topic $status_topic
}

alias kakehelp {
	@ command = [$0]
	if (command==[j]) { 
		echo $cparse("%RUsage: ${hwht}/J %R<${hwht}#channel%R> %n[%R<${hwht}key%R>%n] %n[%R<${hwht}name%R>%n] to join #channel in a window called `name' (or `#channel' if %R<$%nname%R>%n is omitted), using key `key' if specified, and hide all other windows.")
	} elsif (command==[q]) {
		echo $cparse("%RUsage: ${hwht}/Q %R<${hwht}nick%R> %n[${hwht}log%n] to open a query to nick in a new window, and hide all other windows. If the option `log' is appended, the conversation will be logged in ~/IRClog-nick.")
	} elsif (command==[msgwin]) {
		echo $cparse("%RUsage: ${hwht}/MSGWIN %n to open a window for msgs from everyone currently on channel, hide all other windows, and log things in ~/IRClog-<channel>-msgs.")
	} else {
	}
}

#############################################
#
# Startup
#
#############################################

^setstatus
^window split on
^window double off
^update_status

load logger.bx
load xmms.bx

load tangente.bx


#############################################
# 
# Crackrock Leftovers
# Don't know what these do. Timestamps set to red so I notice.
# 
#############################################

#set format_send_public_other ${hred}[$strip(APMapm $tr(/ //$Z))]%K(%w$2%K/%n$1%K)%n $3-
#set format_action_other ${hred}[$strip(APMapm $tr(/ //$Z))] $a.s %n$tolower($3)%K/%n$1 $mircansi($4-)
#set format_action_ar ${hred}[$strip(APMapm $tr(/ //$Z))] $format_action
#set format_action_other_ar ${hred}[$strip(APMapm $tr(/ //$Z))] $a.s %n$tolower($3)%K/%n$1 $mircansi($4-)
#set format_action_user ${hred}[$strip(APMapm $tr(/ //$Z))] $a.s %K(%W$1%K)%w $4-
#set format_action_user_ar ${hred}[$strip(APMapm $tr(/ //$Z))] $a.s %n$3%K/%n$1 $mircansi($4-)

# Wol's helpful stuff

#:: these are the highlighting and beeping.  They give red for food things
#:: and magenta for wol things.  They also include timestamping.
#:: I used to understand them but I think I've been workign too long 
#:: to figure them out at the moment.  Sowwy.

# Edit this 'ere - change "word" to your nickname, and use different
# capitalizations in the different lines. Add more if you need to.

#^on ^public "% % *shopping*" {echo ${hblk}[${cl}$strip(APMapm $tr(///$Z))${hblk}] <$(hmag)$0$(cl)> $2- �}
#^on ^public "% % *shop*" {echo ${hblk}[${cl}$strip(APMapm $tr(///$Z))${hblk}] <$(hmag)$0$(cl)> $2- �}

Screenshot

Kake.png

Exemple tiré de ankh.bx

Archive

ankh

Screenshot

Sur fond peach

Ankh.png

Voir aussi

Documentation

Aide intégrée à BitchX

Fondamentale vu le peu de doc disponible !

  • /ehelp pour avoir de l'aide par thème (aide interactive). C'est la plus grosse source de documentation si vous faites des scripts ou une configuration poussée.
  • /help cmd pour avoir un peu de renseignements (syntaxe, but) sur /cmd
    • /help tout seul liste toutes les commandes classiques (et il y en a)
  • /bhelp <topic|index> pour avoir une aide plus évoluée (aide externe)
    • /bhelp index liste toutes les commandes

Typiquement on fera /help topic ou /help ban mais /bhelp 4op ou /bhelp fuckem ... c'est une histoire de contexte vous comprenez...

Aide Linux

  • man BitchX
  • /usr/share/doc/bitchx/

Sur internet


ToDo

  • BitchX supporte CDCC/XDCC : vous pouvez faire serveur de fichiers !
  • BitchX supporte l'IPV6 :
    • /connect 2001:510:0:13::,
    • notez la virgule à la fin !
  • A l'origine BitchX était un script pour IrcII. Aussi une grosse partie de ce qui marche pour IrcII (commandes, alias, scripts) marchent sous BitchX. La doc étant pauvre côté BitchX, il faut ratisser large.
  • Il existe un package bitchx-gtk dans Debian... c'est à l'abandon et plutôt expérimental mais intéressant à tester


/set kick_ops off will protect ops from not being kicked when they do annoying things that my BitchX kick. /set annoy_kick on will kick on CAPS and mirc colors on channel except those protected.

/orignick yournick : tente de reprendre votre nickname toutes les 5 secondes /set orignick_time : 5 sec c'est trop lent ? :p /orignick - : pour le stopper



Les commandes

Listes des commandes

\#

Usage: /# or #
- Used to introduce comments in scripts
  Equivalent to `/:', but most people prefer `#'


4OP

Usage: /4OP <nick>
- Sets mode +oooo on <nick>


\:

Usage: /:
- Used to introduce comments in scripts
  Equivalent to `#', which is preferred


ABORT

Usage: /ABORT
- Saves BitchX settings then exits.


ABOUT

Usage: /ABOUT
- Shows ANSI screen with list of people who have contributed to
  BitchX


ADDFORWARD

Usage: /ADDFORWARD <channel|nick>
- Forward all messages to <channel|nick>
. See also /FORWARD, /UNFORWARD


ADDIDLE

Usage: /ADDIDLE <channel> [seconds]
- Adds <channel> as idle channel with [seconds]


ADDLAMENICK

Usage: /ADDLAMENICK <nick(s)>
- Adds <nick(s)> to you lame nicklist, bans nick!*@*


ADDNOFLOOD

Usage: /ADDNOFLOOD <nick>
- Adds <nick> to you no flood list


ADDSHIT

Usage: /ADDSHIT <nick|nick!user@hostname> <channel(s)|*>
  [shitlevel] [reason]
  Hint: <channel(s)> can be separated by `,'
- Add <nick|nick!user@hostname> to your shitlist on <channel|*>
  with [shitlevel] and for [reason]
. See /UNSHIT on how to remove <nick> from shitlist;
. and USERLEVELS for shit levels


ADDUSER

Usage: /ADDUSER [-ppp] <nick|nick!user@hostname> <channel(s)|*>
  <userlevel1,userlevel2,etc> [password]
  Hint: <channel(s)> can be separated by `,'
  Hint: Use -ppp to add *domain.com hosts
- Adds <nick|nick!user@hostname> on <channel|*> with [userlevels]
. See /UNUSER on how to remove <nick> from userlist;
. and USERLEVELS for user, auto-op and protection levels CTCP to
  understand valid CTCP commands which can be sent to gain
  privileges


ADDWORD

Usage: /ADDWORD <channel|*> <word(s)>
- Adds <word(s)> to wordlist, anyone saying it in <channel|*> will
  be kicked
. See /SHOWWORDKICK to list banned words;
. and /UNWORDKICK to remove banned words


ADMIN

Usage: /ADMIN [server]
- Shows the iRC Administration information on current server or
  [server]


AJOIN

Usage: /AJOIN <channel(s)>
- Add <channel(s)> to autojoin list.  Join <channel(s)> on startup
  or server change.


AJOINLIST

Usage: /AJOINLIST
- Displays the autojoin list


ALIAS



ASSIGN



AWAY

Usage: /AWAY [reason]
- Sets you away for [reason]
  You can later come /BACK


AWAYLOG

Usage: /AWAYLOG [type(s)]


       - Displays what [type(s)] of messages are being logged to lastlog.
  Multiple [type(s)] can be specified using `,'
. Available [type(s)]
 all 
 msgs
 notices
 .
 .
 .


sets



B

Usage: /B <nick|nick!user@hostname>
- Bans <nick|nick!user@hostname> from current channel
  Same as /BAN


BACK

Usage: /BACK
- Sets you as being back from going /AWAY


BAN

Usage: /BAN <nick|nick!user@hostname>
- Bans <nick|nick!user@hostname> from current channel
  Same as /B


BANSTAT

Usage: /BANSTAT [channel]
- Show bans on current channel or [channel]


BANTYPE

Usage: /BANTYPE <normal|better|host|domain|screw|IP>
- When a ban is done on a nick, it uses <bantype>


BANWORDS

Usage: /BANWORDS [channel|*] <word(s)>
- Adds word or words to the banned words list for <channel>


BEEP

Usage: /BEEP
- Create a beep noise (doesn't work if BEEP_ON_MESSAGES is set to 
  OFF)


BHELP

Usage: /BHELP <help|index|other>
- External help command for use with ~/.BitchX/BitchX.help


BIND

Usage: /BIND <?> <?> ...
- Command to bind a key to a function


BK

Usage: /BK <nick> [reason]
- Deops, bans and kicks <nick> for [reason]
  Same as /KB


BKI

Usage: /BKI <nick> [reason]
- Deops, bans, kicks and ignores<nick> for [reason]
  Same as /KBI


BLESS



BREAK



BYE

Usage: /BYE [text]
- Quits BitchX with message [text]
  Same as /EXIT and /QUIT


C

Usage: /C <mode>
- Set modes for current channel
  Available modes:
 xx: yy


CALL



CBOOT

Usage: /CBOOT <nick> [reason]
- Kicks a <nick> off the TwilightZone with [reason]


CD

Usage: /CD <dir>
- Changes current directory to <dir>


CDCC

Usage: /CDCC <<command> [arguments]>
. Available <command>s:
 CHANNEL   public timer channel
 DESCRIBE  change description of a packet
 DOFFER   delete pack from the offer list
 LIST   list the packs you have offered
 LOAD [file]  load packs saved to .cdcc.save or [file]
 MINSPEED  minspeed minspeed for cdcc ( #.##) [mintime in seconds]
 NOTICE   notify the channel of offered packs
 OFFER    add a pack to the offer list
 PLIST   publicly list your offered packs
 QUEUE   view entries in the send queue
 SAVE [file]  save your offerlist to .cdcc.save or [file]
 SEND   send a pack to user
 RESEND   re-send a pack to user
 TSEND   tdcc send a pack to user
 TRESEND   tcdcc resend a pack to user
 RESUME    mIRC resume
 TIMER   public list timer in minutes
 NOTE   add note to pack number
 TYPE   toggle between public and notice
 ECHO   toggle echo on/off
 STATS   display cdcc statistics
 SECURE   adds a password to a pack


CHANNEL

Usage: /CHANNEL
- Shows information on the channels, modes and server you are on


CHANST

Usage: /CHANST [-ALL] [channel]
- Shows statistics on current channel or [channel]


CHAT

Usage: /CHAT <nick>
- Attempts to DCC chat <nick>


CHGAOP

Usage: /CHAOP <nick> <auto-op level>
- Changes <auto-op level> of <nick> in userlist
. See USERLEVELS for auto-op levels


CHGCHAN

Usage: /CHGCAHN <nick> <channel>
- Changes <channel> of <nick> in userlist 
  Hint: `/ChgChan whoever #BitchX,#iRC' can add multiple channels


CHGLEVEL

Usage: /CHGLEVEL <nick> <level>
- Changes <level> of <nick> in userlist
. See USERLEVELS for user levels


CHGPASS

Usage: /CHGPASS <nick> <protection-level>


CHGPROT

Usage: /CHGPROT <nick> <protection-level>
- Changes <protection-level> of <nick> in userlist
. See USERLEVELS for protection levels


CHGUH

Usage: /CHGUH <nick> <userhost>
- Changes nick and hostname (?)


CHOPS

Usage: /CHOPS [types] [-sort type] [#channel]
- Shows, in a full format, all the nicks with op status
. Same as is the same as `/USER -ops'
. For [types] and [-sort types] - see /USER


CLEAR

Usage: /CLEAR
- Clears the screen


CLEARAUTO

Usage: /CLEARAUTO
- Clears all nicks in the auto-response list


CLEARLOCK

Usage: /CLEARLOCK <channel|*>
- Unlocks the mode lock on <channel>


CLEARTAB

Usage: /CLEARTAB
- Clears the nicks in the tabkey list


CLINK



CLONES

Usage: /CLONES [channel]
- Shows clones in current channel or [channel]


CMSG

Usage: /CMSG <nick> <text>
- While in the TwilightZone, a privat message will be sent to
  <nick> with <text>


CONNECT

Usage: /CONNECT <server1> <port> [server2]
- Connect <server1> to <port> from current server or [server2]


CONTINUE



CSAY

Usage: /CSAY <text>
- While in the TwilightZone, and being the hub of the DCC Chats,
  <text> will be sent out to all users on the Chat network


CSET

Usage: /CSET [variable] [value]
- Changes variables that affect a channel, or lists them if no
  arguments are given


CTCP

Usage: /CTCP <nick> <request>
- CTCP sends <nick> with <request>
. Available <request>s
 INVITE ask for an invite to <channel>
 OPS a legitimate way to gain ops
 WHOAMI request <nick> to display current attributes of me
 <other> ?
 XLINK ?


CTOGGLE

Usage: /CTOGGLE
- toggle the X-link commands, whatever they are. Probably the
  twilight zone stuff.


CWHO

Usage: /CWHO
- Lists the clients and bots connected to the TwilightZone


CWHOM



CYCLE

Usage: /CYCLE [channel]
- Parts current channel or [channel] and immediately rejoins


D

Usage: /D <nick|channel> <action>
- Describes to <nick|channel> with <action>
  Similar to /ME, but only directed at <nick|channel>
  Same as /DESCRIBE


DATE

Usage: /DATE
- Shows current time and date from current server


DBAN

Usage: /DBAN
- Clears all the bans on the current channel


DC

Usage: /DC <nick>
- Starts DCC Chat with <nick>


DCA

Usage: /DCA
- Kills all DCC connections


DCC

Usage: /DCC [<command> [arguments]]
- Displays an active DCC list
. <command> switches:auto <on|off> overwrite <on|off>
   paths <on|off> quiet <on|off>
. Available <command>s:
 ACTIVECOUNT
 AUTOGET
 AUTOOVERWRITE
 AUTORENAME
 BOT
 CHAT [nick] starts a DCC chat connection
 CLOSE
 CLOSEALL
 EXEMPT
 FTP
 GET
 HELP
 LIST
 QUIETMODE
 REGET
 RENAME
 RESEND [nick(s)] [-b block] [-e passwd] [-p port] filename(s)
   resend a list of files to [nick(s)]
   [nick(s)] are comma-separated
 RESUME
 SEND [nick(s)] [-b block] [-e passwd] [-p port] filename(s)
   send a list of files to [nick(s)]
   [nick(s)] are comma-separated
 SHOWPATHS
 STATS
 TGET
 TSEND [nick(s)] [-b block] [-e passwd] [-p port] filename(s)
   TDCC(?) send a list of files to [nick(s)]
   [nick(s)] are comma-separated
 TREGET
 TRESEND


DCG

Usage: /DCG <nick>
- Close a DCC GET from <nick>


DCS

Usage: /DCS <nick>
- Kills all DCC SENDs to <nick>


DCX

Usage: /DCX <nick> 
- Close a DCC CHAT with <nick>


DEBUG

Usage: /DEBUG [flags]
- Sets debugging flags in the client


DEBUGFUNC



DEBUGHASH



DEBUGMSG



DEBUGUSER



DEOP

Usage: /DEOP <nick>
- Remove operator status from <nick>
  Same as `/MODE <nick> -o'
  Same as /DOP


DEOPER

Usage: /DEOPER
- Removes operator status


DESCRIBE

Usage: /DESCRIBE <nick|channel> <action>
- Describes to <nick|channel> with <action>
  Similar to /ME, but only directed at <nick|channel>
  Same as /D


DETACH

Usage: /DETACH
- For use with Unix `screen' program.  Allows you to disconnect
  while still having BitchX running.


DEVOICE

Usage: /DEVOICE <nick>
- De-voices <nick>


DF

Usage: /DF
- Show disk space usage


DIE

Usage: /DIE
- Kills the IRC server you are on


DISCONNECT

Usage: /DISCONNECT
- Disconnects you from the current server


DME

Usage: /DME <text>
- Sends an action to a DCC
. See also /ME


DNS

Usage: /DNS <nick|hostname>
- Attempts to do an nslookup on <nick>'s hostname or <hostname>


DO



DOP

Usage: /DOP <nick>
- Remove operator status from <nick>
  Same as `/MODE <nick> -o'
  Same as /DEOP


DS

Usage: /DS
- Shows some DCC file transfer stats


DUMP

Usage: /DUMP <type>
- Dump <type> to screen
. Available <type>s: Alias All Bind File On Var


ECHO

Usage: /ECHO <text>
- Echoes <text> to the screen


EHELP



ENCRYPT



EVAL

Usage: /EVAL <command>
- Forces BitchX to expand functions
  Examples:
 /eval echo Server: $S
 /eval say I'm using $J
 /eval msg Power I've been online for $uptime()


EVALSERVER

Usage: /EVALSERVER <refnum> <command>
- Sends command to reference numbered server


EXEC

Usage: /EXEC <command>
- Executes <command> with the shell set in SHELL


EXIT

Usage: /EXIT [text]
- Quits BitchX with message [text]
  Same as /BYE and /QUIT


FE



FEC



FILEDIALOG



FINGER

Usage: /FINGER <nick>
- Fetches finger info on <nick>


FK

Usage: /FK <nick!user@hostname> [reason]
- Finds clients matching <nick!user@hostname> and kicks them from
  the channel for [reason]


FLUSH

Usage: /FLUSH
- Flushes all iRC server output


FONTDIALOG

Usage: /FONTDIALOG
- Opens font dialog (what client is this?)


FOR



FOREACH



FORWARD

Usage: /FORWARD <nick>
- Forwards all messages to <nick>
. See also /UNFORWARD


FPORTS

Usage: /FPORTS <hostname> [<lowport> <highport>}
- Attempts to find open ports on <hostname> between
  [<highport> and <lowport>]
  Default range is 6660-7000 (IRC server range)


FPROT

Usage: /FPROT
- Toggles flood protection on or off


FSET

Usage: /FSET <format> <string>
- Sets a <format> to <string>


FTP

Usage: /FTP
- Opens an FTP client in a virtual screen
. Usee ^[<#> to switch through numbered virtual screens


FUCK

Usage: /FUCK <nick> [reason]
- Deops, kicks, and bans <nick> for [reason]  Also adds <nick> to
  shitlist at level 3


FUCKEM

Usage: /FUCKEM
- Bans *!*a*@* thru *!*z*@* on current channel


GONE



HASH



HELP

Usage: /HELP [command]
- Gives help on [command], some of the time.


HISTORY

Usage: /HISTORY
- Shows recently typed commands


HOOK



HOST

Usage: /HOST [nick]
- Show the host which [nick] is running on or your host if no nick
  is specified


HOSTNAME

Usage: /HOSTNAME [host]
- Change virtual hostname on IRC to [host] or list available
  hostnames if nothing is specified


I

Usage: /I <nick> [channel]
- Invites <nick> to current channel or [channel]
  Same as /INVITE


IF



IG

Usage: /IG +|-<nick>
- Ignores ALL except crap and public of nick!host matching <nick>


IGH

Usage: /IGH +|-<nick>
- Ignores ALL except crap and public of host matching <nick>


IGHT

Usage: /IGHT +|-<nick>
- Ignores ALL except crap and public of host matching <nick>
  for IGNORE_TIME minutes


IGNORE

Usage: /IGNORE +|-|^<nick> [what]
- Ignores ALL except crap and public of <nick> or specify [what] 
  to ignore


IGT

Usage: /IGT +|-<nick>
- Ignores ALL except crap and public of nick!host matching <nick>
  for IGNORE_TIME minutes


INFO

Usage: /INFO
- Shows current client info (an ANSI screen)


INPUT



INPUT_CHAR



INVITE

Usage: /INVITE <nick> [channel]
- Invites <nick> to current channel or [channel]
  Same as /I


IRCHOST

Usage: /IRCHOST [hostname]
- Shows a list of possible hostnames or changes current client
  hostname to [hostname]


IRCNAME

Usage: /IRCNAME <text>
- Changes your IRC name to <text> upon next connect


IRCUSER

Usage: /IRCUSER <username>
- Changes your username to <username>


ISON

Usage: /ISON <nick(s)>
- Shows which <nick(s)> are currently online


J

Usage: /J <channel> [key]
- Joins a <channel>, using [key] if required
  Same as /JOIN


JNW

Usage: /JNW <channel>
- Joins <channel> and puts it in a new window (split screen)


JOIN

Usage: /JOIN <channel> [key]
- Joins a <channel>, using [key] if required
  Same as /J


K

Usage: /K <nick> [reason]
- Kick <nick> out of the current channel for [reason]


KB

Usage: /KB <nick> [reason]
- Deops, bans and kicks <nick> for [reason]
  Same as /BK


KBI

Usage: /KBI <nick> [reason]
- Deops, bans, kicks and ignores<nick> for [reason]
  Same as /BKI


KICK

Usage: /KICK <channel|*> <nick> [reason]
- Kick <nick> out of <channel> for [reason]


KICKIDLE

Usage: /KICKIDLE <channel>
- Kicks all idle people on <channel> (everyone?)


KILL



KNOCK



L

Usage: /L <channel>
- Leaves current channel or <channel>
  Same as /LEAVE and /PART


LAMENICKLIST

Usage: /LAMENICKLIST
- Displays your lame nick list


LASTLOG

Usage: /LASTLOG [level|command [arguments]]
- Shows the last few pages of output
. If [level] is specified, shows messages of [level]
  default is ALL
. Available [command]s
 -file <filename> Save to <filename>
 -clear
 -max <#>
 -liternal <pat>
 -beep


LEAVE

Usage: /LEAVE <channel>
- Leaves current channel or <channel>
  Same as /L and /PART


LINKS

Usage: /LINKS
- Shows servers and links to other servers


LIST

Usage: /LIST [-YES]
- Lists all channels


LISTDLL

Usage: /LISTDLL
- List currently loaded DLLs


LK

Usage: /LK [reason]
- Kicks all non-operators (nicks without +o mode) for [reason]


LKW

Usage: /LKW [channel]
- Leaves current channel or [channel] and kills the window
  (split-screen) it was in


LLOOK

Usage: /LLOOK
  Requires that LLOOK be set to ON
- Lists all the servers which are current split from the IRC
  network


LOAD

Usage: /LOAD <script>
- Load <script> into memory


LOADDLL

Usage: /LOADDLL <filename.so>
- Load the DLL module


LOADTCL

Usage: /LOADTCL <filename.tcl>
- Load the TCL module, must be running a TCL version of BitchX


LOCAL



LS

Usage: /LS [arguments]
- lists files by executing `ls [arguments]'


LUSERS

Usage: /LUSERS
- Shows stats of users on current server


M

Usage: /M [=]<nick> <text>
- Send <nick> a message with <text>
  Sending to =<nick> opens DCC Chat (?)
  Same as /MSG


MAP

Usage: /MAP
- Displays a map of current servers


MB

Usage: /MB
- Mass bans everybody on current channel


MD

Usage: /MD
- Mass deops everybody on current channel
  Same as /MDOP


MDOP

Usage: /MDOP
- Mass deops everybody on current channel
  Same as /MD


MDVOICE

Usage: /MDVOICE
- Mass devoice everyone in current channel


ME

Usage: /ME <action>
- Sends an <action> to current channel.
  i.e. `/me barfs' produces `<my_nick> barfs'


MENU



MENUITEM



MESG

Usage: /MESG <yes|no||on|of>
- Enables/disables messages (?)


MK

Usage: /MK
- Mass kick on current channel


MKB

Usage: /MKB (?)
- Mass kick and ban of everyone on current channel


MKNU

Usage: /MKNU
- Mass kick non-users


MODE

Usage: /MODE <#channel|nick> +|-<mode>
- Gives/removes <mode> to/from <#channel> or <nick>
  Possible modes:
 o: Operator status
 i:
 w:



MODELOCK

Usage: /MODELOCK <channel> +|-<instampkl #>
- Locks <channel> with <modes>


MOP

Usage: /MOP
- Mass ops current channel


MORE

Usage: /MORE [filename]
- Displays [filename] a page at a time


MOTD

/Usage: /MOTD [server]
- Print the message of the day on the current server or [server]


MSAY

/Usage: /MSAY <text>
- Sends a message to every channel you are on
. See also /SAY


MSG

/MSG <[=]nick> <text>
- Send <nick> a message with <text>
  Sending to <=nick> opens DCC Chat (?)
  Same as /M


MTOPIC



MUB

Usage: /MUB
- Mass unbans current channel


MULT

Usage: /MULT <nick(s)>
- Multikicks <nick(s)> 


MVOICE

Usage: /MVOICE [nick|channel|nick!user@hostname]
- Mass voices matching [nick|channel|nick!user@hostname]


N

Usage: /N
- Shown members of current channel
  Like /NAMES, but only for current channel
  Same as /SC and /SCAN


NAMES

Usage: /NAMES [-YES|channel]
- Shows names of users on [channel] or lists all users in all
  channels if -YES is appended


NEWNICK

Usage: /NEWNICK <nick> <username>
- Changes your <nick> and <username>


NEWUSER

Usage: /NEWUSER <username>
- Changes your <username>


NICK

Usage: /NICK <nickname>
- Changes your nick to <nickname>


NOCHAT

Usage: /NOCHAT <nick>
- Kills chat request from <nick>


NOPS

Usage: /NOPS [types] [-sort type] [#channel]
- Shows, in a full format, all the nicks without op status
. Same as `/USER -nonops'
. For [types] and [-sort types] - see USER


NOTE

Obsolete


NOTICE

Usage: /NOTICE <nick|channel> <text>
- Sends a <notice> to <nick|channel>


NOTIFY

Usage: /NOTIFY [-]<nick>
- Adds <nick> to your notify list or removes if -<nick>


NSLOOKUP

Usage: /NSLOOKUP <hostname>
- Returns the hostname and IP addresses for <hostname>


NWHOIS

Usage: /NWHOIS [nick]
- Shows internal whois information for [nick] or the current
  channel


NWHOWAS

Usage: /NWHOWAS
- Shows internal whowas information for all channels
  Data expires in 20 minutes for userlist, 10 minutes for others


OFFERS

Usage: /offers [channel]
- XDCC LISTs the current channel or [channel]


ON



OOPS

Usage: /OOPS <nick>
- Sends an oops message to last recipient of a message and sends
  the correct message to <nick>


OP

Usage: /OP <nick>
- Gives operator privileges (+o) to <nick>
  Same as `/MODE <nick> +o'


OPER

Usage: /OPER <nick> [password]
- Grant operator status to <nick> with [password]


ORIGNICK

Usage: /ORIGNICK <nick>
- Attempt to regain a nick someone has taken from you


OSTAT

Usage: /OSTAT
- Displays a list of server statistics regarding:
 Bot Alarms Client Exits Client Floods Fake ModesHigh
 Traffic Invalid User New K: Lines Nick CollisionsNormal
 Traffic Oper Kills Oper Requests Possible BotsServer
 Rehash Stats Requests Total Clients UnAuth


OV

Usage: /OV [on|off] [--hide|+hide|hide]
- Turns on/off operator view window as well as creating hidden
  window


P

Usage: /P <nick>
- Pings <nick> with CTCP ping
  Same as /PING


PARSEKEY



PART



PARTALL



PASTE

Usage: /PASTE <num|range> [-win #] [nick|#chan]
- Pastes <num|range> of scrollback buffer from [-win #] to 
[nick|#chan] in ansi
. Example `/paste 5' will paste line 5 of your scrollback
. Example `/paste 1-8' will paste lines 1 through 8 of your
 scrollback
. Related Format: FORMAT_PASTE
. Related Hook: paste


PAUSE



PING

Usage: /PING <nick>
- Pings <nick> with CTCP ping
  Same as /P


POP



PRETEND



PS

Usage: /PS [arguments]
- Show active processes on local machine by executing the
  command `ps [arguments]'


PURGE

Usage: /PURGE <variable>
- Completely removes all traces of a variable or variable
  structure


PUSH



Q

Usage: /Q <-cmd cmdname> <nick>
- Starts a query to <nick>
  Same as /QUERY


QME

Usage: /QME <text>
- Sends an action to a query
. See also /ME


QUERY

Usage: /Q <-cmd cmdname> <nick>
- Starts a query to <nick>
  Same as /QUERY


QUEUE

Usage: /QUEUE
- Shows current queue


QUIT

Usage: /QUIT [text]
- Quits BitchX with message [text]
  Same as /BYE and /EXIT


QUOTE

Usage: /QUOTE <command>
- Sends raw commands to the IRC server


RANDOMNICK

Usage: /RANDOMNICK <nick>
- Changes your nick to a random nick.  If <nick> is specified, it
  is used as a prefix


RBIND

Usage: /RBIND <?> <?> ...
- Removes a key binding


READLOG

Usage: /READLOG
- Displays current /AWAY log


RECONNECT

Usage: /RECONNECT
- Reconnects you to current server


REDIRECT

Usage: /REDIRECT <nick|channel> <command>
- Redirects <command> to <nick|channel>


REHASH

Usage: /REHASH
Rehashs ircd.conf for new configuration


REINIT

Usage: /REINIT
- Reinitializes local variables


REINITSTAT

Usage: /REINITSTAT
- Reinitializes window variables


REL

Usage: /REL -<command> [#] <nick|channel>
. <command> is one of the following: -kick -wall -notice -msg
   -wallop -topic -kill -kboot -ansi -list
. If the list supports more than one saved message then [#] can be
  from 0-9


RELC

Usage: /RELC
- Displays the last CTCP comand issued


RELCR

Usage: /RELCR
- Displays the last CTCP reply message received


RELCRT

Usage: /RELCRT
- Changes the topic to the last CTCP reply message received


RELCT

Usage: /RELCT
- Changes the topic to the last CTCP command issued


RELD

Usage: /RELD
- Displays the last DCC message received


RELDT

Usage: /RELDT
- Changes the topic to the last DCC message received


RELI

Usage: /RELI
- Displays the last /INVITE message received


RELIT

Usage: /RELIT
- Changes the topic to the last /INVITE message received


RELM

Usage: /RELM <nick|channel> [-l [#]]
- Reedirects last received /MSG to <nick|channel>
. Appending -l will show the last 10 messages or message number [#]


RELMT

Usage: /RELMT
- Changes the toic to the last received /MSG


RELN

Usage: /RELN <nick|channel>
- Reedirects last received /NOTICE to <nick|channel>
. Appending -l will show the last 10 notices or notice number [#]


RELNT

Usage: /RELNT
- Changes the topic to the last received /NOTICE


RELOAD

Usage: /RELOAD
- Reload the configuration from ~/.BitchX/BitchX.sav


RELS

Usage: /RELS <nick|channel>
- Redirects last received server notice to <nick|channel>
. Appending -l will show the last 10 notices or notice number [#]


RELSD



RELSDT



RELSM

Usage: /RELSM <nick|channel>
- Redirects last sent /MSG to <nick|channel>


RELSMT

Usage: /RELSMT
- Changes the topic to the last sent /MSG


RELSN

Usage: /RELSN <nick|channel>
- Redirects last sent /NOTICE to <nick|channel>


RELSNT

Usage: /RELSNT
- Changes the topic to the last sent /NOTICE


RELST

Usage: /RELST
- Displays the last topic issued by you


RELSTT

Usage: /RELSTT
- Changes the topic to the last topic issued by you


RELSW



RELSWT



RELT

Usage: /RELT
- Displays the current topic in the current channel


RELTT



RELW

Usage: /RELW
- Displays the last /WALLOP message received


RELWT

Usage: /RELW
- Changes the topic to the last /WALLOP message received


REMLOG

Usage: /REMLOG
- Remove the logfile


REPEAT

Usage: /REPEAT <times> <command>
- Repeats <command> <times> times


REQUEST

Usage: /REQUEST <nick|channel> <request>
- Sends CTCP <request> to <nick|channel>


RESET



RESTART

Usage: /RESTART
- Restarts IRC server


RETURN



RMAP

Usage: /RMAP
- Sends out a /MAP command to the server


RPING

Usage: /RPING <?> <?> ...
- A new kind of ping ?


SAVE

Usage: /SAVE
- Save the current configuration into ~/.BitchX/BitchX.sav
  Same as /SAVELIST
  Compare with /SAVEIRC


SAVEIRC

Usage: /SAVEIRC
- Save the current configuration into ~/.bitchxrc


SAVELIST

Usage: /SAVE
- Save the current configuration into ~/.BitchX/BitchX.sav
  Same as /SAVE
  Compare with /SAVEIRC


SAY

Usage: /SAY <text>
- Sends a message to the current channel
  Same as /SEND and /SENDLINE


SC

Usage: /SC
- Shown members of current channel
  Like /NAMES, but only for current channel
  Same as /N and /SCAN


SCAN

Usage: /SCAN [channel]
- Scans current channel or [channel] for all nicks
  Same as /N and /SC


SCANB

Usage: /SCANB [channel]
- Scans current channel or [channel] for bots in your botlist


SCANF

Usage: /SCANF [channel]
- Scans current channel or [channel] for friends


SCANI

Usage: /SCANI [channel]
- Scans current channel or [channel] for ircops
. Same as /SCANO


SCANN

Usage: /SCANN [channel]
- Scans current channel or [channel] for non-ops


SCANO

Usage: /SCANO [channel]
- Scans current channel or [channel] for ops
. Same as /SCANI


SCANS

Usage: /SCANS [channel]
- Scans current channel or [channel] for shitlisted nicks


SCANV

Usage: /SCANV [channel]
- Scans current channel or [channel] for voiced nicks


SEND

Usage: /SEND <text>
- Sends a message to the current channel
  Same as /SAY and /SENDLINE


SENDLINE

Usage: /SENDLINE <text>
- Sends a message to the current channel
  Same as /SAY and /SEND


SERVER

Usage: /SERVER [server]
- Change to [server], or see a list of previously connected-to
  servers


SERVLIST



SET

Usage: /SET [variable] [value]
- Set the [value] of [variable].  If no variable is specified, all
  settings will be listed.
  See also /CSET


SETAR

Usage: /SETAR <-|d|pat1 pat2 ..>
- Adds or removes from your auto-response


SETENV

Usage: /SETENV <variable> [value]
- Sets an environment variable (for use with /EXEC)
. Example: /SETENV A 14
    /EXEC echo $A


SHIFT



SHITLIST



SHOOK

Usage: /SHOOK <?> <?> ... 
- Inserts a fake hook for a given type


SHOWIDLE

Usage: /SHOWIDLE [-sort type] [#channel]
- Shows idle people on current channel or [#channel]
  Valid -sort types: time host ip nick none
  Default sort type is `nick'


SHOWLOCK

Usage: /SHOWLOCK
- Show the mode locks on the current channel


SHOWSPLIT

Usage: /SHOWSPLIT
- Show current network splits


SHOWWORDKICK

Usage: /SHOWWORDKICK
- Show the list of banned words
  Same as /WORDLIST ?


SLEEP



SPAM



SPING

Usage: /SPING <server>
- See how lagged it is to <server>


SQUERY



SQUIT

Usage: /SQUIT <server1> [server2]
- Disconnects <server1> from current server or [server2]


STACK



STATS

Usage: /STATS [command] [server]
- Shows stats specified by [command] for current server or
  [server]


STUB



SUBMENU



SV

Usage: /SV <#channel|nick>
- Show client version information of <#channel|nick>


SWALLOP



SWATCH

Usage: /SWATCH
- Display or modify what messages you want to see from the server


SWITCH



T

Usage: /T <text>
- Sets the topic of the current channel to <text>
  Same as /TOPIC ????


TBAN

Usage: /TBAN
- Interactive channel ban delete


TCL



TIGNORE



TIME

Usage: /TIME
- Shows current time and date on server


TIMER

Usage: /TIMER [-del #] [-ref #] [-rep #] <delay> <command>
- To delete an active timer, type
 /TIMER -del <refnum>
  To make a timer loop indefinately, type
 /TIMER -rep -1 <delay> <command>


TLOCK



TOGGLE



TOPIC



TRACE

Usage: /TRACE [arguments] [server]
- Without a specified server, shows current connections on local
  server.
. Arguments:
 -s: trace for servers
 -u: trace for users
 -o: trace for ops


TRACEKILL



TRACESERV



TYPE



U

Usage: /U [type] [-sort type] [#channel|nick!user@host]
- Displays information about a user or performs an action on a
  user or class of users.  
. Valid [type]s:
 -ops   performs actions on the ops
 -nonops   performs actions on the nonops
 -msg   sends a msg
 -notice   sends a notice
 -nkill   kills everyone but these matching hosts
 -kill   kills matching
 -kick   kicks matching
 -stats   shows the stats on the matching
 -ips   displays list of ips
. Valid [-sort type]s: time host ip nick none
  Default sort type is `host'
. [nick!user@host] can be a wildcarded nick!user@host. *!*@* is
  the default.
. Example: `/U -kick -nonops *!*@*'  mass kick of nonops
. Example: `/U -msg -ops *!*@*.net Hi all you .net ops' 
. Same as /USER


UB

Usage: /UB [nick]
- Unbans [nick] from current channel, or unbans all nicks if no
  arguments are given
  Same as /UNBAN


UMODE

Usage: /UMODE +|-<mode(s)>
- Sets <mode(s)> on yourself


UNAJOIN

Usage: /UNAJOIN <channel>
- Removes <channel> from auto-join list


UNBAN

Usage: /UNBAN [nick]
- Unbans [nick] from current channel, or unbans all nicks if no
  arguments are given
  Same as /UB


UNBANWORD

Usage: /UNBANWORD <word>
- Removes <word> from list of banned words


UNFORWARD

Usage: /UNFORWARD <nick|channel>
- Remove <nick|channel> from forward list


UNIDLE

Usage: /UNIDLE <channel>
- Removes <channel> from idle list


UNIG

Usage: /UNIG <nick>
- Unignores <nick>


UNIGH

Usage: /UNIG <nick>
- Removes <nick>'s host from ignore list


UNKEY

Usage: /UNKEY
- Removes channel key from current channel


UNLAMENICK

Usage: /UNLAMENICK <nick(s)>
- Removes <nick(s)> from your lame nick list


UNLESS



UNLOAD

Usage: /UNLOAD
- Unloads all scripts and returns BitchX to `stock'


UNLOADDLL

Usage: /UNLOADDLL
- Unloads loaded DLLs


UNSCREW

Usage: /UNSCREW <nick>
- Unscrews <nick>


UNSHIFT



UNSHIT

Usage: /UNSHIT <nick> <channel>
- Removes <nick> in <channel> from your shitlist


UNTIL



UNTOPIC

Usage: /UNTOPIC [channel]
- Removes topic from current channel or [channel]


UNUSER

Usage: /UNUSER <nick|nick!user@hostname> <channel|*>
- Removes <nick|nick!user@hostname> in <channel> from your
  userlist


UNVOICE

Usage: /UNVOICE [channel] <nick>
- Removes voice status from <nick> on [channel] or current channel


UNWORDKICK

Usage: /UNWORDKICK <#channel> <word>
- Removes <word> from list of banned words for <channel>


UPING

Usage: /UPING <nick>
- Sends an improved ping to <nick>


UPTIME

Usage: /UPTIME
- Displays the uptime of the client and other information


URL

Usage: /URL [http <on|off>] [ftp <on|off>] [list] [save <#>]
- Enables/disable catching of http & ftp urls and can [list] or
  [save] them


USAGE

Usage: /USAGE
- Shows the memory usage of the local machine


USER

Usage: /USER [type] [-sort type] [#channel|nick!user@host]
- Displays information about a user or performs an action on a
  user or class of users.  
. Valid [type]s:
 -ops   performs actions on the ops
 -nonops   performs actions on the nonops
 -msg   sends a msg
 -notice   sends a notice
 -nkill   kills everyone but these matching hosts
 -kill   kills matching
 -kick   kicks matching
 -stats   shows the stats on the matching
 -ips   displays list of ips
. Valid [-sort type]s: time host ip nick none
  Default sort type is `host'
. [nick!user@host] can be a wildcarded nick!user@host. *!*@* is
  the default.
. Example: `/user -kick -nonops *!*@*'  mass kick of nonops
. Example: `/user -msg -ops *!*@*.net Hi all you .net ops' 
. Same as /U


USERHOST



USERINFO

Usage: /USERINFO <nick> [comment]
- Sets the userinfo [comment] of <nick>, or removes it if no
  comment is specified


USERIP

Usage: /USERIP <nick>
- Returns the IP or hostname of <nick>


USERLIST

Usage: /USERLIST
- Lists all the users in your userlist


USERS

Usage: /USERS
- Gives statistics about users on the server/network


USERSHOW

Usage: /USERSHOW
- Shows the userinfo for your userlist.


USLEEP



VER

Usage: /VER [nick|channel]
- Sends CTCP VERSION request to current channel or [nick|channel]


VERSION

Usage: /VERSION
- Shows client, script, and server versions


VOICE

Usage: /VOICE [channel] <nick>
- Gives voice status to <nick> on [channel] or current channel


W

Usage: /WHO
- Lists who is in the current channel
  Same as /W


WAIT



WALL

Usage: /WALL <message>
- Sends <message> to ops on current channel
  Same as /WALLMSG


WALLCHOPS



WALLMSG

Usage: /WALLMSG <message>
- Sends <message> to ops on current channel
  Same as /WALL


WALLOPS



WHICH

Usage: /WHICH <file>
- Determines which <file> was loaded with the /LOAD command


WHILE



WHO

Usage: /WHO
- Lists who is in the current channel
  Same as /W


WHOIS

Usage: /WHOIS [nick]
- Gets information about [nick] from server or yourself if no
  arguments are given.


WHOKILL

Usage: /WHOKILL <nick!user@hostname> [reason]
- Kills multiple clients matching the filter <nick!user@hostname>
  for [reason]


WHOLEFT

Usage: /WHOLEFT
- Display who split away after a netsplit


WHOWAS

Usage: /WHOWAS [nick]
- Much like /WHOIS, but gets information about recently departed
  [nick]


WI

Usage: /WI [nick]
- Gets /WHOIS information about [nick] or yourself if no arguments
  are given.


WII

Usage: /WI [nick]
- Gets /WHOIS information from user's server about [nick] or
  yourself if no arguments are given.  Shows idle time of a remote
  user.


WILM



WILN



WINDOW

Usage: /WINDOW [command [arguments]]
 ADD [nick(s)|channel]
   adds the [nick(s)|channel] to display in a
   window.
   [nick(s)] can be comma-separated
 BACK  Moves you back one window
 BALANCE  Balances the displayed windows
 BEEP_ALWAYS [on|off|toggle]
   Turns BEEP_ALWAYS on, off, or toggles
   the value
 BIND [channel] Binds a channel to a window
 CHANNEL [channel(s)]
   Attempts to join [channel(s)] in the
   current window.
   [channel(s) can be comma-separated
 CREATE  Create a new screen using wserv in X-windows
 DELETE  Kill a screen using wserv in X-Windows
 DESCRIBE [option]
   Displays/sets information of current window
 DISCON  Disconnects current window from the server
 DOUBLE  Turns the status bar on, off, or toggle
 ECHO [text] Echo [text] to the current window
 FIXED [on|off|toggle]
   Turns fixed window sizing on, off, toggle
 GOTO <#> Goes to window numbered <#> 
 GROW <#> Grows the current window <#> lines
 HELP [command] Get help for [command] or list all of them
 HIDE  Hides the current window
 HIDE_OTHERS Hides all windows other than the current one
 HOLD_MODE [on|off|toggle]
   Turns hold mode on, off, or toggle
 KILL  Kill the current window
 KILL_OTHERS Kills all windows other than the current one
 KILLSWAP Swaps the current window with the last one
   hidden and kills the swapped out window
 LAST  Places you in the last window you were in
 LASTLOG <#> Sets this window's lastlog size to <#>
 LASTLOG_LEVEL [level]
   Sets the current window's lastlog [level]
 LEVEL [level] Sets the window's level to [level]
 LIST  Displays the list of windows
 LOG  Turns window logging on, off, or toggle
 LOGFILE [filename]
   Sets the [filename] for the current
   window's logfile
 MENU [name] Associate a menu with the current window
 MOVE [#] Moves the current window [#] times  
 NAME [text] Sets the current window's name
 NEW  Creates a new window
 NEW_HIDE Creates a new hidden window
 NEXT  Goes to the next numbered window
 NOSERV  Turns the server off for this window
 NOTIFY [on|off|toggle]
   Turns notify on, off, or toggles
 NOTIFY_LEVEL [level]
   Sets the current window`s notification [level]
 NUMBER <#> Sets the current window's refnum to <#>
 POP  Pops the top window off the window stack.
   If hidden it's made visible
 PREVIOUS Goes to the previous numbered window
 PROMPT [text] Sets the current window's prompt to [text]
 PUSH [#] Places the current window or specified
   window on the window stack
 QUERY  Add/remove query for current window
 REFNUM [#] Changes the current window to [#]
 REFRESH  refreshes the current window
 REMOVE [nick(s)|channel]
   remove [nick(s)|channel] from current
   window's display
 SERVER [server] Connects current window to new server
 SET [variable [value]]
   Display/set window variables
   Same as /WSET
 SCRATCH  Create a scratch window (no scrollback/scroll)
 SCROLLBACK [lines]
   Sets the scrollback length for this window 
 SHOW <#> Makes window <#> visible again
 SHOW_ALL Makes all hidden windows visible again
 SHRINK <#> Shrinks the current window by <#> lines
 SIZE <#> Sets the current window size to <#> lines
 SKIP [on|off|toggle]
   Sets the current window's skip status to
   on, off, or toggles the value
 SPLIT [on|off|toggle]
   Sets whether a status line should appear
   at the top of the screen or not 
 STACK  Lists the windows added to the window 
   stack using /window push
 STATUS_SPECIAL [text]
   A special window format
 SWAP <#> Swap the current window with the number <#>
 TRIPLE [on|off|toggle]
   Turns 3-line statusbar on, off, or toggle
 UNBIND [channel]
   Removes current channel or [channel] bound
   to current window
 UPDATE  Updates the window status on all windows
. Shortcuts: 
 ^W- Shrinks current window 1 line
 ^W+ Grows current window 1 line
 ^Wm Moves current window down 1 line
 ^Wl Lists current windows
 ^Wk Kills current window
 ^Wh Hides current window
 ^Wb Balances window sizes
 ^Wn Swaps to next window
 ^Wp Swaps to previous window
 ^W# (?) Shos window number (1-4)



WORDLIST

Usage: /WORDLIST
- Show the list of banned words
  Same as /SHOWWORDKICK ?


WSET

Usage: /WSET [variable [value]]
- Display or change [variable]s that affect the window


WW

Usage: /WW [nick]
- Much like /WHOIS, but gets information about recently departed
  [nick]
  Same as /WHOWAS


XDEBUG



XECHO



XEVAL



XQUOTE



XTRA



XTYPE


Liste des fonctions internes

On peut les appeler ! Exemple :/eval echo $cparse("%Bblue%n")

absstrlen

   Function
       $absstrlen()
   Usage
       $absstrlen(text)
   Returns
       the absolute length of text, which is how long it would be on your screen
   Example
       $absstrlen($cparse(%Fasdf)) returns 4, where $strlen($cparse(%Fasdf)) returns 12


addtabkey

   Function
       $addtabkey()
   Usage
       $addtabkey(nick array)
   Returns
       nothing; adds the given nick to the list cycled through when the tab key is pressed. If the array is given, the nick is added to the autoreply array and otherwise to the msglist array.


after

   Function
       $after()
   Usage
       $after(chats string of text)
   Returns
       the part of "string of text" that occurs after the first instance of any character in "chars"
   Example
       $after(! hop!jnelson@example.org) returns "jnelson@example.org"


afterw

   Function
       $afterw()
   Usage
       $afterw(number words)
   Returns
       the string after the word being matched


aliasctl

   Function
       $aliasctl()
   Notes
       This function allows low-level manipulation of aliases and assigns. The noun of the action is either "alias" or "assign". The verb is either "get", "set", or "match". The "lval" must a valid variable name. The "rval" is used only if the verb is "set", and is any sequence of octets.
   Usage
       $aliactl(alias|assign get|set|match <lval> [<rval>])


annoy

   Function
       $annoy()
   Usage
       $annoy(text)
   Returns
       "text" parsed through bX's "annoy" text parser
   Example
       $annoy(this is annoy text) returns random annoy text ;)


ascii

   Note
       the arguments of $ascii() are NOT whitespaced.
   Function
       $ascii()
   Usage
       $ascii(char [char2] ... [charN])
   Returns
       the ASCII value of the given chars
   Example
       $ascii(xyz) returns "120 121 122"


banonchannel

   Function
       $banonchannel()
   Usage
       $banonchannel(channel ban)
   Returns
       0 if the ban does not exist on the channel, 1 if it does
   Example
       $banonchannel(#bitchx *!*@*mirc*) returns 1 ;)


bcopy

   Note
       Binary copy a file. Takes two numbers. Both have to be open file descriptors from $open()
   Function
       $bcopy()
   Usage
       $bcopy(num num)
   Returns
       1 on error, 0 on success


before

   Function
       $before()
   Usage
       $before(chars string of text)
   Returns
       the part of "string of text" that occurs before the first instance of any character in "chars"
   Example
       $before(! hop!jnelson@iastate.edu) returns "hop"


beforew

   Function
       $beforew()
   Usage
       $beforew(pattern string of words)
   Returns
       the portion of "string of words" that occurs before the first word that is matched by "pattern"
   Example
       $beforew(three one two three o leary) returns "one two"


bitchx

   Function
       $bitchx()
   Usage
       $bitchx()
   Returns
       returns the BitchX builting "expando", which by default is [BX] in colour.
       Actually I think it returns the number 1.


bmatch

   Function
       $bmatch()
   Usage
       $bmatch(pattern input)
   Returns
       takes a match (possibly containing * and % characters) and does a match on the rest of its arguments. This appears to be the same as gettmatch().


center

   Function
       $center()
   Notes
       The string is truncated from the right, so the returned length is NOT "width".
   Usage
       $center(width string)
   Returns
       Returns the string centered in "width" chars
   Example
       $center(30 BitchX) returns " BitchX"


cexist

   Function
       $cexist()
   Usage
       $cexist(command)
   Returns
       returns 0 or 1 depending on whether the argument exists as a BitchX builtin command (1 if it does, 0 if not).


chanmode

   Function
       $chanmode()
   Usage
       $chanmode()
   Returns
       The current channel mode, or the mode on the named channel.


channel

   Function
       $channel()
   Usage
       $channel(channelname)
   Returns
       returns a list of clients in the given (or current) channel, with *, &, !, @, + or a dot (.) before each name depending on whether the nick is an IRC oper (*), in your userlist or shitlist respectively, a channel op, has voice, or not.


channelmode

   Returns
       channel modes of the specified channels on the current window; can also be given a numeric argument after the channel which is 1 to list bans, 2 to get ban who time, 3 to get exceptions, with 0 being the default and just fetching the channel mode. You can give a list of channel, number pairs to get modes for multiple channels.
   Function
       $channelmode()
   Usage
       $channelmode(#chan1 #chan2 #chan3)


channelnicks

   Function
       $channelnicks()
   Usage
       $channelnicks(channel)
   Returns
       chops in a comma separated list.


channicks

   Function
       $channicks()
   Usage
       $channicks(channelname)
   Returns
       a list of nicks in the channel, separated by commas


chanusers

   Function
       $chanusers()
   Usage
       $chanusers(channelname)
   Returns
       A space-separated list of clients in the named (or current) channel.


chanwin

   Function
       $chanwin()
   Usage
       $chanwin(refnum)
   Returns
       The channel bound to the given window number, or if you give it a channel name it returns the corresponding window nuber.


checkbot

   Function
       $checkbot()
   Usage
       $checkbot(userhost channel)
   Returns
       if given a hostname matching one on your bot list, returns the pertinent info ...
   Example
       $checkbot(PimpBot!rush@nic.cerf.net #yyz) returns 3 3 *rush@nic.cerf.net #yyz


checkshit

   Function
       $checkshit()
   Usage
       $checkshit(userhost channel)
   Returns
       if given a hostmask matching your shitlist, returns the shitlist level and channels its active for
   Example
       $checkshit(*!*@* #mirc) returns "4 #mirc" ;)


checkuser

   Function
       $checkuser()
   Usage
       $checkuser(userhost channel)
   Returns
       if given a hostmask matching one on your userlist, returns the level, aop protect level, etc
   Example
       $checkuser(novalogic!nova@ra1.randomc.com #bitchx) returns 51 1 1 *nova@*.randomc.com #bitchx


chmod

   Function
       $chmod()
   Usage
       $chmod(file numeric-mode)
   Returns
       0 if a successful, -1 if not
   Example
       $chmod(.BitchX/BitchX.quits 666) returns 0 and sets the permissions of the file to "666" or "-rw-rw-rw-"


chngw

   Function
       $chngw()
   Notes
       the first word is numbered 0
   Usage
       $chngw(num word string of text)
   Returns
       "string of text" such that the "num"th word is removed and replaced by "word"
   Example
       $chngw(3 foo now is the time for) returns "now is the foo for"


chops

   Function
       $chops()
   Usage
       $chops(channel)
   Returns
       chops (i.e. channel operators, people currently mode +o in the named channel) in a space separated list.


chr

   Function
       $chr()
   Usage
       $chr(num [num2] ... [numN])
   Returns
       the ascii char(s) the given "num(s)"
   Example
       $chr(120 121 122) returns "xyz"


close

   Function
       $close()
   Usage
       $close(filenum)
   Returns
       0 or -1, if closing the file handler "filenum" was successful or unsuccessful, respectively.
   Example
       $close(99999999999999) returns -1 (hopefully)


closeserver

   Function
       $closeserver()
   Usage
       $closeserver(number_of_open_socket)
   Returns
       The socket number, after closing it.


closesocket

   Function
       $closesocket()
   Usage
       $closesocket(n)
   Returns
       an alias for closeserver


cluster

   Function
       $cluster()
   Usage
       $cluster(host)
   Returns
       proper string for a ban
   Example
       $cluster(power@example.org)


common

   Function
       $common()
   Notes
       returned in order found in first string.
   Usage
       $common (string of text / string of text)
   Returns
       Given two sets of words seperated by a forward-slash '/', returns all words that are found in both sets.
   Example
       $common(one two three / buckle my two shoe one) returns "one two"


connect

   Function
       $connect()
   Usage
       $connect(host port)
   Returns
       the socket number to use for read/write.


convert

   Function
       $convert()
   Usage
       $convert(IP or hostname)
   Returns
       either the reverse lookup of a given IP or the IP of a hostname
   Example
       $convert(127.0.0.1) returns localhost $convert(localhost) returns 127.0.0.1


cool

   Function
       $cool()
   Usage
       $cool(text)
   Returns
       "text" parsed through bX's "cool" text parser
   Example
       $cool(this is cool text) returns "ThIs iS CoOl tExT"


cool2

   Function
       $cool2()
   Usage
       $cool2(text)
   Returns
       "text" parsed through bX's "cool2" text parser
   Example
       $cool2(this is cool2 text) returns "THiS iS CooL2 TeXT"


copattern

   Function
       $copattern()
   Usage
       $copattern(pattern var_1 var_2)
   Returns
       Given a pattern and two variable names, it returns all words in the variable_2 corresponding to any words in variable_1 that are matched by the pattern
   Example
       @nicks = [hop IRSMan skip] @userh = [jnelson@iastate.edu irsman@iastate.edu sanders@rush.cc.edu] $copattern(*@iastate.edu userh nicks) returns "hop IRSMan"


count

   Function
       $count()
   Usage
       $count(s1 s2)
   Returns
       Given two strings, returns the number of times s2 occurs inside s1, with case insensitive matching.
   Example
       $count(aba abAbadaba) returns 3


countansi

   Function
       $countansi()
   Usage
       $countansi(text)
   Returns
       the number of ansi-color related chars in the string
   Example
       $countansi($cparse(%B)) returns 11


country

   Function
       $country()
   Usage
       $country(CA) or $country(hostname)
   Returns
       country of origin.
   Example
       /eval echo $country(ca)
       produces Canada (pHEAR)
       /eval echo $country(ppp713.iameleet.kw)
       Note that the list is hard-wired and slightly out of date.


cparse

   Function
       $cparse()
   Usage
       $cparse(text)
   Returns
       "text" with the ANSI codes substituted for the ANSI parse vars.
   Example
       /do echo $cparse("%Rthis is bright red")


crypt

   Function
       $crypt()
   Notes
       Password truncated to 8 chars. Spaces allowed, but password must be inside "" quotes.
   Usage
       $crypt(password seed)
   Returns
       a 13-char encrypted string when given a seed and password. Returns zero (0) if one or both args missing. Additional args ignored.


curpos

   Function
       $curpos()
   Usage
       $curpos()
   Returns
       returns current position in window buffer


currchans

   Function
       $currchans()
   Usage
       $currchans()
   Returns
       A list of strings, each of which contains first a number, the number of the current server, and then the name of a channel that's currently visible in a window.


decode

   Function
       $decode()
   Notes
       $encode($decode(text)) returns "text" $decode($encode(text)) returns "text" too. Yes. $decode(plain-text) does compress the data by a factor of 2. But it ignores non-ascii text, so use this as compression at your own risk and peril.
   Usage
       $decode(text)
   Returns
       If <text> was generated with $encode(), it returns the string you originally encoded. If it wasnt, you will probably get nothing useful in particular.
   Example
       $decode(GGGFCAGGGJCAGGGPCAGGHFGN) returns "fe fi fo fum"


delarray

   Function
       $delarray()
   Usage
       $delarray(arrayname)
   Returns
       0 on sucess, -1 on failure; deletes the entire contents of the array.


delitem

   Function
       $delitem()
   Usage
       $delitem(arrayname item)
   Returns
       deletes an item of an array and moves the contents of the array that were stored "above" the item down by one. It returns 0 (zero) on success, -1 if unable to find the array, -2 if unable to find the item. Also, if the item is the last item in the array, it deletes the array. The item is a number between 0 (the first item) and one less than the array length to delete the last item. 


deuhc

   Function
       $deuhc()
   Usage
       $deuhc(nick!user@host)
   Returns
       A string: *!user@host becomes user@host, *!*@*.host becomes *.host; in other words, if there is no ! or @ you get back an empty string; if there is no *! you get back the original string; if there's a *!*@ you get back everything after the @ and if there's *! followed by anything else, you get everything back that's after the ! itself.


diff

   Function
       $diff()
   Usage
       $diff(string of text / string of text)
   Returns
       given two sets of words, seperated by a forward-slash '/', returns all words that are not found in both sets
   Example
       $diff(one two three / buckle my three shoe) returns "one two buckle my shoe"


eleet

   Function
       $eleet()
   Usage
       $eleet(text)
   Returns
       "text" parsed through bX's "eleet" text parser
   Example
       $eleet(this is ereet text) returns "+h15 15 3r33+ +3x+"


encode

   Function
       $encode()
   Notes
       $encode($decode(text)) returns text (most of the time) $decode($encode(text)) also returns text.
   Usage
       $encode(text)
   Returns
       a string, uniquely identified with <text> such that the string can be used as a variable name.
   Example
       $encode(fe fi fo fum) returns "GGGFCAGGGJCAGGGPCAGGHFGN"


eof

   Function
       $eof()
   Usage
       $eof(filenum)
   Returns
       0 or 1 depending on if the next char in the file is an EOF
       Note: Unix doesn't have an EOF char; presumably eof() will return 1 in that case if there is no more data to read.
   Example
       $open(pfft R) returns 10 $eof(10) returns 0


epic

   Function
       $epic()
   Usage
       $epic()
   Returns
       1 if it's an epic client, 0 if not
   Example
       $epic() returns 1


fexist

   Function
       $fexist()
   Usage
       $fexist(file)
   Returns
       returns 1 if file exists, -1 otherwise
   Example
       $fexist(/usr/local/bin/BitchX) returns 1


filter

   Function
       $filter()
   Usage
       $filter(pattern string of words)
   Returns
       given a pattern and a string of words, returns all words that are NOT matched by the pattern
   Example
       $filter(f* one two three four five) returns "one two three"


finditem

   Function
       $finditem()
   Usage
       $finditem(name, itemnumber)
   Returns
       Does a binary search and returns the item number of the string that exactly matches the string searched for, or it returns -1 if unable to find the array, or -2 if unable to find the item.


findw

   Function
       $findw()
   Notes
       the first word is index 0
   Usage
       $findw(word string of text)
   Returns
       the index of the first occurrence of "word" in the string of text
   Example
       $findw(word there is a word in here somewhere) returns 3


flash

   Function
       $flash()
   Usage
       $flash(num)
   Returns
       the "flash" string referenced by num
   Example
       $flash(3) returns "**XB00"
       You may need to be on a PC console for this to work, or it might not work at all, I'm not sure. It doesn't exist in the version of BitchX I have (1.1).


fnexist

   Function
       $fnexist()
   Usage
       $fnexist(strlen)
   Returns
       1 if the named function exists, 0 otherwise.


fparse

   Function
       $fparse()
   Usage
       $fparse(f)
   Returns
       If f is the name of an fset variable (with or without the leading FORMAT_) the corresponding value is returned. Additional arguments are used as parameters for the format string, so that if (say) FORMAT_WIDELIST has the value "[$1-]" then $parsef(widelist boy socks ankles) will return [socks ankles], the $1 in the format skipping the 0th argument, boy.


fromw

   Function
       $fromw()
   Usage
       $fromw(pattern word1 ?word2? ... ?wordN?)
   Returns
       the string starting with the word being matched
   Example
       $fromw(asf asdf asf asdf) returns "asf asdf"


fsize

   Function
       $fsize()
   Usage
       $fsize(file)
   Returns
       the size of "file" or -1 if it doesnt exist
   Example
       $fsize(/usr/local/bin/BitchX-72) returns 786628


ftime

   Function
       $ftime()
   Usage
       $ftime(filename)
   Returns
       the modification time of the given file.


geom

   Function
       $geom()
   Usage
       $geom()
   Returns
       the geometry of the current window
   Example
       $geom() returns "79 24" on my box


getarrays

   Function
       $getarrays()
   Usage
       $getarrays()
   Returns
       returns a string containg the names of all currently existing arrays separated by spaces.


getcdcc

   Function
       $getcdcc()
   Usage
       $getcdcc(n)
   Returns
       If given a non-numeric argument, returns the number of cdcc packs. If given a numeric argument, returns more information about that particular pack.


getcset

   Function
       $getcset()
   Usage
       $getcset(channel variable)
   Returns
       Supposedly can return the value of a cset variable.


getenv

   Function
       $getenv()
   Notes
       do NOT use a $
   Usage
       $getenv(var)
   Returns
       the environment variable "var"
   Example
       $getenv(HOME) returns "/home/by-tor"


getflags

   Function
       $getflags()
   Usage
       $getflags(user@host channame)
   Returns
       the user's flags


getfsets

   Function
       $getfsets()
   Usage
       $getfsets()
   Returns
       Takes a list of words and returns a list of words that are also the names of fset formats.


getgid

   Function
       $getgid()
   Usage
       $getgid()
   Returns
       The current group identifier (POSIX getgid() system call for example)


gethost

   Function
       $gethost(nick)
   Notes
       NOT case sensitive
   Usage
       $gethost(nick)
   Returns
       the user@host of the given nick
   Example
       $gethost(piker) returns loser@efnet.opers.org :)


getinfo

   Function
       $getinfo()
   Usage
       $getinfo(nick)
   Returns
       the info set by $setinfo() for a valid nick on your userlist
   Example
       $getinfo(panasync) returns "the coder for bitchx!"


getitem

   Function
       $getitem()
   Usage
       $getitem()
   Returns
       returns the value of the specified item of an array, or returns an empty string on failure to find the item or array.


getkey

   Function
       $getkey()
   Usage
       $getkey(channel)
   Returns
       the channel key if there is one.
   Example
       $getkey(#BitchX) should return nothing ;)


getlogin

   Function
       $getlogin()
   Usage
       $getlogin()
   Returns
       Your username, or LOGNAME from the environment if this is not available.


getmatches

   Function
       $getmatches()
   Usage
       $getmatches()
   Returns
       Attempts to match a pattern to the contents of an array and returns a list of item_numbers of all items that match the pattern, or it returns an empty string if no items match or if the array was not found.


getpgrp

   Function
       $getpgrp()
   Usage
       $getpgrp()
   Returns
       The current POSIX process group, an integer.


getreason

   Function
       $getreason()
   Notes
       you MUST use some argument for this, or it returns nothing.
   Usage
       $getreason(text)
   Returns
       a random reason from BitchX.reasons
   Example
       $getreason(asdf) returned "When faith is lost, when honor dies, The man is dead!"


getrmatches

   Function
       $getrmatches()
   Usage
       $getrmatches()
   Returns
       function_getrmatches() attempts to match the input text with an array of patterns, and returns a list of item_numbers of all patterns that match the given text, or it returns a null string if no matches occur or if the array was not found.


getsets

   Function
       $getsets()
   Usage
       $getsets()
   Returns
       Takes a list of words and returns those words that are the name of SET variables.


gettabkey

   Function
       $gettabkey()
   Usage
       $gettabkey(direction array)
   Returns
       The tabkey list
   Example
       /eval echo $gettabkey(1)


gettmatch

   gettmatch(users % user@host *) would match the userhost mask in the second word of the array In other words, given an array name with various strings in it, we wild_match() against the elements within the array. This allows parsing using % and * for wildcards. We return only the best match from the array, unlike getmatch() which returns ALL the matching items.


getuid

   Function
       $getuid()
   Usage
       $getuid()
   Returns
       Current user ID, a number, as per POSIX.


getvar

   Function
       $getvar()
   Usage
       $getvar(alias)
   Returns
       The given alias
   Example
       /eval echo $getvar(kb)


glob

   Function
       $glob()
   Usage
       $glob(path/mask)
   Returns
       the list of files in path which match "mask" using glob type matching
   Example
       $glob(/*lin*) should return vmlinuz if you are ereet and run linux


help

   Function
       $help()
   Usage
       $help(help)
   Returns
       the bX /bhelp for "help"
   Example
       $help(help) returns: "[ì] Help on Topic: help" " Usage: /BHelp <Topic|Index>" " Topic - This gives help on <Topic>" " Index - This shows the list of commands supplied in BitchX"


idle

   Function
       $idle()
   Usage
       $idle()
   Returns
       the idle time.


ifindfirst

   Function
       $ifindfirst()
   Usage
       $ifindfirst(arrayname item)
   Returns
       returns the first index of an exact match with the search string, or returns -2 if unable to find the array, or -1 if unable to find any matches.


ifinditem

   Function
       $ifinditem()
   Usage
       $ifinditem(arrayname string)
   Returns
       ifinditem does a binary search and returns the index number of the string that exactly matches the string searched for, or it returns -1 if unable to find the array, or -2 if unable to find the item.


igetitem

   Function
       $igetitem()
   Usage
       $igetitem(arrayname n)
   Returns
       returns the item referred to by the passed-in index (n), i.e. the nth item, with the first being numbered zero; It returns an empty string if unable to find the array or if the index was invalid.


igetmatches

   Function
       $igetmatches()
   Usage
       $igetmatches(arrayname, pattern)
   Returns
       A space-separated list of items matching the pattern; the pattern can contain * and % as per wild_match.


index

   Function
       $index()
   Usage
       $index(characters text)
   Returns
       The number of leading characters in <text> that do not occur anywhere in the <characters> argument.
   Example
       $index(f three fine frogs) returns 6 (the 'f' in 'fine') $index(frg three fine frogs) returns 2 (the 'r' in 'three')


indextoitem

   Function
       $indextoitem()
   Usage
       $indextoitem(arrayname n)
   Returns
       function_indextoitem() converts an index number to an item number for the specified array. It returns a valid item number, or -1 if unable to find the array, or -2 if the index was invalid. 


info

   Function
       $info()
   Usage
       $info()
   Returns
       some information about BitchX: the version and the compile-time options.
   Example
       $info() returns BitchX+adegikltz in bX72+tcl1.0 (tcl 8.0b2)


insertw

   Function
       $insertw()
   Notes
       the first word is numbered 0.
   Usage
       $insertw(num word string of text)
   Returns
       "string of text" such that "word" is the "num"th word in the string.
   Example
       $insertw(3 foo now is the time for) returns "now is the foo time for"


iplong

   Function
       $iplong()
   Usage
       $iplong(ip4addr)
   Returns
       A 32-bit integer representing the IP address. This is the equivalent of, in C, htonl() after inet_aton().
   Example
       /do echo $iplong(192.168.0.1) produces 3232235521


iptoname

   Function
       $iptoname()
   Usage
       $iptoname(quad.dotted.ip)
   Returns
       the hostname for the given IP
   Example
       $iptoname(127.0.0.1) returns localhost


irclib

   Function
       $irclib()
   Usage
       $irclib()
   Returns
       The path to the ircII library; this can be orverridden by the IRCLIB environment variable, and it's used as a default for the LOAD_PATH variable for where scripts are loaded from..


isalpha

   Function
       $isalpha()
   Usage
       $isalpha(char)
   Returns
       1 or 0 if char alpha or not
   Example
       $isalpha(6) returns 0


isban

   Function
       $isban()
   Usage
       $isban(channel ban)
   Returns
       1 if the ban matches a shitlist ban entry (3 or 4), 0 if not
   Example
       $isban(#bitchx *!*@*mirc*) returns 1 ;)


ischannel

   Function
       $ischannel()
   Notes
       Contrary to popular belief, this function does NOT determine whether a given channel name is in use!
   Usage
       $ischannel(text)
   Returns
       If <text> could be a valid channel name, 1 is returned. If <text> is an illegal channel name, 0 is returned.
   Example
       $ischannel(i_am_not_on_this_channel) returns 0 $ischannel(#i_am_not_on_this_channel) returns 1


ischanop

   Boo Hiss
       This should be $ischanop(channel nick <nick...nick>) and return a list (1 1 ... 0), which would allow us to call is_chanop() without ripping off the nick, and allow us to abstract is_chanop() to take a list. oh well... Too late to change it now. :/
   Function
       $ischanop()
   Notes
       Contrary to popular belief, this function can only tell you who the channel operators are for channels you are already on!
   Usage
       $ischanop(nick channel)
   Returns
       1 if <nick> is a channel operator on <channel> 0 if <nick> is not a channel operator on <channel> * O R * if you are not on <channel>


isconnected

   Function
       $isconnected()
   Usage
       $isconnected(n)
   Returns
       If n is supplied, tells you if the numbered server is currently connected; otherwise, tells you if we're connected to the current IRC server.


iscurchan

   Function
       $iscurchan()
   Usage
       $iscurchan(channelname)
   Returns
       1 if the channel specified is the current channel on any window for the current server, otherwise 0.


isdigit

   Function
       $isdigit()
   Usage
       $isdigit(digit)
   Returns
       1 or 0 if digit is a digit or not
   Example
       $isdigit(4) returns 1


isignored

   Function
       $isignored()
   Usage
       $isignored(nick)
   Returns
       t1 if the given nick is in the currently list being ignored by BitchX, and 0 otherwise.


isnum

   Function
       $isnum()
   Usage
       $isnum(num)
   Returns
       1 or 0 if num is a number or not
   Example
       $isnum(44) returns 1


isnumber

   Function
       $isnumber()
   Usage
       $isnumber(number base)
   Returns
       returns the empty value if nothing is passed to it; returns 0 if the value passed is not a number; returns 1 if the value passed is a number.
       The "base" number is optional and should be prefixed by the character 'b'. ala, $isnumber(0x0F b16) for hexadecimal. The special base zero (b0) means to 'auto-detect'. Base must be between 0 and 36, inclusive. If not, it defaults to 0.


isop

   Function
       $isop()
   Usage
       $isop(channel nick)
   Returns
       1 if the nick is an op in both your userlist for the channel AND an op on the channel, 0 otherwise.
   Example
       $isop(#bitchx panasync) returns 1


isuser

   Function
       $isuser(nick userhost)
   Usage
       $isuser(nick userhost)
   Returns
       given a nick (or *) and a user@host (any wildcard form), the corresponding userlist information if a match is found.
   Example
       $isuser(* edwards@*.sympatico.ca) returns "USER 100 1 1 *edwards@*.sympatico.ca #bitchx" on my machine


isvoice

   Function
       $isvoice()
   Usage
       $isvoice(channel nick)
   Returns
       1 if the nick is +v, 0 if not.
   Example
       $isvoice(#bitchx panasync) returns 0


itemtoindex

   Function
       $itemtoindex()
   Usage
       $itemtoindex(arrayname n)
   Returns
       itemtoindex() takes an item number and searches for the index that refers to the item. It returns the index number, or -1 if unable to find the array, or -2 if the item was invalid.


jot

   Function
       $jot()
   Usage
       $jot(val1 val2 ?step?)
   Returns
       list of #'s from val1 to val2 by options ?step?, decreasing OR increasing
   Example
       $jot(9 5 2) returns "9 7 5"


key

   Function
       $key()
   Usage
       $key(channel)
   Returns
       channel key or "*" if none.


lastmessage

   Function
       $lastmessage()
   Usage
       $lastmessage(refnum)
   Returns
       the last message recieved or nothing if none
   Example
       $lastmessage(10) returns 10:19pm |By-Tor| ~by-tor@by-tor.com |By-tor| yo


lastnotice

   Function
       $lastnotice()
   Usage
       $lastnotice(refnum)
   Returns
       the last notice recieved or nothing if none
   Example
       $lastnotice(10) returns "10:19pm |By-Tor| ~by-tor@by-tor.com |By-tor| yo"


lastserver

   Function
       $lastserver()
   Usage
       $lastserver()
   Returns
       the server reference number of the last (and/or current) server you connected to
   Example
       $lastserver() returns 0 on my box


left

   Function
       $left()
   Usage
       $left(number text)
   Returns
       the <number> leftmost characters in <text>.
   Example
       $left(5 the quick brown frog) returns "the q"


leftpc

   Function
       $leftpc()
   Usage
       $leftpc(count text)
   Returns
       the longest initial part of TEXT that includes COUNT printable characters.


leftw

   Function
       $leftw()
   Usage
       $leftw(num string of text)
   Returns
       the left "num" words in "string of text"
   Example
       $leftw(3 now is the time for) returns "now is the"


line

   Function
       $line()
   Usage
       $line(linenumber [windownumber])
   Returns
       the text of logical line linenumber from the lastlog of window windownumber. If no window number is supplied, the current window will be used. If the window number is invalid, the function will return false.
       Lines are numbered from 1, starting at the most recent line in the buffer.


listarray

   Function
       $listarray()
   Usage
       $listarray(arrayname)
   Returns
       A space-separated list of the contents of the named array, or the empty string if it can't find the array.


listen

   Function
       $listen()
   Usage
       $listen(port)
   Returns
       the port allocated for the RAW_LISTEN


longip

   Function
       $longip()
   Usage
       $longip(longip)
   Returns
       the "long" form of the given IP
   Example
       $longip(2130706433) returns 1.0.0.127


mask

   Function
       $mask()
   Usage
       $mask(type addres)
       or, $mask(address type)
   Returns
       an address with a mask specified by the given type. Use this function to generate a ban mask for example, with wildcards in places so that the ban will be more effective.
       Available types are:
       The available types are:
       0: *!user@host.domain
       1: *!*user@host.domain
       2: *!*@host.domain
       3: *!*user@*.domain
       4: *!*@*.domain
       5: nick!user@host.domain
       6: nick!*user@host.domain
       7: nick!*@host.domain
       8: nick!*user@*.domain
       9: nick!*@*.domain
       10: *!*@.domain
       11: *!*user@.domain
       12: nick!*@.domain
       13: nick!*user@.domain


match

   Function
       $match()
   Notes
       it is possible to embed spaces inside of a word or pattern by including the entire word or pattern in quotation marks. (")
   Usage
       $match(pattern list of words)
   Returns
       if no words in the list match the pattern, it returns 0. Otherwise, it returns the number of the word that most exactly matches the pattern (first word is numbered one)
   Example
       $match(f*bar foofum barfoo foobar) returns 3 $match(g*ant foofum barfoo foobar) returns 0


matchitem

   Function
       $matchitem()
   Usage
       $matchitem(arrayname pattern)
   Returns
       matchitem() attempts to match a pattern (using wild_match) to each element of an array in turn and returns the index (starting at zero) of the best match. Returns -1 if it cannot find the array, or -2 if no matches occur


mid

   Function
       $mid()
   Notes
       the first character is numbered zero.
   Usage
       $mid(start number text)
   Returns
       the <start>th through <start>+<number>th characters in <text>.
   Example
       $mid(3 4 the quick brown frog) returns " qui"


midw

   Function
       $midw()
   Notes
       The first word is word #0.
   Usage
       $midw(start num string of text)
   Returns
       "num" words starting at word "start" in the string "string of text"
   Example
       $midw(2 2 now is the time for) returns "the time"


mircansi

   Function
       $mircansi()
   Usage
       $mircansi(text with lame mirc color codes)
   Returns
       the given text with ANSI color substituted for mirc color
   Example
       $mircansi(�3asdf) returns the same color as $cparse(%gasdf)


mkdir

   Function
       $mkdir()
   Usage
       $mkdir(dir)
   Returns
       0 if the mkdir was successful, 1 if not
   Example
       $mkdir(/usr) returns 1 (unsuccessful)


msar

   Function
       $msar()
   Usage
       $msar(c/search/replace/data)
   Returns
       the result of changing the search string to replace in the given data.
       The command character c can be any combination of:
       i to make the replacement case-insensitive;
       r to treat data as the name of a variable and to operate on its value, storing the result back in the variable;
       g to do all matches in the given data (global) and not just the first.
       The delimiter can be / but can be any other character that is not a command letter (i r or g); obviously you must use the same delimiter in all three places.
       Returns the empty string on error.


mychannels

   Function
       $mychannels()
   Usage
       $channels()
   Returns
       the channels you are currently in


myservers

   Function
       $myservers()
   Usage
       $myservers()
   Returns
       The actual IRC servers to which you're currently connected.


nametoip

   Function
       $nametoip()
   Usage
       $nametoip(hostname)
   Returns
       the dotted quad IP address for hostname
   Example
       $nametoip(localhost) returns 127.0.0.1


nochops

   Function
       $nochops()
   Usage
       $nochops(channel)
   Returns
       nops (people in the current channel, or the given channel, who are not currently channel operators) in a space separated list.


notify

   Function
       $notify()
   Usage
       $notify(on/off/serv #)
   Returns
       various info about NOTIFY list
   Example
       $notify() returns current notify list $notify(on serv 0) returns who is currently ON server #5


notw

   Function
       $notw()
   Notes
       The first word is numbered 0.
   Usage
       $notw(num string of text)
   Returns
       "string of text" with word number "num" removed.
   Example
       $notw(3 now is the time for) returns "now is the for"


numarrays

   Function
       $numarrays()
   Usage
       $numarrays()
   Returns
       the number of currently existing arrays.


numdiff

   Function
       $numdiff()
   Usage
       $numdiff(num1 num2)
   Returns
       the difference of num1 and num2
   Example
       $numdiff(5 4) returns "1"


numitems

   Function
       $numitems()
   Usage
       $numitems(arrayname)
   Returns
       the number of items in the named array, or -1 if the array was not found.


numlines

   Function
       $numlines()
   Usage
       $numlines("string")
   Returns
       One fewer than the number of lines "string" might take up if displayed in the current window.


numonchannel

   Function
       $numonchannel()
   Usage
       $numonchannel(channel)
   Returns
       the number of users on a channel. if channel is omitted then the current channel is used.


numsort

   Function
       $numsort()
   Usage
       $numsort(words and/or numbers)
   Returns
       sorts stuff first alphabetically the numerically
   Example
       $numsort(asdf abdr c d 1 2 3 e) returns "abdr asdf c d e 1 2 3"


numwords

   Function
       $numwords()
   Usage
       $numwords(string of words)
   Returns
       the number of words in the arguments
   Example
       $numwords(count these words) returns 3


onchannel

   Function
       $onchannel()
   Usage
       $onchannel(channel) * OR * $onchannel(nick)
   Returns
       sorted list of nicks (channel) or if the nick is on channel If no args, sorted list of nicks for current channel is returned. Current channel is also used for (nick) test.


open

   Function
       $open()
   Notes
   Usage
       $open(filename mode)
   Returns
       File handle (a number) for the opened file, if successful. Nothing if unsuccessful.
       The mode argument can be R (or r), for a read-only file, or W (or w) to be able to write the file. Put a B (or b) after the mode for binary I/O.
   Example
       $open($ctoolz_dir/BitchX.quits R) returns a number (should, if it exists.


openserver

   Function
       $openserver()
   Usage
       $openserver(servername port [notify])
   Usage
       Supply a server name and a port (e.g. www.example.org and 80) to open a TCP/IP connection to the named server on the named port. You can supply an optional third argument to open the socket in Notify mode, and in this case the SOCKET_NOTIFY_LIST hook will be called when data is available. This does not connect to an IRC server necessarily; any I/O over the connection is up to your script..
   Returns
       File descriptor or -1


opensocket

   Function
       $opensocket()
   Usage
       $opensocket(servername port notify)
   Returns
       same as $openserver()


pad

   Function
       $pad()
   Notes
       if N is negative, it'll pad to the right if N is positive, it'll pad to the left
   Usage
       $pad(N string of text goes here)
   Returns
       a padded string of text, either left or right. Final length is N chars.
   Example
       $pad(20 letters) returns " letters"


pass

   Function
       $pass()
   Usage
       $pass(word1 word2)
   Returns
       does a char by char comparison of word2 to word1 and returns every char of word2 that appears in word1
   Example
       $pass(green yellow) returns "e" $pass(yellow green) returns "ee"


pattern

   Function
       $pattern()
   Usage
       $pattern(pattern string of words)
   Returns
       given a pattern and a string of words, returns all words that are matched by the pattern
   Example
       $pattern(f* one two three four five) returns "four five"


pid

   Function
       $pid()
   Usage
       $pid()
   Returns
       the pid of the process


pop

   Function
       $pop()
   Notes
       This function removes the LAST "word" in $varname
   Usage
       $pop(varname)
   Returns
       The value removed from varname.


ppid

   Function
       $ppid()
   Usage
       $ppid()
   Returns
       the parent pid of the process.


printlen

   Function
       $printlen()
   Usage
       $printlen()
   Returns
       same as $countansi();


push

   Function
       $push()
   Usage
       $push(var word1 word2 ... wordN)
   Returns
       The value of $var with the given words appended to it (the var need not previously exist)
   Example
       $push(newvar this is a new variable) returns "this is a new variable", provided $newvar does not exist.


querywin

   Function
       $querywin()
   Usage
       $querywin(nick)
   Returns
       The reference number of the window whose target is currently a private conversation with the given nick, or -1 if there is no such window.


rand

   Function
       $rand()
   Usage
       $rand(max)
   Returns
       A random number from zero to max-1.
   Example
       $rand(10) might return any number from 0 to 9.


randomnick

   Function
       $randomnick()
   Usage
       $randomnick()
   Returns
       a random nick
   Example
       $randomnick() returned "tqfftjg" one time


read

   Function
       $read()
   Usage
       $read(filenum bytes)
   Returns
       text read from the file opened by file handler "filenum"
   Example
       (none)


readserver

   Function
       $readserver()
   Usage
       $readserver(socket_num)
   Returns
       -1 if socket returns an error or it doesn't exist or the passed socket number plus any info read from the socket


readsocket

   Function
       $readsocket()
   Usage
       $readsocket(socketnumber)
   Returns
       same as $readserver().


regcomp

   Function
       $regcomp()
   Usage
       $regcomp(pattern)
   Returns
       An encoded string (in the form of $encode()) that you can store in a variable. You must pass this value to $regfree() when you are done with it. In the meantime, you can use it with $regexec to do matches.
       The pattern here is actually a POSIX regular expression.


regerror

   Function
       $regerror()
   Usage
       $regerror(compiledpattern)
   Returns
       Returns a string explaining why the most recent call to $regmatch() or $regexec() failed.


regexec

   Function
       $regexec()
   Usage
       $regexec(compiledpattern string)
   Returns
       0 or 1 depending on whether the given string was matched by the regular expression, which must have been compiled using $regcomp().


regfree

   Function
       $regfree()
   Usage
       $regfree(compiledstring)
   Returns
       Use this when you have finished with a regular expression. If you don't do this, your BitchX process will grow (possibly by a few kilobytes) each time you compile a pattern, and will never shrink, so you can run out of memory and crash.


remw

   Function
       $remw()
   Usage
       $remw(word string of text)
   Returns
       "string of text" with the word "word" removed
   Example
       $remw(the now is the time for) returns "now is time for"


remws

   Function
       $remws()
   Usage
       $remws(word word word / word word word)
   Returns
       Returns the right hand side unchanged, except that any word on the right hand side that is also found on the left hand side will be removed. Space is not retained.


rename

   Function
       $rename()
   Usage
       $rename(oldname newname)
   Returns
       Renames a file; returns 0 or -1 depending upon the success of the rename


repeat

   Function
       $repeat()
   Usage
       $repeat(num text)
   Returns
       the "text" repeated "num" times
   Example
       $repeat(10 a) returns "aaaaaaaaaa"


rest

   Function
       $rest()
   Usage
       $rest(n string)
   Returns
       the given string starting at the nth chracter, in the same way that $restw() does for words. The first character is numbered zero.
   Example
       $rest(2 unhappy youth) returns "happy youth".


restw

   Function
       $restw()
   Notes
       the first word is numbered 0.
   Usage
       $restw(num string of text)
   Returns
       "string of text" that occurs starting with and including word number "num"
   Example
       $restw(3 now is the time for) returns "time for"
       See also $rest().


reverse

   Function
       $reverse()
   Usage
       $reverse(words)
   Returns
       reverses the chars in the words.
   Example
       $reverse(this rules) returns "selur siht"


revw

   Function
       $revw
   Usage
       $revw(words)
   Returns
       reverses the words.
   Example
       $revw(this rules) returns "rules this"


rfilter

   Function
       $rfilter()
   Usage
       $rfilter(word list of patterns)
   Returns
       given a word and a list of patterns, return all patterns that do NOT match the word
   Example
       $rfilter(jnelson@example.org *@* jnelson@* f*@*.org) returns "f*@*.org"


right

   Function
       $right()
   Usage
       $right(number text)
   Returns
       the <number> rightmost characters in <text>.
   Example
       $right(5 the quick brown frog) returns " frog"


rightw

   Function
       $rightw()
   Usage
       $rightw(num string of text)
   Returns
       the right num words in "string of text"
   Example
       $rightw(3 now is the time for) returns "the time for"


rindex

   Function
       $rindex()
   Usage
       $rindex(characters text)
   Returns
       The number of leading characters in <text> that occur before the *last* occurance of any of the characters in the <characters> argument.
   Example
       $rindex(f three fine frogs) returns 12 (the 'f' in 'frogs') $rindex(frg three fine frogs) returns 15 (the 'g' in 'frogs')


rmatch

   Function
       $rmatch()
   Notes
       It is possible to embed spaces into a word or pattern simply by including the entire word or pattern within quotation marks (")
   Usage
       $rmatch(word list of patterns)
   Returns
       if no pattern in the list matches the word, it returns 0. Otherwise, it returns the number of the pattern that most exactly matches the word (first word is numbered one)
   Example
       $rmatch(foobar f*bar foo*ar g*ant) returns 2 $rmatch(booya f*bar foo*ar g*ant) returns 0


rmatchitem

   Function
       $rmatchitem()
   Usage
       $rmatchitem(arrayname input)
   Returns
       $rmatchitem() attempts to match the input text with an array of patterns, much like $rmatch(). Returns -1 if it cannot find the array, or -2 if no matches occur, or the integer index of the pattern which matched.


rmdir

   Function
       $rmdir()
   Usage
       $rmdir(dir)
   Returns
       1 if unsuccessful, 0 if successful (dont ask me why ;)
   Example
       $rmdir(.BitchX) returns 1
       Note: on Unix-based systems $rmdir() will not remove a directory unless it is empty.


rot13

   Function
       $rot13()
   Usage
       $rot13(text)
   Returns
       the "text" encoded with ROT13 coding
   Example
       $rot13(asdf) returns "nfqs"


rpattern

   Function
       $rpattern()
   Usage
       $rpattern(word list of patterns)
   Returns
       Given a word and a list of patterns, return all patterns that match the word.
   Example
       $rpattern(jnelson@example.org *@* jnelson@* f*@*.org) returns "*@* jnelson@*"


rstrstr

   Function
       $rstrstr()
   Usage
       $rstrstr(search input)
   Returns
       The rightmost occurence of the string "search" within the input, and the rest of the input. The matching is case insensitive.
   Example
       $rstrstr(boy a boy with a boy's feet) returns "boy's feet".


rword

   Function
       $rword()
   Usage
       $rword(call this with a space-separated list of words)
   Returns
       A single rowd chosen at random from the list.


sar

   Technical
       This function searches for the given search string in the given text, and replaces if with the replacement text, if a match is found. The field delimiter may be any character; the first character found that is not a 'g' or 'r' is used.
   Function
       $sar()
   Practical
       This is the general purpose search-and-replace function. It allows you to look for any arbitrary text substring in any text string, and replace it with another arbitrary substring. Any of the strings may consist of variables to expand at runtime.
   Usage
       $sar([g][r]/<search>/<replace>/<text>)
   Options
       g replace all matches, not just the first r assume text is a variable name; assign return value to variable
   Examples
       @ foo = [foobarblah]
       $sar(/oo/ee/booyamon) returns "beeyamon"
       $sar(/oo/ee/foofoo) returns "feefoo"
       $sar(g/oo/ee/foofoo) returns "feefee"
       $sar(r/oo/ee/foo) returns and sets $foo to "feebarblah"
       See also $regexec() and $msar().


sendcdcc

   Function
       $sendcdcc()
   Usage
       $sendcdcc(nick stuff)
   Returns
       0 I think. Sends cdcc stuff to the given nick.


server_version

   Function
       $server_version()
   Usage
       $server_version(open_server_number)
   Returns
       Server version, or "Unknown"; there is a builtin and rather short list of ircd versions that is not very reliable.


servername

   Function
       $servername()
   Usage
       $servername(num)
   Returns
       the name of the server "num" in your servers list
   Example
       $servername(0) returns "irc.emory.edu" on my machine


servernick

   Function
       $servernick()
   Usage
       $servernick(refnum)
   Returns
       Your nick on the given server.


servernum

   Function
       $servernum()
   Usage
       $servernum(servername)
   Returns
       Takes a server name and returns the associated refnum.


servers

   Function
       $servers()
   Usage
       $servers()
   Returns
       the list of servers.


setinfo

   Function
       $setinfo()
   Notes
       "nick" must be on your userlist
   Usage
       $setinfo(nick info)
   Returns
       0 or 1 depending on the success of the command
   Example
       $setinfo(panasync the coder for bitchx!) returns 1


setitem

   Function
       $setitem()
   Usage
       $setitem()
   Usage
       $setitem() sets an item of an array to a value, or creates a new array if the array doesn not already exist and the item number is zero, or it adds a new item to an existing array if the item number is one more than the prevously largest item number in the array.
   Returns
       0 on success;
       1 on success if a new item was added to an existing array;
       2 on success if a new array was created and item zero was set;
       -1 if it is unable to find the array (and item number was not zero);
       -2 if it was unable to find the item (item < 0 or item was greater than 1 + the prevous maximum item number.


shift

   Function
       $shift()
   Notes
       removes the first word from $var
   Usage
       $shift(var)
   Returns
       the word removed from $var
       Compare with $push() and $pop()


sort

   Function
       $sort()
   Usage
       $sort(words and/or numbers)
   Returns
       sorts stuff alphabetically
   Example
       $sort(9 4 10 6 g n r f) returns "10 4 6 9 f g n r"
       Compare with $numsort() wich would return "f g n r 4 6 9 10"


splice

   Function
       $splice()
   Usage
       $splice(variable start length)
   Returns
       removes length words fron the given variable, starting at the startth (the first is numbered zero) and returns the removed words
   Example
       /do assign boy.data.1 My name is Simon and my feet are bare /do $splice(boy.data.1 3 4) returns "simon and my feet"
       /do echo $boy.data.1 now shows "My name is are bare".


split

   Function
       $split()
   Usage
       $split(splitstring stringtosplit)
   Returns
       a list composed of "stringtosplit" split using "splitstring"
   Example
       $split(a abacadaeaf) returns " b c d e f"


srand

   Side effect
       seeds the random number generater.
   Function
       $srand()
   Notes
       the argument is ignored.
   Usage
       $srand(seed)
   Returns
       Nothing.


statsparse

   Function
       $statsparse()
   Usage
       $statsparse(status vars)
   Returns
       the status vars expanded, formatted and everything :)
   Example
       $statsparse(%M) returns "mail: 7" when i ran it


status

   Function
       $status()
   Usage
       $status(winref# statusline#)
   Returns
       The Status line # of the window
   Example
       /eval echo $status(0 1)


stime

   Function
       $stime()
   Notes
       $stime() is really useful when you give it the argument $time(), ala $stime($time()) is the human readable form for now.
   Usage
       $stime(time)
   Returns
       The human-readable form of the date based on the <time> argument.
   Example
       $stime(1000) returns what time it was 1000 seconds from the epoch.


strftime

   Function
       $strftime()
   Usage
       $strftime(time format)
   Returns
       the formatted time str for time. if time is omitted then current time is used. man strftime for the format specs.


strip

   Function
       $strip()
   Usage
       $strip(characters text)
   Returns
       <text> with all instances of any characters in the <characters> argument removed.
   Example
       $strip(f free fine frogs) returns "ree ine rogs"
   Notes
       it can be difficult (actually, not possible) to remove spaces from a string using this function. To remove spaces, simply use this: $tr(/ //$text)
       An alternative is $tr(/characters//$text)


stripansi

   Function
       $stripansi()
   Usage
       $stripansi(text)
   Returns
       "text" stripped ansi codes (the ^[)
   Example
       $stripansi(^[[0,10mfdsa) returns "[[0,10mfdsa"


stripansicodes

   Function
       $stripansicodes()
   Usage
       $stripansicodes()
   Returns
       "text" stripped of ALL ansi codes, including the #s and format codes
   Example
       $stripansicodes(^[[0,10mfdsa) returns "fdsa"


stripc

   Function
       $stripc()
   Usage
       $stripc("string that may contain spaces")
   Returns
       the input string with mIRC control-C-based colour sequencess removed. This is just a more cryptic name for $stripmirc().


stripmirc

   Function
       $stripmirc()
   Usage
       $stripmirc(text)
   Returns
       "text" stripped of mirc color codes
   Example
       $stripmirc(�10ddf�4asdf) returns "ddfasdf"


strlen

   Function
       $strlen()
   Usage
       $strlen(string)
   Returns
       the length of the string given
   Example
       $strlen(this is a string) returns 16


strstr

   Function
       $strstr()
   Usage
       $strstr(needle haystack)
   Returns
       a list of words from the first "needle" in "haystack" to the end of "haystack"
   Example
       $strstr(needle there is a needle in this haystack) returns "needle in this haystack"


tdiff

   Function
       $tdiff()
   Usage
       $tdiff(seconds)
   Returns
       The time that has elapsed represented in days/hours/minutes/seconds corresponding to the number of seconds passed as the argument.
   Example
       $tdiff(3663) returns "1 hour 1 minute 3 seconds"


tdiff2

   Function
       $tdiff2()
   Usage
       $tdiff2(timestr)
   Returns
       like tdiff but with d, h, m, s
   Example
       $tdiff(1234) returns 20m 34s


time

   Function
       $time()
   Usage
       $time()
   Returns
       The number of seconds that has elapsed since Jan 1, 1970, GMT.
   Example
       $time() returned something around 802835348 at the time I wrote this comment.


tolower

   Function
       $tolower()
   Usage
       $tolower(string)
   Returns
       the lower case string.


toupper

   Function
       $toupper()
   Usage
       $toupper(string)
   Returns
       the upper case string.


tow

   Function
       $tow()
   Usage
       $tow(pattern string of words)
   Returns
       the portion of "string of words" that occurs up to and including the first word that is matched by "pattern"
   Example
       $tow(panasync BitchX by panasync is cool) returns "BitchX by panasync"


tr

   Function
       $tr()
   Usage
       $tr(/abc/def/input)
   Returns
       input with a turned to d, b to e and c to f everywhere.
       This is an alias for $translate(), which is really a transliteration function.


translate

   Note
       translates characters in a str See $tr() also.
   Function
       $translate()
   Usage
       $translate()
   Example
       $translate(/ //text)


trunc

   Function
       $trunc()
   Usage
       $trunc(num_of_digits number)
   Returns
       number truncated to num_of_digits
   Example
       /do echo $trunc(5 7819263864) returns 7819263864.00000
       Note however that $trunc(3.123456 3) returns 3.000 and not 3.123


twiddle

   Function
       $twiddle()
   Usage
       $twiddle(arg)
   Returns
       the expanded variable "arg"
   Example
       $twiddle(~) returns "/home/by-tor" $twiddle($HOME) returns "/home/by-tor"
       In other words, the current user's login directory.


uhc

   Function
       $uhc()
   Usage
       $uhc(mask)
   Returns
       If passed the empty string, returns the empty string. Otherwise, you can pass in a partial nick-user-host mask, and any missing parts are filled in with *, so if you pass Ankh!boy you get back Ankh!boy**.*, and if yuo pass just Ankh you get Ankh!*@*.*, and lee@example.org returns *!lee@example.org, and so on.


uhost

   Function
       $uhost()
   Notes
       it is CASE SENSITIVE
   Usage
       $uhost(nick)
   Returns
       the user@host of nick
   Example
       $uhost(mr_bill) returns fat@greased.up.pig.org =]


umask

   Function
       $umask()
   Usage
       $umask()
   Returns
       Sets the default umask for file creation, as per POSIX; see the Unix man page for umask(2).


umode

   Function
       $umode()
   Usage
       $umode(server_number)
   Returns
       returns the umode on that server or current server if no number given
       Appears ot be a more cryptic alise for $usermode().


uname

   Function
       $uname()
   Usage
       $uname(format)
   Returns
       The operating environment information; without arguments on Linux-based systems this is often the Kernel version, e.g. Linux 2.12.4-0.mm.7mdv-i686-up-64GB.
       The input string, if given, is used as a format and can contain the following codes:
       %a all information (same as %s %n %r %v %m)
       %s kernel name
       %r kernel release
       %v kernel version
       %m machine name
       %n network node hostname
       %% (a literal percent sign).
       The default is "%s %r".


uniq

   Function
       $uniq()
   Usage
       $uniq (string of text)
   Returns
       Given a set of words, returns a new set of words with duplicates removed.
   Example
       $uniq(one two one two) returns "one two"


unlink

   Function
       $unlink()
   Usage
       $unlink(filenames)
   Returns
       attempts to remove each filename given, and returns 0 on success, or the number of failures. The unlink function does not do anything (always returns zero) if BitchX was compiled with PUBLIC_ACCESS defined.
   Example
       $unlink(~/foo)


unshift

   Function
       $unshift()
   Usage
       $unshift(var <arg1> [arg2 arg3 ... argN])
   Returns
       the value of the var after the unshift
   Example
       assign cres.data.1 nuttin' but a smooth 100% /dev/zero $unshift(cres.data.1 Cres... ) returns "Cres... nuttin' but a smooth 100% /dev/zero"


uptime

   Function
       $uptime()
   Usage
       $uptime()
   Returns
       the current uptime for bX


userhost

   Function
       $userhost()
   Notes
       $userhost() changes with every single line that appears on your screen, so if you want to save it, you will need to assign it to a variable.
   Usage
       $userhost()
   Returns
       the userhost (if any) of the most previously recieved message.


usermode

   Function
       $usermode()
   Usage
       $usermode(servernum)
   Returns
       Your current user modes on the given server, or the current server if none is given.


utime

   Function
       $utime()
   Usage
       $utime()
   Returns
       the current uptime in the UNIXTIME format (seconds since 1970) plus 100,000'ths of a second
   Example
       $uptime() returned "869015766 424919" when i write this


version

   Function
       $version()
   Usage
       $version(servernumber)
   Returns
       Same as $server_version().


which

   Function
       $which()
   Usage
       $which(filename)
   Returns
       the absolute path of any file in ~/.BitchX
   Example
       $which(BitchX.help) returns (on my box) "/home/by-tor/.BitchX/BitchX.help"


winbound

   Function
       $winbound()
   Usage
       $winbound(channel|window)
   Returns
       Given a channel, tells you what window its bound to.
       Given a window, tells you what channel its bound to.
       With no arguments, seems to crach BitchX.


winchan

   Function
       $winchan()
   Usage
       $winchan(#channel <server refnum|server name>)
   Returns
       The refnum of the window where the channel is the current channel on the server refnum or server name. returns -1 on error


winlen

   Function
       $winlen()
   Usage
       $winlen(refnum)
   Returns
       The display size (number of lines) of the given window, or of the current window if no refnum is given.


winlevel

   Function
       $winlevel()
   Usage
       $winlevel(refnum)
   Returns
       The lastlog level of the given windoe


winnam

   Function
       $winnam()
   Usage
       $winnam()
   Returns
       the current window name if any.


winnicklist

   Function
       $winnicklist()
   Usage
       $winnicklist(refnum)
   Returns
       the list of nicks associated with the given window (e.g. people you've msg'd)


winnum

   Function
       $winnum()
   Usage
       $winnum()
   Returns
       the index number for the current window
   Notes
       returns -1 if there are no windows open (ie, in dumb mode)


winquery

   Function
       $winquery()
   Usage
       $winquery(querynick)
   Returns
       the window refnum with a query matching the querynick, or -1 if none.
   Example
       $winquery(panasync) returns -1


winrefs

   Function
       $winrefs()
   Usage
       $winrefs()
   Returns
       the window numbers in the order they were last active, from current to last
   Example
       $winrefs() returned "3 2 1" when i used it


winserv

   Function
       $winserv()
   Usage
       $winserv(refnum)
   Returns
       the server reference number of the server for the window referenced by refnum, or the current window if not specified. If "refnum" does not exist, it returns -1.
   Example
       $winserv() returns 0 (referencing irc.emory.edu)


winsize

   Function
       $winsize()
   Usage
       $winsize(refnum)
   Returns
       the window size of the window referenced by refnum
   Example
       $winsize(1) returns 22


winvisible

   Function
       $winvisible()
   Usage
       $winvisible(winnum)
   Returns
       1 of the window is visible, 0 if not and -1 if it does not exist
   Example
       $winvisible(1) returns 1 $winvisible(0) returns 1 $winvisible(11111111111111111111) returns -1


word

   Function
       $word()
   Usage
       $word(number text)
   Returns
       the <number>th word in <text>. The first word is numbered zero.
   Example
       $word(3 one two three four five) returns "four" (think about it)


write

   Function
       $write()
   Usage
       $write(fd words)
   Returns
       -1 on failure; writes the given words to the file you opened with $open(). Returns the number of characters written. The buffer is also flushed, so the data should appear in the file immediately.


writeb

   Function
       $writeb()
   Usage
       $writeb(filenum text)
   Returns
       The number of chars written to filenum
   Example
       $open(pfft W) returns 10 $writeb(10 pfft) returns 4


writeserver

   Note
       "\n" is appended to the end.
   Function
       $writeserver()
   Usage
       $writeserver(socket_num text)
   Returns
       Length written or -1, Never returns 0


writesocket

   Function
       $writesocket()
   Usage
       $writesocket(socketnum text)
   Returns
       number of bytes written, or -1; it's the same as $writeserver().
Outils personnels
Espaces de noms

Variantes
Actions
Navigation
Outils