2.2.2 Feature Request Thread

Back to PHP-IRC Feature Requests

Page: 1  
From User Message Body
Manick
Post #111
user avatar
Admin
Date: 9:12 pm, Feb 20 2006
Posts: 223


Okay, here it is, the 2.2.2 Feature Request Thread.

2.2.1 is pretty much locked and loaded. Almost ready to ship out. Show me what you want for 2.2.2.

Currently Planned:

- Local DCC Speed Capping (already done)
- Global DCC Speed Capping

--Manick
PHP-IRC Developer
Flyste
Post #271
user avatar
Member
Date: 12:37 pm, Jul 11 2006
Posts: 6


I'm french and I use to display a date like this DD/MM/YYYY HH:MM:SS. I think many countries can use many formats so I added this to defines.php :

Code

// Time String Formats
define('FULL_DATE_STRING_FORMAT', 'd/m/Y H:i:s');
define('DATETIME_STRING_FORMAT', 'd/m/Y H:i:s');
define('DATE_STRING_FORMAT', 'd/m/Y');
define('TIME_STRING_FORMAT', 'H:i:s');


And I use it when it's needed :
- the log function
- for the ctcp time message
- ...

Not very important but user friendly.


-------------------------------------------


I think it would interesting to have a configuration flag that enable to log (or not) the bot activity via the log function in the log files

The bot actually log not what he send.


-------------------------------------------


I think it can be interesting to have one log file a day instead of all in one.

So I added a line in the config file under the "logfile" directive :

Code
;====Log file
logfile ./log/inikisha.log
logdir ./log/inikisha/



And I made a little hack in the function log() of irc.php :

Code
   public function log($data)
   {
      $network = $this->getServerConf('Network') == "" ? $this->getClientConf('server') : $this->getServerConf('Network');

      $lineToLog = "[".date(TIME_STRING_FORMAT)."] " . "({$this->nick}@$network) > " . $data . "\n";

      if (DEBUG == 1)
      {
         echo $lineToLog;
      }

      if ($this->getClientConf('logdir') != "")
      {
         error_log($lineToLog, 3, $this->getClientConf('logdir').date('Y-m-d').'.log');
      }
      elseif ($this->getClientConf('logfile') != "")
      {
         error_log($lineToLog, 3, $this->getClientConf('logfile'));
      }
   }



I think those features are interesting and small enough to the version 2.2.2

Last edited by Flyste at 12:46 pm, Jul 11 2006

Manick
Post #272
user avatar
Admin
Date: 1:08 am, Jul 12 2006
Posts: 223


Awesome! Thanks for the contribution.

--Manick
PHP-IRC Developer
Flyste
Post #274
user avatar
Member
Date: 12:14 pm, Jul 12 2006
Posts: 6


I've just remember that I've made other modifications for personnal use.

My bot is connected to a server that is a bit special. The nickserv's nick is themis. So the actual authentication method doesn't work.

I added one line to the config file after the server's line :

Code
;====The server you are going to connect to
server irc.epiknet.org
nickservname themis



And I modified the file irc.php where it send the password:

Code
    case "NOTICE":
        if ($this->checkIgnore($this->lVars['from']))
        {
            return;
              }
        
        $nickserv = ($this->getClientConf('nickservname') != '') ? $this->myStrToLower($this->getClientConf('nickservname')) : 'nickserv';
        if ($this->myStrToLower($this->lVars['fromNick']) == $nickserv) {
            if (strpos($this->myStrToLower($this->lVars['text']), "identify") !== false) {
                $this->pushBefore($this->clientFormat("PRIVMSG " . $nickserv . " :IDENTIFY " . $this->getClientConf('password')));
            }
        }
        break;



I don't use many irc servers so I don't know if it really interesting for many persons.

   

Back to PHP-IRC Feature Requests