Module - Read the Docs
Transcription
Module - Read the Docs
ModuleπΌ πππΆππππππ‘ππ Version latest-0.2.0-24-g2cd0587 06 February 2017 Table des matières 1 Prerequisites 3 2 Configuration 2.1 Options . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 2.2 Example . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 5 5 5 3 Usage 7 i ii ModuleπΌ πππΆππππππ‘ππ, π πππ ππππππ‘ππ π‘ β 0.2.0 β 24 β π2ππ0587 Erebot_Module_IrcConnector is a module for Erebot that contains the code required to make Erebot connect to IRC(S) servers. Contents : Table des matières 1 ModuleπΌ πππΆππππππ‘ππ, π πππ ππππππ‘ππ π‘ β 0.2.0 β 24 β π2ππ0587 2 Table des matières CHAPITRE 1 Prerequisites The following dependencies must be installed in order for this module to work properly : β PHP >= 5.2.2 β Erebot (some specific version may be required depending on this moduleβs version) β Erebot_API (some specific version may be required depending on this moduleβs version) Erebot (core) adds its own set of prerequisites which usually superseed those. 3 ModuleπΌ πππΆππππππ‘ππ, π πππ ππππππ‘ππ π‘ β 0.2.0 β 24 β π2ππ0587 4 Chapitre 1. Prerequisites CHAPITRE 2 Configuration 2.1 Options This module offers several configuration options. Tableau 2.1 β Options for Module_IrcConnector Name Type Default value host- string βErename botβ iden- string βEretity botβ nickname password realname string n/a string ββ string βErebotβ Description The botβs hostname. This parameter exists for historical reasons but is actually ignored by IRC servers. The botβs identity. Servers will usually only use it as a fallback if the machineβs real identity cannot be determined. This information is visible through WHOIS commands (which displays information such as nick!ident@host). The nickname the bot will take when connecting to the server. The password required to connect to the current IRC server. By default, no password is needed to connect. The botβs realname, sometimes also known as the userβs GECOS field. This usually contains information about the botβs administrator or the botβs purpose for connecting. This information is visible in WHOIS commands. 2.2 Example <?xml version=''1.0'' ?> <configuration xmlns=''http://localhost/Erebot/'' version=''...'' language=''fr-FR'' timezone=''Europe/Paris'' commands-prefix=''!''> <networks> <network name=''localhost''> <servers> <modules> <!-Makes the bot connect to the passworded IRC server at localhost 5 ModuleπΌ πππΆππππππ‘ππ, π πππ ππππππ‘ππ π‘ β 0.2.0 β 24 β π2ππ0587 under the nickname ``Erebus'' using ``ASecretIsWhatMakesAWomanAWoman'' as the password. The bot will use an insecure (plain-text) connection to the IRC server but will proceed to a security upgrade to make sure no one can eavesdrop on the connection. --> <module name=''Module_IrcConnector``> <param name=''password'' value=''ASecretIsWhatMakesAWomanAWoman''/> <param name=''nickname'' value=''Erebus''/> <param name=''realname'' value=''I decide who must live or die''/> </module> </modules> <!-The ``upgrade'' parameter is responsible for the security upgrade. The IRC server the bot is connecting to must support the STARTTLS extension for this to work. --> <server url=''irc://localhost:6667/?upgrade=1'' /> </servers> </network> </networks> </configuration> 6 Chapitre 2. Configuration CHAPITRE 3 Usage This module does not provide any command. Just add this module to your configuration and youβre done. This module makes Erebot send credentials to IRC servers, ie. the following sequence of commands : PASS password NICK nickname USER identity hostname server :Real name Note : The PASS command is only sent if a password was set in the configuration for that IRC server. This module also supports forced βsecurity upgradesβ through the STARTTLS extension : This feature can be enabled by adding an upgrade parameter in the connection URL and setting it to a boolean truth value, eg. irc://irc.example.com?upgrade=1. If you configure the bot to do a security upgrade, it will refuse to proceed with the connection if the IRC server rejects the upgrade (to protect itself against downgrade attacks). Current status on http://travis-ci.org/ : 7