Warning
This script is deprecated, don’t use it.
./IRCserver.py [HOST PORT [OPTIONS]] | -z [OPTIONS]
Create a server listening on HOST at PORT, and run it as a server which accepts client on it and broadcast every message from on client to all the other clients.
- –interactive, -i, -z, –zenity Force Zenity interactivity : read args HOST and PORT interactively,
with Zenity and PyZenity (don’t use it unless you are sure to have both).
-ni, --non-interactive Disable Zenity interactivity : read args HOST and PORT from command line, Default.
-h,–help Print this help message.
-a Print all message incomming from the client or outcomming to the server with verbous information.
–debug Launch program in debug mod with pygdb.
$ ./PyRlwrap.py ./IRCserver.py naereen-corp.crans.org 9312 -a
- 09/2012
- By Lilian BESSON
- ENS de Cachan (M1 Mathematics & M1 Computer Science MPRI) mailto:lbesson@ens-cachan.fr
- For Naereen Corp.
- mailto:naereen-corporation@laposte.net https:sites.google.com/site/naereencorp/liste-des-projets/irc.
Turn off the support of ANSI Colors. Can be used other somewhere else, or on other modules, AFTER importing ANSIColors module !
Turn on the support of ANSI Colors. Can be used other somewhere else, or on other modules, AFTER importing ANSIColors module !
A remplacement for sys.exit : print an error message with Zenity before executing sys.exit.
1 to print messages
Nb of input socket authorized (a max)
Create a socket and bind it to the port @port and the addresse @host.
Create a data socket from the socket @listen_socket.
Piece of text to be printed before each output.
Piece of text to be printed before each input.
Broadcast the message @message to each of the client in a list of client @list_client. @origin permits to print some usefull informations for delivering the origin of the message the all connected clients.
The help message, which can be printed to the user when invoking ‘\?’
Reaction to special message readed from the keyboard !
Attention : to be respectuous of TCP conventions, if the connection is closed from the server stdin (Ctrl + C), the returned socket has to be closed by the programmer.
DEBUG, PRINT_ALL_MESSAGE: are options for parametrize behaviour of client.
Help message for this program or this module (Keep in mind that it’s mainly designed to be a program, called from the command line)
Create a socket on an host=args[1] with port=int(args[2]), and run a client on it.
Args for all Zenity call
Use PyZenity to ask interactivly the arguments of the program.
Here disabled