[TASK] Code cleanup and some small documentation.
This commit is contained in:
parent
a20a91bf12
commit
db9dda856c
|
@ -7,10 +7,7 @@
|
|||
- Logging auf Verbindungs/Channel und Verbindung/Query-Basis für IRC.
|
||||
- RAW-Logging für den Rest?
|
||||
|
||||
- Settings?!
|
||||
|
||||
"<Serena> I'll ask Lucene about that ;-)"
|
||||
|
||||
"<Serena> I'll ask Lucene about that ;-)" -> Logfiles durchsuchen nach nick, zeit,...
|
||||
|
||||
- Logging mit Timestamp für:
|
||||
- Sollte das Teil mal abkacken, so will ich zumindest über Verbindungsabbrüche,
|
|
@ -90,8 +90,8 @@ class Client_ClientManager {
|
|||
//assign the client to the new connectionHandler.
|
||||
$this->clientPool[$newConnectionHandler->getID()] = $client;
|
||||
//get the config and assign it to the new connectionHandler, too.
|
||||
$config = $this->configPool[$connectionHandler->getID()];
|
||||
$this->configPool[$newConnectionHandler->getID()] = $config;
|
||||
$config = $this->configPool[$connectionHandler->getID()];
|
||||
$this->configPool[$newConnectionHandler->getID()] = $config;
|
||||
//remove old connection
|
||||
$this->removeConnection($connectionHandler);
|
||||
}
|
||||
|
@ -109,7 +109,7 @@ class Client_ClientManager {
|
|||
}
|
||||
//call the registered client
|
||||
if(isset($this->clientPool[$connectionHandler->getID()])) {
|
||||
//let the client process the data, send the results back.
|
||||
//let the client process the data, send the results back.
|
||||
while($data = $connectionHandler->read()) {
|
||||
$result = $this->clientPool[$connectionHandler->getID()]->processRawData($data);
|
||||
if($result !== "") {
|
||||
|
|
|
@ -111,7 +111,7 @@ class Connection_ConnectionPool {
|
|||
if($connectionHandler->canWrite() && $connectionHandler->isServer() === FALSE) $write[] = $connectionSocket;
|
||||
}
|
||||
$except = $read;
|
||||
|
||||
//Arrays are prepared, let's have socket_select() take a look and process its results.
|
||||
$tempArray = array();
|
||||
$selectedSockets = $this->socketPool->select($read, $write, $except);
|
||||
foreach($selectedSockets AS $selectedType=>$selectedArray) { //read, write, except, this loop won't kill performance
|
||||
|
|
1
Main.php
1
Main.php
|
@ -3,7 +3,6 @@ error_reporting(E_ALL);
|
|||
require_once('AutoLoader.php');
|
||||
|
||||
try {
|
||||
//require_once('Testcode/Connection/IrcClientTest.php');
|
||||
require_once('Testcode/Client/ClientManagerTest.php');
|
||||
}
|
||||
catch(Exception $e) {
|
||||
|
|
|
@ -0,0 +1,17 @@
|
|||
# General
|
||||
This multiserver-ircbot is based on an advanced socket-driven framework.
|
||||
It's still in beta, but the basics are working.
|
||||
|
||||
|
||||
# Running the bot
|
||||
To run it, simply type ./start.sh into your console.
|
||||
|
||||
|
||||
# Documentation
|
||||
The documentation is not in the svn, but you can easily create it using the existing Doxyfile with doxygen.
|
||||
Simply run ./update-docs.sh and - if doxygen + dot are installed - you'll have a perfectly fine documentation.
|
||||
The Code itself should also give you an idea of how this works :-)
|
||||
|
||||
|
||||
# License
|
||||
This project is a private one, i don't know what license i will use yet.
|
|
@ -1 +1,2 @@
|
|||
#!/bin/bash
|
||||
doxygen
|
Loading…
Reference in New Issue