📜 ⬆️ ⬇️

Hrenus - Irc bot in PHP

Hrenus
Friends, let me present you a modest development.
This is an IRC bot written in php, with little functionality, but also huge reserves (after file processing)

What it is for: the answer to this question lies in the field of the irrational. Perhaps someone will be interested to pick the IRC protocol.

What he can do at this stage:
1. Log in to the IRC server
2. Hang on any number of channels and restart after a kick.
3. Respond to commands like! Command
4. At the moment, the bot knows three commands -! Image (image search),! Oracle (the notorious Oracle of the True Name) and! Help. Add your own commands is very simple.
5. Keep logs. But not simple, but extremely indecent. I will tell about it later.
6. Post on the channel the names of new topics in Habré.

The bot uses the php Sqlite and SimpleXml extensions.
')
Link code.google.com/p/hrenus/downloads/list

Usage:
<?php

require ('Hrenus.php');

$bot = new Bot();

$bot->server = 'irc.tsua.net:6669';
$bot->channels = array('#test', '#hrenus');

$bot->nick = 'Hrenus';
$bot->pass = 'pass';

$bot->start();

?>


Configure the Bot.php file and run it from the command line (you can also edit Bot.bat under Windows, set the correct paths and run this file)

PS For the test I launched a bot on the channel #habrahabr in the RusNet network.
! help for reference

Source: https://habr.com/ru/post/70191/


All Articles