-
Notifications
You must be signed in to change notification settings - Fork 0
class Bot
www/php-ircbot/Classes/Library/IRC/Bot.php
IRCBot\Library
- Super3 [email protected]
- Daniel Siepmann [email protected]
No public properties found
No constants found
__construct() | __destruct() | addCommand() | addListener() | connectToServer() | getCommandPrefix() | getCommands() | getUserNickName() | log() | sendDataToServer() | setChannel() | setLogFile() | setMaxReconnects() | setName() | setNick() | setPort() | setServer() |
A list of all channels the bot should connect to.
private
$channel : array
Array
Defines the prefix for all commands interacting with the bot.
protected
$commandPrefix : string
Array
All available commands.
Commands are type of IRCCommand
private
$commands : array
Array
Holds the server connection.
private
$connection : \Library\IRC\Connection
Array
All of the messages both server and client
private
$ex : array
Array
All available listeners.
Listeners are type of IRCListener
private
$listeners : array
Array
Complete file path to the log file.
Configure the path, the filename is generated and added.
private
$logFile : string
Array
Holds the reference to the file.
private
$logFileHandler : \Library\IRC\type
Array
The number of reconnects before the bot stops running.
private
$maxReconnects : int
Array
The name of the bot.
private
$name : string
Array
The nick of the bot.
private
$nick : string
Array
The nick counter, used to generate a available nick.
private
$nickCounter : int
Array
The nick of the bot.
private
$nickToUse : string
Array
Contains the number of reconnects.
private
$numberOfReconnects : int
Array
Creates a new IRCBot.
- Inherited from \Library\IRC\Bot
public
__construct(array $configuration = array()) : void
- author: Daniel Siepmann [email protected]
Cleanup handlers.
- Inherited from \Library\IRC\Bot
public
__destruct() : mixed
Adds a single command to the bot.
- Inherited from \Library\IRC\Bot
public
addCommand(\Library\IRC\IRCCommand $command) : mixed
- author: Daniel Siepmann [email protected]
- Inherited from \Library\IRC\Bot
public
addListener(\Library\IRC\Listener\Base $listener) : mixed
Connects the bot to the server.
The "USER" input is formed like: "USER misc misc misc :misc\r\n" http://stackoverflow.com/questions/2356040/my-ruby-irc-bot-doesnt-connect-to-the-irc-server-what-am-i-doing-wrong
- Inherited from \Library\IRC\Bot
public
connectToServer() : mixed
- author: Super3 [email protected]
- author: Daniel Siepmann [email protected]
-
version:
1.1
- Inherited from \Library\IRC\Bot
protected
executeCommand(mixed $source, mixed $commandName, array $arguments, mixed $data) : mixed
Returns class name of $object without namespace
- Inherited from \Library\IRC\Bot
private
getClassName(mixed $object) : string
- author: Matej Velikonja [email protected]
- Inherited from \Library\IRC\Bot
public
getCommandPrefix() : mixed
- Inherited from \Library\IRC\Bot
public
getCommands() : mixed
Get the nickname from the data string.
- Inherited from \Library\IRC\Bot
public
getUserNickName(string $data) : mixed
Joins one or multiple channel/-s.
- Inherited from \Library\IRC\Bot
private
join_channel(mixed $channel) : mixed
- author: Super3 [email protected]
Adds a log entry to the log file.
- Inherited from \Library\IRC\Bot
public
log(string $log, string $status = '') : mixed
- author: Daniel Siepmann [email protected]
This is the workhorse function, grabs the data from the server and displays on the browser
- Inherited from \Library\IRC\Bot
private
main() : mixed
- author: Super3 [email protected]
- author: Daniel Siepmann [email protected]
Displays stuff to the broswer and sends data to the server.
- Inherited from \Library\IRC\Bot
public
sendDataToServer(string $cmd) : mixed
- author: Daniel Siepmann [email protected]
Sets the channel.
E.g. '#testchannel' or array('#testchannel','#helloWorldChannel')
- Inherited from \Library\IRC\Bot
public
setChannel(string|array $channel) : mixed
Sets the filepath to the log. Specify the folder and a prefix.
E.g. /Users/yourname/logs/ircbot- That will result in a logfile like the following: /Users/yourname/logs/ircbot-11-12-2012.log
- Inherited from \Library\IRC\Bot
public
setLogFile(string $logFile) : mixed
Sets the limit of reconnects, before the bot exits.
- Inherited from \Library\IRC\Bot
public
setMaxReconnects(int $maxReconnects) : mixed
Sets the name of the bot.
"Yes give me a name!"
- Inherited from \Library\IRC\Bot
public
setName(string $name) : mixed
Sets the nick of the bot.
"Yes give me a nick too. I love nicks."
- Inherited from \Library\IRC\Bot
public
setNick(string $nick) : mixed
Sets the port.
E.g. 6667
- Inherited from \Library\IRC\Bot
public
setPort(int $port) : mixed
Sets the server.
E.g. irc.quakenet.org or irc.freenode.org
- Inherited from \Library\IRC\Bot
public
setServer(string $server) : mixed
Sets the whole configuration.
- Inherited from \Library\IRC\Bot
private
setWholeConfiguration(array $configuration) : mixed
- author: Daniel Siepmann [email protected]
\ » Classes » Bot
Documentation generated on April 26th, 2020 at 15:54.
Powered by phpDocumentor with template GitHub-wiki.